Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

* The below code snippet will exclude Execute(F8) button and add custom push buttons on selection screen of report program.

TABLES: smp_dyntxt, sscrfields,mara.

DATA: gt_exclude TYPE TABLE OF rsexfcode,
           gtt_exclude TYPE rsexfcode.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: s_matnr FOR mara-matnr.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN FUNCTION KEY 1.  "Will have a function code of 'FC01'
SELECTION-SCREEN FUNCTION KEY 2.  "Will have a function code of 'FC02'
SELECTION-SCREEN FUNCTION KEY 3.
SELECTION-SCREEN FUNCTION KEY 4.
SELECTION-SCREEN FUNCTION KEY 5.

SELECTION-SCREEN END OF BLOCK block1.

INITIALIZATION.

* Add displayed text string to buttons

  MOVE 'VF04' TO sscrfields-functxt_01.
  MOVE 'Excecute report' TO sscrfields-functxt_02.
  MOVE 'Test' TO sscrfields-functxt_03.

  gtt_exclude-fcode = 'ONLI'.
  APPEND gtt_exclude TO gt_exclude.

AT SELECTION-SCREEN.

  IF sscrfields-ucomm = 'FC01'.

    CALL TRANSACTION 'VF04'.

  ELSEIF sscrfields-ucomm = 'FC02'.

  ELSEIF sscrfields-ucomm = 'FC03'.

  ENDIF.

AT SELECTION-SCREEN OUTPUT.

  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = '%_00'
      p_program = 'RSSYSTDB'
    TABLES
      p_exclude = gt_exclude.

  • No labels

1 Comment

  1. You can also do something like:

    at selection-screen output.
      perform INSERT_INTO_EXCL(rsdbrunt) using 'ONLI'.