Chapter 10_Dynamic Screen Sequence

download Chapter 10_Dynamic Screen Sequence

of 13

Transcript of Chapter 10_Dynamic Screen Sequence

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    1/13

    IBM Global Services

    2005 IBM CorporationDynamic Screen Sequence | 6.10 March-2005

    Dynamic Screen Sequence

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    2/13

    IBM Global Services

    2005 IBM Corporation2 March-2005Dynamic Screen Sequence | 6.10

    Objectives

    T he participants will be able to:

    Know about the next screen attribute for a screen.

    Understand the functioning of the following screen navigation commands:LEAVE SCREEN

    SET

    SCREENLEAVE T O SCREEN

    CALL SCREEN

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    3/13

    IBM Global Services

    2005 IBM Corporation3 March-2005Dynamic Screen Sequence | 6.10

    Overview

    Academy Awards

    Year

    Category

    1994

    PIC

    Academy Awards

    Year

    Category

    1994

    PIC

    Winner Forrest Gump

    Notes

    Critic Dean

    Currently, the screensequence of our onlineprogram is determined bystatic Next Screenattributes on each screen.

    We will learn how todynamically set the screensequence and add a pop-updialog box to enter a criticsname.

    Exit Edit Loop

    Exit Update

    Enter Name

    The Shawshank Redemption should have won.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    4/13

    IBM Global Services

    2005 IBM Corporation4 March-2005Dynamic Screen Sequence | 6.10

    LEAVE SCREEN Statement

    PROCESS BEFORE OUTPUT.

    MODULE INITIALIZE.

    PROCESS AFTER INPUT.

    MODULE ONE.

    MODULE TWO.

    ** PAI Modules **

    MODULE ONE INPUT.

    . . .

    LEAVE SCREEN.

    . . .ENDMODULE.

    MODULE TWO INPUT.

    . . .

    ENDMODULE.

    Screen 9000

    Next Screen

    attribute is 9001.

    When LEAVE SCREEN is encountered,the system immediately terminates the

    current screens PAI event and goes to the PBO eventof the screen specified in the Next Screen attribute.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    5/13

    IBM Global Services

    2005 IBM Corporation5 March-2005Dynamic Screen Sequence | 6.10

    SE T SCREEN Statement

    PROCESS AFTER INPUT.

    FIELD YMOVIE-AAYEAR

    VALUES (BETWEEN 1927 AND 1996).

    CHAIN.

    FIELD: YMOVIE-AAYEAR, YMOVIE-CATEGORY.

    MODULE SELECT_LISTING.

    ENDCHAIN.

    Screen 9000

    ** MZA06I01 - PAI Modules **

    MODULE SELECT_LISTING INPUT.

    IF OKCODE = EDIT.

    SET SCREEN 9001.

    * code to select record from YMOVIE

    ENDIF.

    ENDMODULE.

    Next Screen

    attribute is 9000.

    When SET SCREEN is encountered,the system temporarily ignores thevalue in the Next Screen attribute

    and uses the value specified instead.The current screens PAI processing

    is not terminated.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    6/13

    IBM Global Services

    2005 IBM Corporation6 March-2005Dynamic Screen Sequence | 6.10

    LEAVE T O SCREEN Statement

    PROCESS AFTER INPUT.

    FIELD YMOVIE-AAYEAR

    VALUES (BETWEEN 1927 AND 1996).

    CHAIN.

    FIELD: YMOVIE-AAYEAR, YMOVIE-CATEGORY.

    MODULE SELECT_LISTING.

    ENDCHAIN.

    Screen 9000

    ** MZA06I01 - PAI Modules **MODULE SELECT_LISTING INPUT.

    IF OKCODE = EDIT.

    * code to select record from YMOVIE

    LEAVE TO SCREEN 9001.ENDIF.

    ENDMODULE.

    Next Screen

    attribute is 9000.

    When LEAVE TO SCREEN is encountered,the system terminates the current

    screens PAI event and immediatelygoes to the PBO event of the screen

    specified in the statement.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    7/13

    IBM Global Services

    2005 IBM Corporation7 March-2005Dynamic Screen Sequence | 6.10

    CALL SCREEN Statement

    Academy Awards

    Year

    Category

    1994

    PIC

    Winner Forrest Gump

    Notes

    Critic Dean

    Exit Update

    The Shawshank Redemption should have won.

    Enter critics name

    Dean

    Titlebar

    Exit

    Screen 9002 is a Modaldialog box type screenwith a dialog box type

    GUI status.

    CALL SCREEN 9002 STARTING AT 30 5 ENDING AT 60 10.

    This ABAP code would be in a PAI modulefor screen 9001.

    Enter Name

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    8/13

    IBM Global Services

    2005 IBM Corporation8 March-2005Dynamic Screen Sequence | 6.10

    PROCESS BEFORE OUTPUT.MODULE INITIALIZE.

    PROCESS AFTER INPUT.

    MODULE END.

    Screen 9002** MZA06O01 - PBO Modules **

    MODULE INITIALIZE OUTPUT.

    * set GUI status and titlebar

    * depending on screen number

    * and clear okcode

    ENDMODULE.

    ** MZA06I01 - PAI Modules **

    MODULE END INPUT.LEAVE TO SCREEN 0.

    ENDMODULE.

    Leaving a Called Screen

    Next Screen

    attribute is 9002.

    Because screen 9002 was called,

    SCREEN 0 refers to the calling

    screen (9001).

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    9/13

    IBM Global Services

    2005 IBM Corporation9 March-2005Dynamic Screen Sequence | 6.10

    Demonstration

    Demonstration of screen navigation commands in a sample online program.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    10/13

    IBM Global Services

    2005 IBM Corporation10 March-2005Dynamic Screen Sequence | 6.10

    Practice

    Demonstration of screen navigation commands in a sample online program.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    11/13

    IBM Global Services

    2005 IBM Corporation11 March-2005Dynamic Screen Sequence | 6.10

    Summary

    T he screen sequence of an online program is determined by Next Screenpointers.

    When the system encounters the LEAVE SCREEN ABAP statement, itimmediately terminates the screens PAI event and goes to the PBO event of thescreen specified in the Next Screen attribute.

    When the system encounters the SE T SCREEN ABAP statement, ittemporarily overrides the Next Screen attribute with this and the PAIprocessing continues. After all PAI modules are executed, the system goes tothe PBO event of .

    When the system encounters the LEAVE T O SCREEN ABAPstatement, it terminates the screens PAI event and immediately goes to the PBOof .T he LEAVE T O SCREEN statement performs the functionality of twostatements: SE T SCREEN and LEAVE SCREEN.

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    12/13

  • 8/6/2019 Chapter 10_Dynamic Screen Sequence

    13/13

    IBM Global Services

    2005 IBM Corporation13 March-2005Dynamic Screen Sequence | 6.10

    Questions

    Screen Attributes

    Short Description

    Screen Type

    Next screen 9100

    Screen 9100

    Screen Attributes

    Short Description

    Screen Type

    Next screen

    Screen 9100

    What happens after all PAI

    modules are processed and

    the next screen is itself?

    What happens after all PAI

    modules are processed and

    the next screen is blank?