‎2005 Dec 21 8:33 AM
Hi all,
i created one new button in gui of code ie01,02. Now requires that it should be shown under certain conditions and hidden under others kindly help...
Very urgent.
‎2005 Dec 21 8:52 AM
Hi,
1) set pf-status 'XXXX' excluding 'BUTTON NAME'. --> this will remove the button,
2) even you can use Internal table to Exclude more than one button
Append 'Button names' to ITAB
SET PF-STATUS XXXXX EXCLUDING itab.Regards
Sudheer
‎2005 Dec 21 8:37 AM
DATA: BEGIN OF app_tab OCCURS 0,
fcode LIKE rsmpe-func,
END OF app_tab.
IF w_mode NE 'B'. "Display
MOVE 'SAVE' TO app_tab.
APPEND app_tab.
MOVE 'SALL' TO app_tab.
APPEND app_tab.
MOVE 'DALL' TO app_tab.
APPEND app_tab.
MOVE 'NEW' TO app_tab.
APPEND app_tab.
MOVE 'COPY' TO app_tab.
APPEND app_tab.
MOVE 'DEL' TO app_tab.
APPEND app_tab.
SET PF-STATUS '0100' EXCLUDING app_tab.
ELSE.
MOVE 'COPY' TO app_tab.
APPEND app_tab.
SET PF-STATUS '0100' EXCLUDING app_tab.
ENDIF.
If the above mentioned code is helpful please reward points.
Cheers
‎2005 Dec 21 8:43 AM
Hi,
Use SET PF-STATUS 'commandname' EXCLUDING itab.
So hadle this for the buttons which u want to make inactive
...
But if u want to hide then then u have to us SCREEN options..
Hope this will get u some idea...
Regards
Sridhar Reddy k
‎2005 Dec 21 8:51 AM
The other button should remain the same but onlly the new button should have the functionality of switchin on/off based on condition... further where to define the conditions
‎2005 Dec 21 8:52 AM
Hi,
1) set pf-status 'XXXX' excluding 'BUTTON NAME'. --> this will remove the button,
2) even you can use Internal table to Exclude more than one button
Append 'Button names' to ITAB
SET PF-STATUS XXXXX EXCLUDING itab.Regards
Sudheer
‎2005 Dec 21 9:22 AM
Hi,
Check out this program. This might b helpful.
REPORT demo_list_set_pf_status_1.
DATA: fcode TYPE TABLE OF sy-ucomm,
wa_fcode TYPE sy-ucomm.
START-OF-SELECTION.
wa_fcode = 'FC1 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC2 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC3 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC4 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC5 '. APPEND wa_fcode TO fcode.
wa_fcode = 'PICK'. APPEND wa_fcode TO fcode.
SET PF-STATUS 'TEST'.
WRITE: 'PF-Status:', sy-pfkey.
AT LINE-SELECTION.
IF sy-lsind = 20.
SET PF-STATUS 'TEST' EXCLUDING fcode.
ENDIF.
WRITE: 'Line-Selection, SY-LSIND:', sy-lsind,
/ ' SY-PFKEY:', sy-pfkey.
AT USER-COMMAND.
IF sy-lsind = 20.
SET PF-STATUS 'TEST' EXCLUDING fcode.
ENDIF.
WRITE: 'User-Command, SY-LSIND:', sy-lsind,
/ ' SY-UCOMM:', sy-ucomm,
/ ' SY-PFKEY:', sy-pfkey.
Regards,
Sailaja