2007 Jul 13 4:04 PM
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
2007 Jul 13 4:21 PM
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
2007 Jul 13 4:21 PM
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
2007 Jul 13 4:49 PM
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.
2007 Jul 13 4:29 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |