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
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 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.