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

Hiding Selection screen blocks while clicking Application toolbar Buttons.

Former Member
0 Likes
719

Hi Experts,

I created three blocks in a selection screen. In application toolbar three buttons are present. If user hits u2018Button 1u2019 then block 2 & block 3 will not display in selection screen.

Similarly, if user hits u2018Button 2u2019 then block 1 & 3 & if he hits u2018Button 3u2019 then block 1 & 2 should not display.

Also there is one more button as u2018REFRESHu2019 so that if user selects that option then all above mentioned blocks should be display.

I tried with Modify screen and at user-command options. But still the issue is not Resolved.

Please suggest any pointers on this.

Thanks in advance.

Regards,

Murali

1 ACCEPTED SOLUTION
Read only

former_member203501
Active Contributor
0 Likes
695

hi see this simple code....this is similar to that what u wanted..

*Selection Screen 2

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

PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,

SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.

SELECTION-SCREEN END OF BLOCK B2.

*Selection Screen 3

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

PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,

UPDATE DEFAULT 'X' MODIF ID BL1.

SELECTION-SCREEN END OF BLOCK B3.

*Selection Screen 4

SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.

PARAMETERS: SES_NAM TYPE APQI-GROUPID MODIF ID BL2,

KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,

LOC_DATE TYPE SY-DATUM MODIF ID BL2,

USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.

SELECTION-SCREEN END OF BLOCK B4.

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

  • At Selection-Screen Output *

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

AT SELECTION-SCREEN OUTPUT.

IF SESSION = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'BL1'.

SCREEN-ACTIVE = '0'.

ENDIF.

IF SCREEN-GROUP1 = 'BL2'.

SCREEN-ACTIVE = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

Hi Experts,

I created three blocks in a selection screen. In application toolbar three buttons are present. If user hits u2018Button 1u2019 then block 2 & block 3 will not display in selection screen.

Similarly, if user hits u2018Button 2u2019 then block 1 & 3 & if he hits u2018Button 3u2019 then block 1 & 2 should not display.

Also there is one more button as u2018REFRESHu2019 so that if user selects that option then all above mentioned blocks should be display.

I tried with Modify screen and at user-command options. But still the issue is not Resolved.

Please suggest any pointers on this.

Thanks in advance.

Regards,

Murali

4 REPLIES 4
Read only

Former Member
0 Likes
695

At selection-screen output.

case sy-ucomm.

when '<Func code for button 1>'.

loop at screen.

if screen-group = '<Name of Block1>'.

screen-input = 1.

screen-active = 1.

else.

screen-output = 0.

endif.

modify screen.

endloop.

endcase.

Read only

Former Member
0 Likes
695
*Block 1---------------------------
Selection-screen begin of block b1.
Selection-screen end of block b1.
*Block 2---------------------------
Selection-screen begin of block b2.
Selection-screen end of block b2.
*Block 3---------------------------
Selection-screen begin of block b3.
Selection-screen end of block b3

AT selection-screen output.
Case SY-Ucomm.
When Button1.
Loop at screen.
If Screen-name CS 'B2'.
Screen-active = '0'.
ENDIF.
If Screen-name CS 'B3'.
Screen-Active = '0'.
Endif.
Modify Screen.
Endloop.
When Button2.
Hide B1,B3.
When Button 3.
Hide B1,B2.
When Refresh.
Display ALL..
ENDCASE.

Regards,

Gurpreet

Read only

former_member203501
Active Contributor
0 Likes
696

hi see this simple code....this is similar to that what u wanted..

*Selection Screen 2

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

PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,

SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.

SELECTION-SCREEN END OF BLOCK B2.

*Selection Screen 3

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

PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,

UPDATE DEFAULT 'X' MODIF ID BL1.

SELECTION-SCREEN END OF BLOCK B3.

*Selection Screen 4

SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.

PARAMETERS: SES_NAM TYPE APQI-GROUPID MODIF ID BL2,

KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,

LOC_DATE TYPE SY-DATUM MODIF ID BL2,

USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.

SELECTION-SCREEN END OF BLOCK B4.

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

  • At Selection-Screen Output *

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

AT SELECTION-SCREEN OUTPUT.

IF SESSION = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'BL1'.

SCREEN-ACTIVE = '0'.

ENDIF.

IF SCREEN-GROUP1 = 'BL2'.

SCREEN-ACTIVE = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

Read only

0 Likes
695

Hi all,

Thanks a lot for your immediate response.

The problem is solved.

Regards,

Murali