Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog Programming - Transaction

Former Member
0 Kudos

Hi Experts,

I am working in dialog programme.

Anybody will suggest me how we can maintain the create/change/display transactions for single screen having all three create/change/display as pushbutton.

So that if I call create transaction the only create pushbutton should active. similarly if I call change transaction then only change pushbutton should active.

Also pls tell me how to make field uneditable?

Regards,

Poonam

1 ACCEPTED SOLUTION

Former Member
0 Kudos

do you mean you'll create 3 transaction code just for create/change/display? I think that is not advisable, you can use one transaction code then you have the 3 functions, then having three screens or having 1 screen then control the screen in PBO by using MODIFY SCREEN. there is a lot of ways to achive this. but if you really like in youir requirement then control the user status by using SET PF-STATUS EXCLUDING ITAB.

hope it helps

7 REPLIES 7

Former Member
0 Kudos

do you mean you'll create 3 transaction code just for create/change/display? I think that is not advisable, you can use one transaction code then you have the 3 functions, then having three screens or having 1 screen then control the screen in PBO by using MODIFY SCREEN. there is a lot of ways to achive this. but if you really like in youir requirement then control the user status by using SET PF-STATUS EXCLUDING ITAB.

hope it helps

Former Member
0 Kudos

Hi Poonam Patel,

Still if you want separate TRANSACTIONs.

Then you can use SY-TCODE as follows in PBO of the screen

in which you have those buttons.


  DATA: IT_UCOMM TYPE STANDARD TABLE OF SY-UCOMM.
  IF SY-TCODE = 'TCODE1'.
    APPEND 'CHANGE' TO IT_UCOMM.
    APPEND 'DISPLAY' TO IT_UCOMM.
  ELSEIF SY-TCODE = 'TCODE2'.
    APPEND 'CREATE' TO IT_UCOMM.
    APPEND 'DISPLAY' TO IT_UCOMM.
  ELSEIF SY-TCODE = 'TCODE3'.
    APPEND 'CREATE' TO IT_UCOMM.
    APPEND 'CHANGE' TO IT_UCOMM.
  ENDIF.
  SET PF-STATUS EXCLUDING IT_UCOMM.

Here,

transaction TCODE1 is to CREATE,

transaction TCODE2 is to CHANGE,

transaction TCODE3 is to DISPLAY.

Regards,

R.Nagarajan.

-


We can -


Former Member
0 Kudos

hi,

you can use this code in your PBO

case sy-tcode.

when 'CREATE_transaction'.

loop at screen.

if screen-name eq. 'CHANGE' or 'DISPLAY'.

screen-active = 0.

endif.

modify screen.

endloop.

same code you can use for change and display transaction.

and for making field uneditable you can use

screen-input = 0.

hope it will help you.

regards,

Lokesh

Former Member
0 Kudos

Hi Poonam,

Check the sample program RSDEMO02. This will help you learn table controls and to resolve your issue.

please refer to the thread below..

hope it will be useful.

Regards,

Sravanthi Chilal.

Former Member
0 Kudos

Hi,

You can try this code in the PBO of that particular screen

lets say you have three pushbuttons CREATE, CHANGE and DISPLAY

and the three Transaction be ZCREATE, ZCHANGE and ZDISPLAY for create , change and display respectively

**********************************

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'STATUS'.

SET TITLEBAR 'TITLE'.

CASE SY-TCODE.

WHEN 'ZCREATE'.

SET TITLEBAR 'TITLE' WITH 'CREATE'.

LOOP AT SCREEN.

IF SCREEN-NAME EQ 'CHANGE' OR SCREEN-NAME EQ 'DISPLAY'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

WHEN 'ZCHANGE'.

SET TITLEBAR 'TITLE' WITH 'CHANGE'.

LOOP AT SCREEN.

IF SCREEN-NAME EQ 'CREATE' OR SCREEN-NAME EQ 'DISPLAY'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

WHEN 'ZDISPLAY'.

SET TITLEBAR 'TITLE' WITH 'DISPLAY'.

LOOP AT SCREEN.

IF SCREEN-NAME <> 'DISPLAY' AND SCREEN-NAME.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDCASE.

ENDMODULE. " STATUS_0100 OUTPUT

*************************************

Regards,

Syed

Former Member
0 Kudos

Hi Poonam,

have you tried like this create the screen in which there is no need to keep any pushbutton as create since default screen will be displayed.

Write the code for saving the data. And keep 2 push buttons as Change and Display. In which write the code as

When 'change' use modify keyword.

When 'display' use select statement to retrieve the data according to the primary key in the screen.

Cheers!!

Balu

Former Member
0 Kudos

thanks