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

calling a subscreen in selection screen

former_member196517
Contributor
0 Likes
2,391

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

4 REPLIES 4
Read only

Former Member
0 Likes
875

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.

Read only

0 Likes
875

Hello Bharat,

i have created a subscreen before i mean using screen painter.. can i call this in selection screen

Regards

Anuj

Read only

daixiong_jiang3
Active Participant
0 Likes
875

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.

Read only

Former Member
0 Likes
875

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.