Application Development 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: 

how to hide subscreen in module pool

Former Member
0 Kudos

hello expert.

i created one Box, and inside box i created one subscreen in Module pool ->layout.and two radio button out side of the Box.

if i select 2nd radio button , want to hide subscreen.

how to hide subscreen. could you please send me the solution asap , it's urgent.

i written below code but not working.

LOOP AT SCREEN.

IF rad2 Eq 'X'

IF SCREEN-NAME = 'SUB1' .

SCREEN-INPUT = 0.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Regards

srinivas

8 REPLIES 8

Former Member
0 Kudos

Hi,

when ur condition satisfies call an empty screen on the subscreen

i.e if r_but eq 'X'.

call screen 100. (empty screen)

endif.

Plzz reward points if it helps.

0 Kudos

In my layout i have 8 radio buttons, 2 subscreen in diff box, 10 input fields and pushbuttons.

Calling blank screen will not work, because we will lose actual screen and everything.

regards

srinivas

0 Kudos

Hi,

when u want hide the subscreen means then also we will get empty screen only right.

or tell me the exact requirement.

0 Kudos

example:

BOX1

MATNR [ ] (Normal screen)

BOX2

BOM [ BOM-OW] TO [BOM-HIGH] (subscreen)

BOX3

radio buttons

push button

selection screnn etc..

if i selection 2nd radio button i will get.

BOX1

MATNR [ ] (Normal screen)

BOX2

empty

BOX3

radio buttons

push button

selection screnn etc..

my requirement is:

BOX1

MATNR [ ] (Normal screen)

BOX3

radio buttons

push button

selection screnn etc..

Former Member
0 Kudos

You need to do

screen-active = 0.

and then modify screen.

0 Kudos

hi ,

try this..

at first use.... screen-active = 0. 'this will make ur screen editable

then use a push button and wite the code in pai module ..

LOOP AT SCREEN.

IF rad2 Eq 'X'

IF SCREEN-NAME = 'SUB1' .

SCREEN-INPUT = 0.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

0 Kudos

Hi Srinivas,

The code that you have written is perfect. Only thing is maintain a screen group say 'G1' for al the elements in the subscreen that needs to be hidden. If I assume that the subscreen is SUB1, then maintain the screen group as G1 in the screen layout for all the screen elements of SUB1. Then use the code below:-

if rb_2 eq 'X'.

loop at screen.

if screen-group1 = 'G1'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

This code needs to be written under the PBO of the subscreen SUB1 and after selecting the radio button 2 press 'Enter' on keyboard to trigger the PAI from where this subscreen is being called.

Edited by: remitra_cap on Nov 21, 2011 11:26 AM

former_member1245113
Active Contributor
0 Kudos

Hello,

In Flow Logic

CALL SUBSCREEN SUB1 USING SY-REPID DYNPRO  " iN Top Include declare 2 variables
CALL SUBSCREEN SUB2 USING SY-REPID DYNPRO1


Create dummy screens without screen elements
In Program based on the Radio button selected 


Make sure you assign a Fucntion Code (Ofcourse Define the Radio Button Grouping)
" For more info on Radio Button groupong in Screen Search the Forum

if R1 = 'X'.  " A Radio button is selected
dynpro = '2000'    " Actual Screen with screen elements
dynrpo1 = '3000'  " Actual Screen with screen eleemtns
esle.
dynpro == '4000'. "Dummy Screens
dynpro1 = '5000'.   " Dymmy Screen
endif.  " Loop at screen will not serve your purpose here

Cheerz

Ramchander Rao.K