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

sub screen

Former Member
0 Likes
1,158

PROCESS BEFORE OUTPUT.

CALL SUBSCREEN <subarea>

INCLUDING <program_name> <dynpro_number>.

PROCESS AFTER INPUT.

CALL SUBSCREEN <subarea>.

Why CALL SUBSCREEN is used both in PBO and PAI??

4 REPLIES 4
Read only

prasanth_kasturi
Active Contributor
0 Likes
1,019

Hi,

in PBO we use that so befor the screen is displayed the subscreen area will be dispalyed(contents like table control etc we donot have a empty one)

in PAI for suppose we want to update or do any other we use it

example you have a tabstrip and in the one of tabs you update the database if we donot subscreen in PAI it will not be updated

for more help check this link

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm

regards

prasanth

Edited by: prasanth kasturi on Jun 10, 2008 3:26 PM

Read only

Former Member
0 Likes
1,019

PROCESS BEFORE OUTPUT.

...

CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.

...

This statement assigns the subscreen screen with number <dynp> to the subscreen area called <area>. With <prog> you must specify the ABAP program in which the subscreen screen is defined. If it does not find a corresponding subscreen screen, a runtime error occurs. The PBO flow logic of the subscreen screen is also included at the same point. This can call PBO modules of the ABAP program in which the subscreen screen is defined. At the end of the subscreen PBO, the global fields from the program are passed to any identically-named screen fields in the subscreen screen. The PBO flow logic of the subscreen screen can itself include further subscreens.

The name <area> of the subscreen area must be entered directly without inverted commas. You can specify the names <prog> and <dynp> either as literals or variables. If you use variables, you must declare and fill identically-named variables in the ABAP program. The screen number <dynp> must be 4 characters long. If you do not assign a subscreen screen to an area, it remains empty.

To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:

PROCESS AFTER INPUT.

...

CALL SUBSCREEN <area>.

...

This statement includes the PAI flow logic of the subscreen screen included in the subscreen area <area> in the PBO event. This can call PAI modules of the ABAP program in which the subscreen screen is defined. Data is transported between identically-named fields in the subscreen screen and the ABAP program either when the PAI event is triggered, or at the corresponding FIELD statements in the PAI flow logic of the subscreen screen.

You cannot place the CALL SUBSCREEN statement between CHAIN and ENDCHAIN or LOOP and ENDLOOP (see table controls). While a subscreen screen is being processed, the system field SY-DYNNR contains its screen number. Its contents therefore change when the CALL SUBSCREEN statement occurs and when you return to the main screen.

When you use subscreen screens, remember that the data from their input/output fields is transported to and from the programs in which they are defined. The function codes of user actions on the screen, on the other hand, are always placed in the OK_CODE field of the main screen, and transported into the program in which it is defined. You should therefore name the function codes of your subscreen screens differently from those of the main screen.

If, for encapsulation reasons, you define subscreen screens in other ABAP programs, you must ensure that the required global data of your ABAP programs is transported into the program of the calling screen after you have called their PAI flow logic.

For example, you can define subscreen screens in function groups and pass their global data to and from function module parameters. You must then call the function modules in appropriate dialog modules in the main program to transport the data.

You can also export the global data from the main program as a data cluster to ABAP memory before the PBO of a subscreen screen and import it into a PBO module of the subscreen.

For Example

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm

Regards,

Jagadish

Read only

Former Member
0 Likes
1,019

HI,

To display your subscreen when the Screen is called evrey time for display

we need to call this subscreen in PBO.

If u change Something in PAI or want to interact with the subscreen. it is called in PAI to capture the event.

Regards

Sandipan

Read only

0 Likes
1,019

but why full syntax is not given for SUBSCREEN in PAI..?

thank u all.