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 in SELECTION-SCREEN

Former Member
0 Likes
2,638

Hello All,

My requirement is : I display an ALV grid.Upon the click of a btn in ALV grid ,i need to show a dailog box which iam doing with a sel scrn as a window. But by default it displays additional buttons too in the toolbar. I tried to do it in the following way but it doesn't work. Kindly suggest , whats going wrong ??

AT SELECTION-SCREEN OUTPUT.

DATA itab TYPE TABLE OF sy-ucomm.

APPEND: 'PRIN' TO itab.

APPEND: 'SPOS' TO itab.

CASE sy-dynnr.

WHEN '0500'.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = 'SELECTION'

TABLES

p_exclude = itab.

ENDCASE.

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
1,401

Hi..

I think you are missing the program name in the FM.

The below code is working and it is hiding the functions SAVE and PRINT

Check out.

REPORT ZSEL_GUI .

parameters : p_dsn(30) DEFAULT 'EMP.TXT'.

DATA : V_STATUS TYPE SY-PFKEY VALUE 'SEL1',

V_rEPID TYPE SY-REPID.

AT SELECTION-SCREEN OUTPUT.

V_REPID = SY-REPID.

DATA itab TYPE TABLE OF sy-ucomm.

APPEND: 'PRIN' TO itab.

APPEND: 'SPOS' TO itab.

CASE sy-dynnr.

WHEN '1000'.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = V_STATUS

<b>P_PROGRAM = V_REPID "program where the GUI Status is created</b>TABLES

p_exclude = itab.

ENDCASE.

<b>Reward if Helpful</b>

Hello All,

My requirement is : I display an ALV grid.Upon the click of a btn in ALV grid ,i need to show a dailog box which iam doing with a sel scrn as a window. But by default it displays additional buttons too in the toolbar. I tried to do it in the following way but it doesn't work. Kindly suggest , whats going wrong ??

AT SELECTION-SCREEN OUTPUT.

DATA itab TYPE TABLE OF sy-ucomm.

APPEND: 'PRIN' TO itab.

APPEND: 'SPOS' TO itab.

CASE sy-dynnr.

WHEN '0500'.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = 'SELECTION'

TABLES

p_exclude = itab.

ENDCASE.

5 REPLIES 5
Read only

varma_narayana
Active Contributor
0 Likes
1,402

Hi..

I think you are missing the program name in the FM.

The below code is working and it is hiding the functions SAVE and PRINT

Check out.

REPORT ZSEL_GUI .

parameters : p_dsn(30) DEFAULT 'EMP.TXT'.

DATA : V_STATUS TYPE SY-PFKEY VALUE 'SEL1',

V_rEPID TYPE SY-REPID.

AT SELECTION-SCREEN OUTPUT.

V_REPID = SY-REPID.

DATA itab TYPE TABLE OF sy-ucomm.

APPEND: 'PRIN' TO itab.

APPEND: 'SPOS' TO itab.

CASE sy-dynnr.

WHEN '1000'.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = V_STATUS

<b>P_PROGRAM = V_REPID "program where the GUI Status is created</b>TABLES

p_exclude = itab.

ENDCASE.

<b>Reward if Helpful</b>

Read only

0 Likes
1,401

The Exclude functionality seems to wrk bit it doesn't display all the btn's now.

I want only two Btns i.e. Excute (ONLI) and Cancel (ECAN) . It displays only Cancel now ??

Read only

Former Member
0 Likes
1,401

The Exclude functionality seems to wrk bit it doesn't display all the btn's now.

I want only two Btns i.e. Excute (ONLI) and Cancel (ECAN) . It displays only Cancel now ??

Read only

Former Member
0 Likes
1,401

Hi,

You can try with this example code with group logic code, which you can hide the required elements.

********************************************************************************************

SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-002.

PARAMETERS: P_DOWN AS CHECKBOX.

PARAMETERS: P_FILE LIKE RLGRAP-FILENAME MODIF ID MOD.

SELECTION-SCREEN: END OF BLOCK B3.

********************************************************************************************

AT SELECTION-SCREEN OUTPUT.

IF P_DOWN = ' '.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MOD'.

SCREEN-ACTIVE = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

********************************************************************************************

This might help you to resolve your problem.

cheers,

Sagun Desai.

Read only

0 Likes
1,401

With that we can hide screen elements but not the ones in appl tool bar.