Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Enabling and disabling an status button.

Hi......................

i send one prog of deactive print and save icon..... but i want this icon or button at runtime when i click on display button...... so which function module i used for activeted this print, save or my own button of ths this requirement.................

REPORT demo_sel_screen_status.

DATA itab TYPE TABLE OF sy-ucomm.

PARAMETERS test(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.

APPEND: 'PRIN' TO itab,

'SPOS' TO itab.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = sy-pfkey

TABLES

p_exclude = itab.

In this example, the Print and Save as variant functions are deactivated. To find out the function codes of the standard GUI status, choose System ® Status and double-click the GUI status field.

Jigar

Tags:
Former Member
Former Member replied

Hi,

Check your modified code..WHen you press display..the update button will show..

***********Naren changes
DATA: itab TYPE STANDARD TABLE OF syucomm WITH HEADER LINE.
DATA: v_display.
TABLES: sscrfields.
PARAMETERS: p_matnr.
***********Naren changes End

SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN FUNCTION KEY 2.
SELECTION-SCREEN FUNCTION KEY 3.

INITIALIZATION.
  MOVE 'DISPLAY' TO sscrfields-functxt_01.
  MOVE 'DELETE' TO sscrfields-functxt_02.
  MOVE 'UPDATE' TO sscrfields-functxt_03.

  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
       EXPORTING
            p_status  = sy-pfkey
       TABLES
            p_exclude = itab.

AT SELECTION-SCREEN OUTPUT.

***********Naren changes
  REFRESH: itab.
***********Naren changes End.

  APPEND 'ONLI' TO itab.
***********Naren changes
  IF v_display <> 'X'.
    APPEND 'FC03' TO itab.
  ENDIF.
***********Naren changes End.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
       EXPORTING
            p_status  = sy-pfkey
       TABLES
            p_exclude = itab.
  v_display = ' '.

***********Naren changes
AT SELECTION-SCREEN.

  IF sy-ucomm = 'FC01'.
    v_display = 'X'.
  ENDIF.
***********Naren changes End.

Thanks

Naren

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question