2007 Dec 10 4:42 AM
Hi Colleagues,
can you please let me know how can i call subscreen or embed a subscreen into selection screen... is there any way..
Regards
Anuj Goyal
Hi Colleagues,
can you please let me know how can i call subscreen or embed a subscreen into selection screen... is there any way..
Regards
Anuj Goyal
2007 Dec 10 4:51 AM
HI,
see this code.
TABLES:SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 2001 AS SUBSCREEN.
PARAMETERS:NAME(6) TYPE C DEFAULT 'BHARAT'.
SELECTION-SCREEN END OF SCREEN 2001.
SELECTION-SCREEN BEGIN OF SCREEN 2002 AS SUBSCREEN.
PARAMETERS:NUM(2) TYPE N DEFAULT 10.
SELECTION-SCREEN END OF SCREEN 2002.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 4 LINES.
SELECTION-SCREEN TAB (6) tabs1 USER-COMMAND ucomm1
DEFAULT SCREEN 2001.
SELECTION-SCREEN TAB (6) tabs2 USER-COMMAND ucomm2
DEFAULT SCREEN 2002.
SELECTION-SCREEN END OF BLOCK tabb1.
WRITE:/ NAME,NUM.
INITIALIZATION.
tabs1 = TEXT-001.
tabs2 = TEXT-002.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'UCOMM1'.
tabb1-prog = SY-CPROG.
tabb1-dynnr = 2001.
tabb1-activetab = 'TABLE1'.
WHEN 'UCOMM2'.
tabb1-prog = SY-CPROG.
tabb1-dynnr = 2002.
tabb1-activetab = 'TABLE2'.
ENDCASE.
rgds,
bharat.
2007 Dec 10 5:54 AM
Hello Bharat,
i have created a subscreen before i mean using screen painter.. can i call this in selection screen
Regards
Anuj
2007 Dec 10 4:54 AM
at first,when you define the screen,you must choose the SCREEN TYPE 'SUBSCREEN'.
then, use the following statement in the PBO module:
CALL SUBSCREEN sub_area INCLUDING prog dynnr.
use the following statement in the PAI module:
CALL SUBSCREEN sub_area.
for example:
PROCESS BEFORE OUTPUT.
MODULE prepare_tabstrip.
CALL SUBSCREEN sub INCLUDING sy-repid dynnr.
PROCESS AFTER INPUT.
CALL SUBSCREEN sub.
MODULE handle_user_command.
2007 Dec 10 4:57 AM
Subscreen is a part of another screen. This means that you must define a sufficiently large area in the superior screen and ensure that the flow logic contains a CALL SUBSCREEN ... call in the PB0 and PAI. This call causes the PB0 or PAI part of the subscreen flow logic to be processed.
A screen can contain several subscreens in different areas. You can control the call dynamically, so that the subscreen used does not need to be defined until the transaction is processed.
A subscreen can be called in several screens.
you should call subscreenn not inside of pbo
just call it outside
like this
PROCESS BEFORE OUTPUT.
MODULE STATUS_100.
CALL SUBSCREEN: AREA1 INCLUDING SY-REPID NUMBER1,
AREA2 INCLUDING SY-REPID NUMBER2.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE SAVE_OK.
CALL SUBSCREEN: AREA1,
AREA2.
MODULE USER_COMMAND_100.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |