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: 

diabling subscreen

Former Member
0 Kudos

hi friends,

1) i have a main screen 100 and a subscreen 200 placed in a main screen.

2) i placed few buttons in sub screen.

3) i have MANUAL button on main screen.

initially this sub screen should not display i.e buttons in subscreen should not be displayed.

after clicking the MANUAL button only these buttons should be displayed i.e subscreen should diaplay.

plz help me with a sample code.

regards,

kat.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Kat,

Your requirement can be solved by creating another subscreen .

Let us assume ur main screen is 1000 , in that you place a blank subscreen say 2000 and you make another subscreen 3000 in which you place the buttons.

Now place the following codes :

In the top include you declare...


data :    var TYPE sy-repid VALUE '2000'.

Now in your main screen i.e. 1000 in the PBO part you call the subscreen like this :


PROCESS BEFORE OUTPUT.
  MODULE status_1000.
  CALL SUBSCREEN sub INCLUDING sy-repid VAR.

At this moment var is 2000 i.e.your blank subscreen.

Now when you press the button 'MANNUAL' in the PAI part you write:


CASE ok_code1000
    WHEN 'MANNUAL'.
          var = '3000'.

This will completely solve your rerquirement...

8 REPLIES 8

Former Member
0 Kudos

we can disable the all fields in subscreen but cannot hide the subscreen

0 Kudos

hi palani,

so, then i'll not use subscreen. then i'll place all the buttons in main screen.

then am i able to disable( i.e. no display) the buttons at least.

0 Kudos

You can hide a subscreen and all its contents just by not calling it in the PBO; call a dummy subscreen with nothing in it instead.

Former Member
0 Kudos

in main screen

PBO

Code in module:

If <condition>.

g_dynr = 0200.

else.

clear: g_dynnr.

endif.

end of module

call subscreen <subarea> including sy-repid g_dynnr.

PAI.

call subscreen <subarea>.

Edited by: Amit Gupta on Oct 15, 2008 9:50 AM

Edited by: Amit Gupta on Oct 15, 2008 9:51 AM

Former Member
0 Kudos

Hi Kat,

Your requirement can be solved by creating another subscreen .

Let us assume ur main screen is 1000 , in that you place a blank subscreen say 2000 and you make another subscreen 3000 in which you place the buttons.

Now place the following codes :

In the top include you declare...


data :    var TYPE sy-repid VALUE '2000'.

Now in your main screen i.e. 1000 in the PBO part you call the subscreen like this :


PROCESS BEFORE OUTPUT.
  MODULE status_1000.
  CALL SUBSCREEN sub INCLUDING sy-repid VAR.

At this moment var is 2000 i.e.your blank subscreen.

Now when you press the button 'MANNUAL' in the PAI part you write:


CASE ok_code1000
    WHEN 'MANNUAL'.
          var = '3000'.

This will completely solve your rerquirement...

0 Kudos

Hi Roy,

where do i place this subscreen '3000' either in main screen only.

i.e then both subscreens are placed in mainscreen. am i right.

0 Kudos

thank you roy very much.

Former Member
0 Kudos

Hi Kat,

No you need not place the subscreen '3000'...you just create it and call will be dynamic i.e.depending on the value you pass in var.

I have tried it and it works perfectly...

Just remember in your main screen there should be a blank sub-screen area. Whose value will be at begining 2000 defined by var in the top include.

In the example that I have given sub is the blank sub-screen area which will dynamically accept su-screens 2000 or 3000. Thats it.

Try it...

Regards

Debarshi