Before you read this instructional exercise ensure you what a Dialog Program is …
A subscreen is a free screen that is shown in a space of another ("principal") screen.Subscreens permit you to insert one screen inside one more at runtime. You can remember numerous sub-evaluates for primary screen.The term subscreen applies both to the screen that you implant, and the region on the principal screen in which you place it. This instructional exercise is about subscreen regions. The genuine screens made through SE51 exchange, are called subscreen screens in the event that characterized in screen credits.At the point when you utilize a subscreen, the stream rationale of the implanted screen is likewise installed in the stream rationale of the primary screen.Hence, Using subscreens on screens is like utilizing remembers for ABAP programs.
To utilize a subscreen, you should follow three straightforward advances
Characterize the subscreen area(s) on a screen
Characterize reasonable subscreen screens
Incorporate the subscreen screen in the subscreen region.
Likewise, you want to change the edge of sub-screen and fundamental screen. You want to name it in the field name field.Further, you likewise need to change the fields inside the subscreen to cause them to show up in primary screen. On the off chance that the sub-screen is characterized to be bigger than the accessible region in the principal screen, just the piece of subscreen will be noticeable that fits in the region accessible. The region is constantly estimated from the upper left corner of screen. Thus you ought to take sufficient consideration while characterizing sub-screen regions and making sub-screens.
For example here we have characterized two sub-screen regions on primary screen and have connected two different Sub-screen to comparing regions. At the point when principal screen is called, the PBO of fundamental screen is called. Be that as it may, before show, the PBO's of each screen joined with sub-screen regions on fundamental screen are likewise called.
ABAP Subscreens Tutorial: Call Subscreen in SAP
You can incorporate a subscreen screen involving the CALL SUBSCREEN proclamation in the stream rationale of the fundamental screenTo incorporate a subscreen screen in the subscreen region of the primary screen and call its PBO stream rationale, utilize the accompanying assertion in the PBO occasion of the principal screen:This assertion doles out the subscreen screen with number <dynp> to the subscreen region called <area>. You can likewise determine the program where the subscreen screen is characterized (discretionary). On the off chance that you don't determine the program unequivocally, the framework searches for the subscreen screen in a similar ABAP program as the fundamental program. On the off chance that it doesn't find a relating subscreen screen, a runtime mistake happens. The PBO stream rationale of the subscreen screen is additionally included at a similar point. This can call PBO modules of the ABAP program in which the subscreen screen is characterized. Toward the finish of the subscreen PBO, the worldwide fields from the program are passed to any indistinguishably named screen fields in the subscreen screen. The PBO stream rationale of the subscreen screen could itself at any point incorporate further subscreens.The name <area> of the subscreen region should be placed straightforwardly without transformed commas. You can determine the names <prog> and <dynp> either as literals or factors. Assuming that you use factors, you should proclaim and fill indistinguishably named factors in the ABAP program. The screen number <dynp> should be 4 characters in length. In the event that you don't dole out a subscreen screen to an area, it stays unfilled.
To call the PAI stream rationale of the subscreen screen, utilize the accompanying assertion in the PAI stream rationale of the principal screen:
This assertion incorporates the PAI stream rationale of the subscreen screen remembered for the subscreen region <area> in the PBO occasion. This can call PAI modules of the ABAP program in which the subscreen screen is characterized. Information is shipped between indistinguishably named fields in the subscreen screen and the ABAP program either when the PAI occasion is set off, or at the relating FIELD proclamations in the PAI stream rationale of the subscreen screen.
Focuses to Remember
Names of components of sub-screens inside a screen ought to be novel
You shouldn't have OK_CODE or FCODE connected with sub-screen. The OK_CODE of primary screen itself is OK_CODE of sub-screen
Sub-screens can't have any exchange modules containing SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN or LEAVE TO SCREEN. This will cause runtime mistake.
You really want to call it in the stream rationale (both PBO and PAI) of the primary screen.
CALL SUBSCREEN isn't permitted in CHAIN..ENDCHAIN and LOOP ENDLOOP articulations
Can not have an AT EXIT-COMMAND module
The fields that you use are the worldwide fields. They should be announced in the top incorporate
In the event that utilizing subscreens from another discourse program the information move won't occur except if you add explicit code.