Application Development and Automation 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: 
Read only

Hide Buttons from Selection Screens

Former Member
0 Likes
1,482

Hello to all,

I want to hide various Button from selection screen.

For EG: Save,Back,All Selections,Get Variant,Cancel etc.

I have done by following code for above buttons:

AT SELECTION-SCREEN OUTPUT.

DATA : itab TYPE STANDARD TABLE OF rsexfcode WITH HEADER LINE.

  • SAVE Button

itab-fcode = 'SPOS'.

APPEND itab.

  • BACK Button

itab-fcode = 'E'.

APPEND itab.

  • Get Variant Button

itab-fcode = 'GET'.

APPEND itab.

  • CANCEL Button

itab-fcode = 'ECAN'.

APPEND itab.

CLEAR itab.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = '%_00'

p_program = sy-repid

TABLES

p_exclude = itab.

All I have done.Now I want to hide others also i.e

MENU and SYSTEM button but not able to did the same.

Please suggest.Answer will definetely be appreciate.

Best Regards,

Supriya.

Hello to all,

I want to hide various Button from selection screen.

For EG: Save,Back,All Selections,Get Variant,Cancel etc.

I have done by following code for above buttons:

AT SELECTION-SCREEN OUTPUT.

DATA : itab TYPE STANDARD TABLE OF rsexfcode WITH HEADER LINE.

  • SAVE Button

itab-fcode = 'SPOS'.

APPEND itab.

  • BACK Button

itab-fcode = 'E'.

APPEND itab.

  • Get Variant Button

itab-fcode = 'GET'.

APPEND itab.

  • CANCEL Button

itab-fcode = 'ECAN'.

APPEND itab.

CLEAR itab.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = '%_00'

p_program = sy-repid

TABLES

p_exclude = itab.

All I have done.Now I want to hide others also i.e

MENU and SYSTEM button but not able to did the same.

Please suggest.Answer will definetely be appreciate.

Best Regards,

Supriya.

4 REPLIES 4
Read only

Former Member
0 Likes
786

MENU and SYSTEM button are sap standard menu so it is not possible to hide that button..

if u have doubt u create ur own status in se41 by default u will be getting that 2 button..

Read only

0 Likes
786

Thanks for your reply,

Suppose I have created the customize PF Status the how can I call in a program. I can call for ALV report but how for the selection screen.

please suggest me.

Supriya.

Read only

0 Likes
786

if u create cust pf status, there also u will find this 2 button as default... it is not possible to hide it .

otherwise try like this ..

cxall ur selection screen as window (dialog box)so that u will not get any buttons

use this code to call selection screen

SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE tit1.

PARAMETERS: cityfr TYPE spfli-cityfrom,

cityto TYPE spfli-cityto.

SELECTION-SCREEN END OF BLOCK sel1.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.

SELECTION-SCREEN INCLUDE BLOCKS sel1.

SELECTION-SCREEN BEGIN OF BLOCK sel2

WITH FRAME TITLE tit2.

PARAMETERS: airpfr TYPE spfli-airpfrom,

airpto TYPE spfli-airpto.

SELECTION-SCREEN END OF BLOCK sel2.

SELECTION-SCREEN END OF SCREEN 500.

INITIALIZATION.

tit1 = 'Cities'.

AT SELECTION-SCREEN.

CASE sy-dynnr.

WHEN '0500'.

MESSAGE w888(SABAPDOCU) WITH 'Screen 500'.

WHEN '1000'.

MESSAGE w888(SABAPDOCU) WITH 'Screen 1000'.

ENDCASE.

START-OF-SELECTION.

tit1 = 'Cities for Airports'.

tit2 = 'Airports'.

CALL SELECTION-SCREEN 500 STARTING AT 10 10.

tit1 = 'Cities again'.

CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

Read only

0 Likes
786

Hi Supriya,

Your RS_SET_SELSCREEN_STATUS FM is used for that purpose(Setting our own status on selection screen) only... check its documentation..

AT SELECTION-SCREEN OUTPUT.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = 'BASIC'        " Custom PF-STATUS 
      p_program = sy-repid
    TABLES
      p_exclude = itab.