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 a SubScreen

madhu_reddy22
Participant
0 Likes
1,141

HI Guyz,

i have used the following code for hiding the subscreen. but it is not working. Please help me.

The code in the Flow logic is :

PROCESS BEFORE OUTPUT.

  • general infotype-independent operations

MODULE BEFORE_OUTPUT.

CALL SUBSCREEN subscreen_empl INCLUDING empl_prog empl_dynnr.

CALL SUBSCREEN subscreen_header INCLUDING header_prog header_dynnr.

  • infotype specific operations

MODULE P9667.

CALL SUBSCREEN SUBSCREEN_9667 INCLUDING 'MP966700' '0200'.

CALL SUBSCREEN SUBSCREEN_TC9667 INCLUDING 'MP966700' '0100'.

MODULE subcreen_hide.

MODULE HIDE_FIELDS1.

MODULE HIDDEN_DATA.

i have written the module for hiding the subscreen in the main program as follows

MODULE subcreen_hide OUTPUT.

if p9667-subty = '1'.

loop at screen.

if screen-name = 'SUBSCREEN_9667'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

if p9667-subty = '2'.

loop at screen.

if screen-name = 'SUBSCREEN_TC9667'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

ENDMODULE.

when i select subtype1 subscreen_9667 should not be displayed

and when i select subtype2 subscreen_tc9667 should not be displayed.

there is no difference before and after writing the module subscreen _hide. either ways both the subscreens are displayed for both the subtypes.

HI Guyz,

i have used the following code for hiding the subscreen. but it is not working. Please help me.

The code in the Flow logic is :

PROCESS BEFORE OUTPUT.

  • general infotype-independent operations

MODULE BEFORE_OUTPUT.

CALL SUBSCREEN subscreen_empl INCLUDING empl_prog empl_dynnr.

CALL SUBSCREEN subscreen_header INCLUDING header_prog header_dynnr.

  • infotype specific operations

MODULE P9667.

CALL SUBSCREEN SUBSCREEN_9667 INCLUDING 'MP966700' '0200'.

CALL SUBSCREEN SUBSCREEN_TC9667 INCLUDING 'MP966700' '0100'.

MODULE subcreen_hide.

MODULE HIDE_FIELDS1.

MODULE HIDDEN_DATA.

i have written the module for hiding the subscreen in the main program as follows

MODULE subcreen_hide OUTPUT.

if p9667-subty = '1'.

loop at screen.

if screen-name = 'SUBSCREEN_9667'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

if p9667-subty = '2'.

loop at screen.

if screen-name = 'SUBSCREEN_TC9667'.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

ENDMODULE.

when i select subtype1 subscreen_9667 should not be displayed

and when i select subtype2 subscreen_tc9667 should not be displayed.

there is no difference before and after writing the module subscreen _hide. either ways both the subscreens are displayed for both the subtypes.

4 REPLIES 4
Read only

kathryn_mcgallicher
Active Participant
0 Likes
877

Hello,

You may need to set all fields within the subscreen to active = 0 in order to hide the entire subscreen.

K---

Read only

0 Likes
877

Hi,

the 2 subscreens have table controls. when i hide the tables the area used by the table remains in place.so when i call the second subscreen which is below the first subscreen the area covered by the first subscreen remains unused. so i thought if i hide the subscreen it might work properly.

Read only

kathryn_mcgallicher
Active Participant
0 Likes
877

Hello,

I have not tried hiding a subscreen that contains a table control.

If you can hide the table, but it leaves the subscreen behind, maybe there is one more attribute that needs to be set active = 0?

There is a table controls attribute field called "Reaction" that offers the choices of Show and Hide, but I could not locate any documentation on what it is used for.

Good luck! Sorry I could not be of assistance.

K----

Read only

0 Likes
877

If you look in transaction "BIBS" (demo dynpros) there is an example there of using collapsible areas which might suit your purpose (code is in function group EXAMPLE_ENTRY_SCREEN)... here SAP have used one main screen (2200) which then uses one of 4 subscreens, one for each state the screen might be in e.g. 2240 has area 1 open, area 2 closed, 2260 has both closed etc etc.