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: 

Supress standard function codes in a report

ralf_schfer
Explorer
0 Kudos
720

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 ?

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor
0 Kudos
312

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.

4 REPLIES 4

former_member641978
Active Participant
0 Kudos
312

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

vinod_vemuru2
Active Contributor
0 Kudos
313

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.

MarcinPciak
Active Contributor
0 Kudos
312

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

ralf_schfer
Explorer
0 Kudos
312

It's working

thanks for your help