ABAP Session – 5_1-User Dialogs-DIALOG SCREENS

download ABAP Session – 5_1-User Dialogs-DIALOG SCREENS

of 13

Transcript of ABAP Session – 5_1-User Dialogs-DIALOG SCREENS

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    1/13

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    2/13

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    3/13

    EACH SCREEN HAS THE FOLLOWING COMPONENTS:

    Properties (Attributes)

    Screen name as a 4-digit number

    Default next screen

    Screen type (eg: Normal for a FULL SCREEN)

    Layout You can place the SCREEN ELEMENTS (I/O fields, texts, pushbuttonsetc) on the screen

    Element List Lists all screen elements including their detailed attributes such asposition, size, data type etc

    Flow Logic you define the screen programming logic here

    Has 2 main parts PAI, PBO

    PBO contains references to processing blocks that are processed inpreparation for screen display. These processing blocks are called PBOMODULES

    Ex: data selection

    PAI contains references to processing blocks that are processed after theuser input and actions. These processing blocks are called as PAIMODULES

    Ex: Save/Process user input data

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    4/13

    The TABLES statement is used to define a structure variable which is used totransport data between the screen and the program

    It is common to create a dictionary structure explicitly for the data exchange

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    5/13

    When the screen is called from the program,

    the PBO Module is invoked and processed

    The field contents of the TABLES structure are copied to the screen fields(with same names) before sending the screen to the presentation server

    NOTE- the data for the screen display in the TABLES structure is oftenprepared in the PBO and hence the data is populated on the screen after theprocessing of PBOModule

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    6/13

    The contents of the screen fields are transported into the TABLES structure beforethe PAI event is processed

    The user entries are supposed to be processed in the PAI Modules and hence thefields are transported BEFORE the processing of the PAI module

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    7/13

    OK_CODE is a special screen field (of OK type) which holds the function codeassigned to the screen element/ button

    When the user presses a button, the run-time system copies the function code tothe OK_CODE screen field

    If there is data object of the same name (OK_CODE) in the program, the contents ofthis special screen field are automatically transported to this data object

    The PAI processing is triggered after this transport

    The OK_CODE is processed in the corresponding PAI Module in a CASE statement(typically)

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    8/13

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    9/13

    1. The special screen field is called COMMAND FIELD

    2. The command field is always available on the screen by DEFAULT

    3. Assign a name to the command field (usually OK_CODE) to start using it

    4. OK_CODE is case sensitive (careful when using it in the CASE statement in theprogram)

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    10/13

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    11/13

    Usually the main processing module in PAI is called USER_COMMAND_nnnn(nnnn-screen number)

    Variables defined inside a module are always GLOBAL

    You can access all the global data objects of a program inside a module

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    12/13

    NOTE: In the ABAP Program, Modules starting with

    MODULE.OUTPUT are PBO Modules

    MODULE.INPUT are PAI Modules

  • 7/30/2019 ABAP Session 5_1-User Dialogs-DIALOG SCREENS

    13/13