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 Subscreen

madhu_reddy22
Participant
0 Likes
993

HI Guys ,

i have a screen in which i have 2 subscreens.i am trying to hide the subscreen based on a condition. i am using the following code

MODULE subcreen_hide OUTPUT.

if p9667-subty = '1'.

CALL SUBSCREEN SUBSCREEN_9667 INCLUDING 'MP966700' '0200'.

endif.

if p9667-subty = '2'.

CALL SUBSCREEN SUBSCREEN_TC9667 INCLUDING 'MP966700' '0100'.

endif.

ENDMODULE. " subcreen_hide OUTPUT

i get the following error.

"." or "ID ... FIELD ..." expexted after "SUBSCREEN".

Can some one tell me what syntax should i be using to hide the subscreen

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
835

I don't think you can use the CALL SUBSCREEN within the MODULE, it must be inside the screen flow logic of the screen. In order to make this work, you need to set the screen number dynamically in the screen flow logic. Or you may even need to set a dummy subscreen with nothing in it for the subscreen not being used.

Regards,

Rich Heilman

HI Guys ,

i have a screen in which i have 2 subscreens.i am trying to hide the subscreen based on a condition. i am using the following code

MODULE subcreen_hide OUTPUT.

if p9667-subty = '1'.

CALL SUBSCREEN SUBSCREEN_9667 INCLUDING 'MP966700' '0200'.

endif.

if p9667-subty = '2'.

CALL SUBSCREEN SUBSCREEN_TC9667 INCLUDING 'MP966700' '0100'.

endif.

ENDMODULE. " subcreen_hide OUTPUT

i get the following error.

"." or "ID ... FIELD ..." expexted after "SUBSCREEN".

Can some one tell me what syntax should i be using to hide the subscreen

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
836

I don't think you can use the CALL SUBSCREEN within the MODULE, it must be inside the screen flow logic of the screen. In order to make this work, you need to set the screen number dynamically in the screen flow logic. Or you may even need to set a dummy subscreen with nothing in it for the subscreen not being used.

Regards,

Rich Heilman

Read only

0 Likes
835

HI Rich,

i have used like this.

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.

Read only

jaideeps
Product and Topic Expert
Product and Topic Expert
0 Likes
835

hi madhu,

i dnt knw how to hide subscreen..but i will tell my views..

instead of hiding call a blank subscreen...so by this way can satisfy the hiding concept..

thanks

jaideep

*if<helpful>

reward points