2008 Oct 09 4:03 AM
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
2008 Oct 09 4:43 AM
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
2008 Oct 09 4:43 AM
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
2008 Oct 09 7:10 AM
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 -
2008 Oct 14 11:50 AM
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
2008 Oct 22 9:26 AM
2008 Oct 22 10:43 AM
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
2008 Oct 22 10:49 AM
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
2008 Nov 20 1:01 PM