2010 Mar 15 3:04 PM
Hello,
I have to supress the button and menue entry for getting existing variants in a report. (Goto->Variants->Get) .
It would also be ok to popup a message if the user want to execute this function.
I tried to check SSCRFIELDS-UCOMM on event AT SELECTION-SCREEN but this does not work,
Any Idea ?
2010 Mar 15 3:33 PM
Hi,
Check out below sample code which exactly works in the way you want. Here i have added two buttons to the selection screen and disabled the option Get variants. Similarly you can disable what ever options you want simply by passing the function codes to be excluded to the internal table li_exclude. You can check the function codes by opening the standard PF status for report selection screen (Program RSSYSTDB and status %_00 in SE41).
TABLES: smp_dyntxt, sscrfields.
DATA: li_exclude TYPE TABLE OF rsexfcode,
lwa_exclude TYPE rsexfcode.
CONSTANTS: lc_fc01 TYPE sy-ucomm VALUE 'FC01',
lc_fc02 TYPE sy-ucomm VALUE 'FC02'.
PARAMETERS: po_test TYPE c.
SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN FUNCTION KEY 2.
LOAD-OF-PROGRAM.
MOVE: 'test1' TO smp_dyntxt-quickinfo,
'test1' TO smp_dyntxt-icon_text,
smp_dyntxt TO sscrfields-functxt_01,
'test2' TO smp_dyntxt-quickinfo,
'test2' TO smp_dyntxt-icon_text,
smp_dyntxt TO sscrfields-functxt_02.
INITIALIZATION.
lwa_exclude-fcode = 'GET'.
APPEND lwa_exclude TO li_exclude.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = '%_00'
p_program = 'RSSYSTDB'
TABLES
p_exclude = li_exclude.
Thanks,
Vinod.
2010 Mar 15 3:16 PM
Hi
IF i understand your problem correctly,you can set PF-STATUS excluding this button.
DATA fcode TYPE TABLE OF sy-ucomm.
...
MODULE status_0100 OUTPUT.
APPEND 'CHANGE' TO fcode.
APPEND 'SAVE' TO fcode.
SET PF-STATUS 'STATUS_0100' EXCLUDING fcode.
ENDMODULE.
Best Regards
Yossi Rozenberg
2010 Mar 15 3:33 PM
Hi,
Check out below sample code which exactly works in the way you want. Here i have added two buttons to the selection screen and disabled the option Get variants. Similarly you can disable what ever options you want simply by passing the function codes to be excluded to the internal table li_exclude. You can check the function codes by opening the standard PF status for report selection screen (Program RSSYSTDB and status %_00 in SE41).
TABLES: smp_dyntxt, sscrfields.
DATA: li_exclude TYPE TABLE OF rsexfcode,
lwa_exclude TYPE rsexfcode.
CONSTANTS: lc_fc01 TYPE sy-ucomm VALUE 'FC01',
lc_fc02 TYPE sy-ucomm VALUE 'FC02'.
PARAMETERS: po_test TYPE c.
SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN FUNCTION KEY 2.
LOAD-OF-PROGRAM.
MOVE: 'test1' TO smp_dyntxt-quickinfo,
'test1' TO smp_dyntxt-icon_text,
smp_dyntxt TO sscrfields-functxt_01,
'test2' TO smp_dyntxt-quickinfo,
'test2' TO smp_dyntxt-icon_text,
smp_dyntxt TO sscrfields-functxt_02.
INITIALIZATION.
lwa_exclude-fcode = 'GET'.
APPEND lwa_exclude TO li_exclude.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = '%_00'
p_program = 'RSSYSTDB'
TABLES
p_exclude = li_exclude.
Thanks,
Vinod.
2010 Mar 15 3:34 PM
Two possibilites
1) Create your own GUI STATUS with only BACK or EXIT button on it and then set it in PBO
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'MY_STATUS'.
2) Modyfing standard GUI STATUS the system sets for you. For this append all function codes you want to exclude and pass the table to FM RS_SET_SELSCREEN_STATUS in screen PBO.
Refer to program DEMO_SEL_SCREEN_STATUS for details.
Regards
Marcin
2010 Mar 16 7:21 AM