<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Subscren in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493443#M840194</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A demo program to create subscreen in your ABAP Program &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This report will display the user last login date and time. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subscreen selection 1 : User Name &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                               2 : Last Login Date &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                               3 : Class Belong To &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Written by : SAP Basis, ABAP Programming and Other IMG Stuff &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   &lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt; &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZSUBSCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: USR02,       "Logon data&lt;/P&gt;&lt;P&gt;        SSCRFIELDS.  "FIELDS ON SELECTION SCREENS&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: USERNAME FOR USR02-BNAME.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B2.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B3.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN: FUNCTION KEY 1,&lt;/P&gt;&lt;P&gt;                  FUNCTION KEY 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,&lt;/P&gt;&lt;P&gt;                  END OF BLOCK SUB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;    SELECT * FROM USR02 WHERE BNAME IN USERNAME&lt;/P&gt;&lt;P&gt;                          AND ERDAT IN LASTLOGI&lt;/P&gt;&lt;P&gt;                          AND CLASS IN CLASSTYP.&lt;/P&gt;&lt;P&gt;       WRITE: / 'User ', USR02-BNAME,&lt;/P&gt;&lt;P&gt;                'Last Login Date ', USR02-TRDAT,&lt;/P&gt;&lt;P&gt;                'Last Login Time ', USR02-LTIME,&lt;/P&gt;&lt;P&gt;                'CLASS ', USR02-CLASS.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SCREEN ICON LEFT AND RIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SSCRFIELDS-FUNCTXT_01 = '@0D@'.&lt;/P&gt;&lt;P&gt;  SSCRFIELDS-FUNCTXT_02 = '@0E@'.&lt;/P&gt;&lt;P&gt;  SUB-PROG = SY-REPID.&lt;/P&gt;&lt;P&gt;  SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  CASE SY-DYNNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 100.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 300.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 200.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 200.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 300.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 300.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 200.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 10:11:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-05T10:11:14Z</dc:date>
    <item>
      <title>Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493440#M840191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;What is the property of subscreen ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493440#M840191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493441#M840192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this: &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/b5/1fd4e83a5a11d596a200a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/b5/1fd4e83a5a11d596a200a0c94260a5/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493441#M840192</guid>
      <dc:creator>divya_nayudu</dc:creator>
      <dc:date>2008-03-05T10:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493442#M840193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens allow you to expand the content of a screen dynamically at runtime. For example, screen exits, which are part of the enhancement concept, use the subscreen technique. Some complex screen elements, like tabstrip controls, also use them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use a subscreen, you must:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define the subscreen area(s) on a screen&lt;/P&gt;&lt;P&gt;Define suitable subscreen screens&lt;/P&gt;&lt;P&gt;Include the subscreen screen in the subscreen area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Subscreen Areas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You define subscreen areas using the Screen Painter in the layout of the screen on which you want to embed a subscreen. Each subscreen area on a screen has a unique name, and a position, length, and height. Subscreen areas may not overlap either with each other or with other screen elements. You can also specify whether a subscreen area can be resized vertically or horizontally when the user resizes the window. If the area supports resizing, you can specify a minimum size for it. If the resizing attributes are selected, the PAI event is triggered whenever the user resizes the main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Subscreen Screens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens. However, the following restrictions apply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should arrange the screen elements so that they are not truncated if a subscreen area is too small.&lt;/P&gt;&lt;P&gt;If you want to create several subscreen screens in an ABAP program, you should make sure that the individual screen elements have names unique among the subscreens. If the subscreen screens belong to the same program as the main screen, you should also make sure that names are not used twice there. Otherwise, you must separate data transported from the screen in your ABAP program after each user action (see example).&lt;/P&gt;&lt;P&gt;Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen.&lt;/P&gt;&lt;P&gt;The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.&lt;/P&gt;&lt;P&gt;The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen.&lt;/P&gt;&lt;P&gt;You can also define selection screens as subscreens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Including Subscreen Screens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You include a subscreen screen using the CALL SUBSCREEN statement in the flow logic of the main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN &amp;lt;area&amp;gt; INCLUDING &amp;lt;prog&amp;gt; &amp;lt;dynp&amp;gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement assigns the subscreen screen with number &amp;lt;dynp&amp;gt; to the subscreen area called &amp;lt;area&amp;gt;. With &amp;lt;prog&amp;gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The name &amp;lt;area&amp;gt; of the subscreen area must be entered directly without inverted commas. You can specify the names &amp;lt;prog&amp;gt; and &amp;lt;dynp&amp;gt; either as literals or variables. If you use variables, you must declare and fill identically-named variables in the ABAP program. The screen number &amp;lt;dynp&amp;gt; must be 4 characters long. If you do not assign a subscreen screen to an area, it remains empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN &amp;lt;area&amp;gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement includes the PAI flow logic of the subscreen screen included in the subscreen area &amp;lt;area&amp;gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_subscreens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;DATA: number1(4) TYPE n VALUE '0110',&lt;/P&gt;&lt;P&gt;number2(4) TYPE n VALUE '0130',&lt;/P&gt;&lt;P&gt;field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;MODULE status_100 OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0110 OUTPUT.&lt;/P&gt;&lt;P&gt;field = 'Eingabe 1'(001).&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0120 OUTPUT.&lt;/P&gt;&lt;P&gt;field = field1.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0130 OUTPUT.&lt;/P&gt;&lt;P&gt;field = 'Eingabe 2'(002).&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0140 OUTPUT.&lt;/P&gt;&lt;P&gt;field = field2.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE save_ok INPUT.&lt;/P&gt;&lt;P&gt;save_ok = ok_code.&lt;/P&gt;&lt;P&gt;CLEAR ok_code.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0110 INPUT.&lt;/P&gt;&lt;P&gt;IF save_ok = 'OK1'.&lt;/P&gt;&lt;P&gt;number1 = '0120'.&lt;/P&gt;&lt;P&gt;field1 = field.&lt;/P&gt;&lt;P&gt;CLEAR field.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0130 INPUT.&lt;/P&gt;&lt;P&gt;IF save_ok = 'OK2'.&lt;/P&gt;&lt;P&gt;number2 = '0140'.&lt;/P&gt;&lt;P&gt;field2 = field.&lt;/P&gt;&lt;P&gt;CLEAR field.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_100 INPUT.&lt;/P&gt;&lt;P&gt;CASE save_ok.&lt;/P&gt;&lt;P&gt;WHEN 'SUB1'.&lt;/P&gt;&lt;P&gt;number1 = '0110'.&lt;/P&gt;&lt;P&gt;WHEN 'SUB2'.&lt;/P&gt;&lt;P&gt;number1 = '0120'.&lt;/P&gt;&lt;P&gt;CLEAR field1.&lt;/P&gt;&lt;P&gt;WHEN 'SUB3'.&lt;/P&gt;&lt;P&gt;number2 = '0130'.&lt;/P&gt;&lt;P&gt;WHEN 'SUB4'.&lt;/P&gt;&lt;P&gt;number2 = '0140'.&lt;/P&gt;&lt;P&gt;CLEAR field2.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next screen number of screen 100 is 100 (statically-defined). Its layout is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are four pushbuttons with the function codes SUB1 to SUB4, and two subscreen areas AREA1 and AREA2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same ABAP program, there are four subscreen screens 110 to 140. Each of these fits the subscreen area exactly. The layout is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The input/output field of all four subscreen screens has the name FIELD. The function codes of the pushbuttons on the subscreen screens 110 and 130 are OK1 and OK2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic for screen 100 is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE status_100.&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN: area1 INCLUDING sy-repid number1,&lt;/P&gt;&lt;P&gt;area2 INCLUDING sy-repid number2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;MODULE cancel AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;MODULE save_ok.&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN: area1,&lt;/P&gt;&lt;P&gt;area2.&lt;/P&gt;&lt;P&gt;MODULE user_command_100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic of subscreen screens 110 and 130 is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE fill_0110|0130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;MODULE user_command_0110|0130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic of subscreen screens 120 and 140 is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE fill_0120|0150.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you run the program, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main screen allow you to choose between two subscreen screens for each screen area. The pushbuttons on the subscreens allow you to transfer the data from subscreens 110 and 130 to subscreens 120 and 140.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the same field name FIELD is used on all subscreens, the identically-named ABAP field is transferred more than once in each PBO and PAI event of the main screen. For this reason, the values have to be stored in the auxiliary fields FIELD1 and FIELD2 in the ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The pushbuttons on the subscreen screens have different function codes, and they are handled normally in an ABAP field. If the function codes had had the same names, it would again have been necessary to use auxiliary fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this link.&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw04/helpdata/en/bd/79b2370f9cbe68e10000009b38f8cf/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dhruv Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493442#M840193</guid>
      <dc:creator>dhruv_shah3</dc:creator>
      <dc:date>2008-03-05T10:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493443#M840194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A demo program to create subscreen in your ABAP Program &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This report will display the user last login date and time. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subscreen selection 1 : User Name &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                               2 : Last Login Date &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                               3 : Class Belong To &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Written by : SAP Basis, ABAP Programming and Other IMG Stuff &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   &lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt; &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZSUBSCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: USR02,       "Logon data&lt;/P&gt;&lt;P&gt;        SSCRFIELDS.  "FIELDS ON SELECTION SCREENS&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: USERNAME FOR USR02-BNAME.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B2.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SUBSCREEN 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.&lt;/P&gt;&lt;P&gt;   SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B3.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN: FUNCTION KEY 1,&lt;/P&gt;&lt;P&gt;                  FUNCTION KEY 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,&lt;/P&gt;&lt;P&gt;                  END OF BLOCK SUB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;    SELECT * FROM USR02 WHERE BNAME IN USERNAME&lt;/P&gt;&lt;P&gt;                          AND ERDAT IN LASTLOGI&lt;/P&gt;&lt;P&gt;                          AND CLASS IN CLASSTYP.&lt;/P&gt;&lt;P&gt;       WRITE: / 'User ', USR02-BNAME,&lt;/P&gt;&lt;P&gt;                'Last Login Date ', USR02-TRDAT,&lt;/P&gt;&lt;P&gt;                'Last Login Time ', USR02-LTIME,&lt;/P&gt;&lt;P&gt;                'CLASS ', USR02-CLASS.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SCREEN ICON LEFT AND RIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SSCRFIELDS-FUNCTXT_01 = '@0D@'.&lt;/P&gt;&lt;P&gt;  SSCRFIELDS-FUNCTXT_02 = '@0E@'.&lt;/P&gt;&lt;P&gt;  SUB-PROG = SY-REPID.&lt;/P&gt;&lt;P&gt;  SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  CASE SY-DYNNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 100.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 300.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 200.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 200.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 300.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 300.&lt;/P&gt;&lt;P&gt;      IF SSCRFIELDS-UCOMM = 'FC01'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 200.&lt;/P&gt;&lt;P&gt;      ELSEIF SSCRFIELDS-UCOMM = 'FC02'.&lt;/P&gt;&lt;P&gt;        SUB-DYNNR = 100.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493443#M840194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493444#M840195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wht do you mean by properties ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493444#M840195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493445#M840196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub-Screen:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; A small screen called with in the main screen to display data on the main screen. We can call  single sub screen any no. of times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;This is called in PAI event&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call subscreen&lt;/STRONG&gt; &amp;lt; name of the sub screen&amp;gt;  &lt;STRONG&gt;include&lt;/STRONG&gt; &amp;lt; progran name&amp;gt; &amp;lt; screen No.&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kavitha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493445#M840196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493446#M840197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Subscreens &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens allow you to expand the content of a screen dynamically at runtime. For example, screen exits, which are part of the enhancement concept, use the subscreen technique. Some complex screen elements, like tabstrip controls, also use them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use a subscreen, you must:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define the subscreen area(s) on a screen &lt;/P&gt;&lt;P&gt;Define suitable subscreen screens &lt;/P&gt;&lt;P&gt;Include the subscreen screen in the subscreen area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Subscreen Areas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You define subscreen areas using the Screen Painter in the layout of the screen on which you want to embed a subscreen. Each subscreen area on a screen has a unique name, and a position, length, and height. Subscreen areas may not overlap either with each other or with other screen elements. You can also specify whether a subscreen area can be resized vertically or horizontally when the user resizes the window. If the area supports resizing, you can specify a minimum size for it. If the resizing attributes are selected, the PAI event is triggered whenever the user resizes the main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining Subscreen Screens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens. However, the following restrictions apply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should arrange the screen elements so that they are not truncated if a subscreen area is too small. &lt;/P&gt;&lt;P&gt;If you want to create several subscreen screens in an ABAP program, you should make sure that the individual screen elements have names unique among the subscreens. If the subscreen screens belong to the same program as the main screen, you should also make sure that names are not used twice there. Otherwise, you must separate data transported from the screen in your ABAP program after each user action (see example). &lt;/P&gt;&lt;P&gt;Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen. &lt;/P&gt;&lt;P&gt;The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen. &lt;/P&gt;&lt;P&gt;The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen.&lt;/P&gt;&lt;P&gt;You can also define selection screens as subscreens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Including Subscreen Screens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You include a subscreen screen using the CALL SUBSCREEN statement in the flow logic of the main screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;  CALL SUBSCREEN &amp;lt;area&amp;gt; INCLUDING &amp;lt;prog&amp;gt; &amp;lt;dynp&amp;gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement assigns the subscreen screen with number &amp;lt;dynp&amp;gt; to the subscreen area called &amp;lt;area&amp;gt;. With &amp;lt;prog&amp;gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The name &amp;lt;area&amp;gt; of the subscreen area must be entered directly without inverted commas. You can specify the names &amp;lt;prog&amp;gt; and &amp;lt;dynp&amp;gt; either as literals or variables. If you use variables, you must declare and fill identically-named variables in the ABAP program. The screen number &amp;lt;dynp&amp;gt; must be 4 characters long. If you do not assign a subscreen screen to an area, it remains empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN &amp;lt;area&amp;gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement includes the PAI flow logic of the subscreen screen included in the subscreen area &amp;lt;area&amp;gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subscreens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_subscreens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;DATA: number1(4) TYPE n VALUE '0110',&lt;/P&gt;&lt;P&gt;      number2(4) TYPE n VALUE '0130',&lt;/P&gt;&lt;P&gt;      field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;MODULE status_100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0110 OUTPUT.&lt;/P&gt;&lt;P&gt;  field = 'Eingabe 1'(001).&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0120 OUTPUT.&lt;/P&gt;&lt;P&gt;  field = field1.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0130 OUTPUT.&lt;/P&gt;&lt;P&gt;  field = 'Eingabe 2'(002).&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_0140 OUTPUT.&lt;/P&gt;&lt;P&gt;  field = field2.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE save_ok INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0110 INPUT.&lt;/P&gt;&lt;P&gt;  IF save_ok = 'OK1'.&lt;/P&gt;&lt;P&gt;    number1 = '0120'.&lt;/P&gt;&lt;P&gt;    field1 = field.&lt;/P&gt;&lt;P&gt;    CLEAR field.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0130 INPUT.&lt;/P&gt;&lt;P&gt;  IF save_ok = 'OK2'.&lt;/P&gt;&lt;P&gt;    number2 = '0140'.&lt;/P&gt;&lt;P&gt;    field2 = field.&lt;/P&gt;&lt;P&gt;    CLEAR field.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_100 INPUT.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'SUB1'.&lt;/P&gt;&lt;P&gt;      number1 = '0110'.&lt;/P&gt;&lt;P&gt;    WHEN 'SUB2'.&lt;/P&gt;&lt;P&gt;      number1 = '0120'.&lt;/P&gt;&lt;P&gt;      CLEAR field1.&lt;/P&gt;&lt;P&gt;    WHEN 'SUB3'.&lt;/P&gt;&lt;P&gt;      number2 = '0130'.&lt;/P&gt;&lt;P&gt;    WHEN 'SUB4'.&lt;/P&gt;&lt;P&gt;      number2 = '0140'.&lt;/P&gt;&lt;P&gt;      CLEAR field2.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next screen number of screen 100 is 100 (statically-defined). Its layout is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are four pushbuttons with the function codes SUB1 to SUB4, and two subscreen areas AREA1 and AREA2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same ABAP program, there are four subscreen screens 110 to 140. Each of these fits the subscreen area exactly. The layout is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The input/output field of all four subscreen screens has the name FIELD. The function codes of the pushbuttons on the subscreen screens 110 and 130 are OK1 and OK2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic for screen 100 is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE status_100.&lt;/P&gt;&lt;P&gt;  CALL SUBSCREEN: area1 INCLUDING sy-repid number1,&lt;/P&gt;&lt;P&gt;                  area2 INCLUDING sy-repid number2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  MODULE cancel AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;  MODULE save_ok.&lt;/P&gt;&lt;P&gt;  CALL SUBSCREEN: area1,&lt;/P&gt;&lt;P&gt;                  area2.&lt;/P&gt;&lt;P&gt;  MODULE user_command_100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic of subscreen screens 110 and 130 is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE fill_0110|0130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  MODULE user_command_0110|0130.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The screen flow logic of subscreen screens 120 and 140 is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE fill_0120|0150.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you run the program, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main screen allow you to choose between two subscreen screens for each screen area. The pushbuttons on the subscreens allow you to transfer the data from subscreens 110 and 130 to subscreens 120 and 140. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the same field name FIELD is used on all subscreens, the identically-named ABAP field is transferred more than once in each PBO and PAI event of the main screen. For this reason, the values have to be stored in the auxiliary fields FIELD1 and FIELD2 in the ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The pushbuttons on the subscreen screens have different function codes, and they are handled normally in an ABAP field. If the function codes had had the same names, it would again have been necessary to use auxiliary fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493446#M840197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493447#M840198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Properties of subscreen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;subscreens cannot have GUI status.&lt;/P&gt;&lt;P&gt;--&amp;gt;these can be from other programs also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.create a module pool program.&lt;/P&gt;&lt;P&gt;2.go with se51.provide module pool program name that we r &lt;/P&gt;&lt;P&gt;created in previous step.and give screen number as ex.100.&lt;/P&gt;&lt;P&gt;3.go with layout.&lt;/P&gt;&lt;P&gt;4.select subscreen area button (from last to fifth one) &lt;/P&gt;&lt;P&gt;drop it in layout.&lt;/P&gt;&lt;P&gt;5.double click on subscreen area and define properties&lt;/P&gt;&lt;P&gt;name:it should be any name.&lt;/P&gt;&lt;P&gt;6.check and activate and go back.&lt;/P&gt;&lt;P&gt;7.go with screen painter.&lt;/P&gt;&lt;P&gt;  provide screen no as 4 ex:110.and go for create&lt;/P&gt;&lt;P&gt;8.select screen type as subscreen.&lt;/P&gt;&lt;P&gt;9.go with layout and provide options as u required.&lt;/P&gt;&lt;P&gt;10.activate.&lt;/P&gt;&lt;P&gt;11.go to screen 100.&lt;/P&gt;&lt;P&gt;12.select flow logic.provide code according to the &lt;/P&gt;&lt;P&gt;requirement in PBO and PAI.&lt;/P&gt;&lt;P&gt;13.provide the following statement in PBO statement.&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN &amp;lt;subscreen name&amp;gt; INCLUDING 'sy-repid' '110'.&lt;/P&gt;&lt;P&gt;14.activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vineela.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:32:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493447#M840198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493448#M840199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;subscreens cannot have GUiI status as normal screens have.&lt;/P&gt;&lt;P&gt;these can be called from any other program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;steps for creating subscreen.&lt;/P&gt;&lt;P&gt;1.create a module pool program.&lt;/P&gt;&lt;P&gt;2.go with se51.provide module pool program name that we r &lt;/P&gt;&lt;P&gt;created in previous step.and give screen number as ex.100.&lt;/P&gt;&lt;P&gt;3.go with layout.&lt;/P&gt;&lt;P&gt;4.select subscreen area button (from last to fifth one) &lt;/P&gt;&lt;P&gt;drop it in layout.&lt;/P&gt;&lt;P&gt;5.double click on subscreen area and define properties&lt;/P&gt;&lt;P&gt;name:it should be any name.&lt;/P&gt;&lt;P&gt;6.check and activate and go back.&lt;/P&gt;&lt;P&gt;7.go with screen painter.&lt;/P&gt;&lt;P&gt;  provide screen no as 4 ex:110.and go for create&lt;/P&gt;&lt;P&gt;8.select screen type as subscreen.&lt;/P&gt;&lt;P&gt;9.go with layout and provide options as u required.&lt;/P&gt;&lt;P&gt;10.activate.&lt;/P&gt;&lt;P&gt;11.go to screen 100.&lt;/P&gt;&lt;P&gt;12.select flow logic.provide code according to the &lt;/P&gt;&lt;P&gt;requirement in PBO and PAI.&lt;/P&gt;&lt;P&gt;13.provide the following statement in PBO statement.&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN &amp;lt;subscreen name&amp;gt; INCLUDING 'sy-repid' '110'.&lt;/P&gt;&lt;P&gt;14.activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vineela.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493448#M840199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Subscren</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493449#M840200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A subscreen area is a reserved rectangular area on a screen, into which you place another screen at&lt;/P&gt;&lt;P&gt;runtime. Subscreen areas may not contain any other screen elements. To use a subscreen, you create a&lt;/P&gt;&lt;P&gt;second screen (with the type subscreen), and display it in the subscreen area you defined on the main&lt;/P&gt;&lt;P&gt;screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A subscreen is an independent screen that you display within another screen. You may want to use a&lt;/P&gt;&lt;P&gt;subscreen as a way of displaying a group of objects from the main screen in certain circumstances, but&lt;/P&gt;&lt;P&gt;not in others. You can use this technique to display or hide extra fields on the main screen, depending&lt;/P&gt;&lt;P&gt;on the entries the user has made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A second use for subscreens is that different programs can use the same subscreens. To do this you&lt;/P&gt;&lt;P&gt;must execute other screen programs within your main program.&lt;/P&gt;&lt;P&gt;You can include more than one subscreen on a single main screen. You can also determine the&lt;/P&gt;&lt;P&gt;subscreens dynamically at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use subscreens in the following circumstances:&lt;/P&gt;&lt;P&gt;In screen enhancements (screen exits)&lt;/P&gt;&lt;P&gt;Within other screen objects (tabstrip controls)&lt;/P&gt;&lt;P&gt;In the Modification Assistant&lt;/P&gt;&lt;P&gt;In Web transactions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Atributes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;General&lt;/P&gt;&lt;P&gt;Object name&lt;/P&gt;&lt;P&gt;Start position&lt;/P&gt;&lt;P&gt;Size&lt;/P&gt;&lt;P&gt;- Static&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Subscreen&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Resizable&lt;/P&gt;&lt;P&gt;- Vertical&lt;/P&gt;&lt;P&gt;- Horizontal&lt;/P&gt;&lt;P&gt;Minimum size&lt;/P&gt;&lt;P&gt;- Vertical&lt;/P&gt;&lt;P&gt;- Horizontal&lt;/P&gt;&lt;P&gt;Scrollable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the subscreen is larger than the subscreen area in which it is called, the system only displays as much&lt;/P&gt;&lt;P&gt;of it as will fit onto the screen, starting at the top left hand corner. However, you can use the Scrollable&lt;/P&gt;&lt;P&gt;attribute to ensure that, if the screen is too big, the system will display scrollbars.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resizing attributes control whether the size of a subscreen area can be changed vertically and&lt;/P&gt;&lt;P&gt;horizontally. You should set these attributes if you want the size of the subscreen area to change with&lt;/P&gt;&lt;P&gt;the size of the whole window. You can use the minimum size attribute to set a lower limit beyond which&lt;/P&gt;&lt;P&gt;the subscreen area cannot be resized.&lt;/P&gt;&lt;P&gt;The Context menu attribute allows you to assign a context-sensitive menu to the output fields on the&lt;/P&gt;&lt;P&gt;subscreen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following restrictions apply to subscreens:&lt;/P&gt;&lt;P&gt;CALL SUBSCREEN ... is not allowed between LOOP and ENDLOOP or between&lt;/P&gt;&lt;P&gt;CHAIN and ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A subscreen may not have a named OK_CODE field.&lt;/P&gt;&lt;P&gt;Object names must be unique within the set of all subscreens called in a single main screen.&lt;/P&gt;&lt;P&gt;Subscreens may not contain a module with the AT EXIT-COMMAND addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use the SET TITLEBAR, SET PF-STATUS, SET SCREEN, or LEAVE SCREEN&lt;/P&gt;&lt;P&gt;statements in the modules of a subscreen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:40:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/subscren/m-p/3493449#M840200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:40:34Z</dc:date>
    </item>
  </channel>
</rss>

