9 abap _ subscreens

Upload: raza887

Post on 03-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 9 ABAP _ Subscreens

    1/3

    3/18/13 ABAP | Subscreens

    www.saptraininghub.com/abap-subscreens/

    Sap Training Hub

    Free SAP Training & Tutorials

    What is SAP?

    ABAP

    HR

    FICO

    SD

    Video

    Payroll

    Quiz

    Java

    Testing

    Answers

    ABAP | Subscreens

    Before you read this tutorial make sure you what a Dialog Program is

    Subscreens

    A subscreen is an independent screen that is displayed in an area of another (main) screen.

    Subscreens allow you to embed one screen within another at runtime. You can include multiple sub-screens on

    main screen.

    The term subscreen applies both to the screen that you embed, and the area on the main screen in which you

    place it. This tutorial is about subscreen areas. The actual screens created through SE51 transaction, are called

    subscreen screens if defined in screen attributes.

    When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main

    DB2/UDB DBA training

    www.db2team.com

    Learn to be a DBA online Learn from theexperts

    http://www.saptraininghub.com/http://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.saptraininghub.com/abap-subscreens/%26gl%3DPK%26hl%3Den%26client%3Dca-pub-6330153051175486%26ai0%3DC0laIwJpGUc-7NdGpigag44HwB7-tz4gDr-aJu0fAjbcBEAEgm8zvI1CPhpHs-_____8BYMsEyAEBqAMByAPTBKoEgwFP0No4W3iNC9v0440hFH2ap5Ph16dn-Cwmpm430pNlBOxRuBN2GVb-WHhSDXI4OtiRd5YYLJN75AGzkk6D0bntp6knqFHZgmwNsp9HpqfTT8DPKM6uyNeeMygiV09ySuF81vImgb3Y2cVqZmpPOwNFjTBGA1PqDzKVwEdRbL6E9kAw94AH99mZKQ&usg=AFQjCNHSrsdDQrQ7_xena23FF16m3AkY9Ahttp://googleads.g.doubleclick.net/aclk?sa=L&ai=C0laIwJpGUc-7NdGpigag44HwB7-tz4gDr-aJu0fAjbcBEAEgm8zvI1CPhpHs-_____8BYMsEyAEBqAMByAPTBKoEgwFP0No4W3iNC9v0440hFH2ap5Ph16dn-Cwmpm430pNlBOxRuBN2GVb-WHhSDXI4OtiRd5YYLJN75AGzkk6D0bntp6knqFHZgmwNsp9HpqfTT8DPKM6uyNeeMygiV09ySuF81vImgb3Y2cVqZmpPOwNFjTBGA1PqDzKVwEdRbL6E9kAw94AH99mZKQ&num=1&sig=AOD64_32RhCKwDpAZJsx2q9N3wt9-jN9lw&client=ca-pub-6330153051175486&adurl=http://www.db2team.com&nm=1http://www.83answers.com/http://www.guru99.com/http://www.javatutorialhub.com/http://www.saptraininghub.com/quiz/http://www.saptraininghub.com/sap-payroll/http://www.saptraininghub.com/sapvideos/http://www.saptraininghub.com/free-sap-sd-training-course/http://www.saptraininghub.com/sap-fico-training-tutorials/http://www.saptraininghub.com/sap-hcm/http://www.saptraininghub.com/abap-tutorial/http://www.saptraininghub.com/what-is-sap/http://feeds.feedburner.com/SapTrainingHubhttp://www.facebook.com/pages/Sap-Training-Hub/139632216092864http://twitter.com/SAPTHubhttp://www.saptraininghub.com/
  • 7/29/2019 9 ABAP _ Subscreens

    2/3

    3/18/13 ABAP | Subscreens

    www.saptraininghub.com/abap-subscreens/

    screen.Hence, Using subscreens on screens is like using includes in ABAP programs.

    To use a subscreen, you must follow three simple steps

    1. Define the subscreen area(s) on a screen

    2. Define suitable subscreen screens

    3. Include the subscreen screen in the subscreen area.

    Also, you need to adjust the frame of sub-screen and main screen. You need to name it in the field name field.

    Further, you also need to adjust the fields within the subscreen to make them appear in main screen. In case the sub-

    screen is defined to be larger than the available area in the main screen, only the part of subscreen will be visible that fits

    in the the area available. The area is always measured from the top left corner of screen. Hence you should take

    adequate care while defining sub-screen areas and creating sub-screens.

    EXAMPLE

    For instance here we have defined two sub-screen areas on main screen and have attached two different Sub-screen to

    corresponding areas. Whenever main screen is called, the PBO of main screen is called. But before display, the PBOs

    of each screen attached with sub-screen areas on main screen are also called.

    You can include a subscreen screen using the CALL SUBSCREEN statement in the flow logic of the main screen.

    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:

    PROCESS BEFORE OUTPUT.

    CALL SUBSCREEN INCLUDING [] .

    This statement assigns the subscreen screen with number to the subscreen area called . You can also

    specify the program in which the subscreen screen is defined (optional). If you do not specify the program explicitly, the

  • 7/29/2019 9 ABAP _ Subscreens

    3/3

    3/18/13 ABAP | Subscreens

    www.saptraininghub.com/abap-subscreens/

    system looks for the subscreen screen in the same ABAP program as the main program. 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 of the subscreen area must be entered directly without inverted commas. You can specify the names

    and either as literals or variables. If you use variables, you must declare and fill identically-named

    variables in the ABAP program. The screen number must be 4 characters long. If you do not assign asubscreen 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 .

    This statement includes the PAI flow logic of the subscreen screen included in the subscreen 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 triggeredor at the corresponding FIELD statements in the PAI flow logic of the subscreen screen.

    Points to Remember

    Names of elements of sub-screens within a screen should be unique

    You should not have OK_CODE or FCODE attached with sub-screen. The OK_CODE of main screen itself is

    OK_CODE of sub-screen

    Sub-screens cannot have any dialog modules containing SET TITLEBAR, SET PF-STATUS, SET SCREEN,

    LEAVE SCREEN or LEAVE TO SCREEN. This will cause runtime error.

    You need to call it in the flow logic (both PBO and PAI) of the main screen.CALL SUBSCREEN is not allowed in CHAIN..ENDCHAIN and LOOP ENDLOOP statements

    Can not have an AT EXIT-COMMAND module

    The fields that you use are the global fields. They must be declared in the top include

    If using subscreens from another dialog program the data transfer will not happen unless you add specific code.

    You might like:

    Recommended by

    Share1 Tweet0 Share0 +11 Share386

    On January 23, 2011 / ABAP / Comments Off

    How to become SAP

    consultant

    Create Material

    Master for Sales

    View

    How to create

    returns,free of

    charge delivery and

    sub sequent delivery

    How to Create

    Quotation

    What is BADI?

    http://www.saptraininghub.com/what-is-badi/http://www.saptraininghub.com/create-quotation/http://www.saptraininghub.com/how-to-create-returnsfree-of-charge-delivery-and-sub-sequent-delivery/http://www.saptraininghub.com/create-material-master-for-sales-view/http://www.saptraininghub.com/how-to-become-sap-consultant/http://www.saptraininghub.com/what-is-badi/http://www.saptraininghub.com/create-quotation/http://www.saptraininghub.com/how-to-create-returnsfree-of-charge-delivery-and-sub-sequent-delivery/http://www.saptraininghub.com/create-material-master-for-sales-view/http://www.saptraininghub.com/how-to-become-sap-consultant/http://www.saptraininghub.com/abap/