SAP Dynamic Screen Sequence

Embed Size (px)

Citation preview

  • 8/13/2019 SAP Dynamic Screen Sequence

    1/13

    IBM Global Services

    2005 IBM CorporationDynamic Screen Sequence | Dec-2008

    DynamicScreenSequence

  • 8/13/2019 SAP Dynamic Screen Sequence

    2/13

    IBM Global Services

    2005 IBM Corporation2 Dec-2008Dynamic Screen Sequence |

    Objectives

    The 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 SCREEN

    LEAVE TO SCREEN

    CALL SCREEN

  • 8/13/2019 SAP Dynamic Screen Sequence

    3/13

    IBM Global Services

    2005 IBM Corporation3 Dec-2008Dynamic Screen Sequence |

    Overview

    Academy Awards

    Year

    Category

    1994

    PIC

    Academy Awards

    Year

    Category

    1994

    PIC

    Winner Forrest Gump

    Notes

    Critic Dean

    Currently, the screen

    sequence of our online

    program is determined by

    static Next Screen

    attributes on each screen.

    We will learn how to

    dynamically set the screen

    sequence and add a pop-up

    dialog box to enter a critics

    name.

    Exit Edit Loop

    Exit Update

    Enter Name

    The Shawshank Redemption should have won.

  • 8/13/2019 SAP Dynamic Screen Sequence

    4/13

    IBM Global Services

    2005 IBM Corporation4 Dec-2008Dynamic Screen Sequence |

    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 event

    of the screen specified in the Next Screen attribute.

  • 8/13/2019 SAP Dynamic Screen Sequence

    5/13

    IBM Global Services

    2005 IBM Corporation5 Dec-2008Dynamic Screen Sequence |

    SET 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 the

    value in the Next Screen attribute

    and uses the value specified instead.

    The current screens PAI processing

    is notterminated.

  • 8/13/2019 SAP Dynamic Screen Sequence

    6/13

    IBM Global Services

    2005 IBM Corporation6 Dec-2008Dynamic Screen Sequence |

    LEAVE TO SCREEN Statement

    PROCESS AFTER INPUT.

    FIELD YMOVIE-AAYEAR

    VALUES (BETWEEN 1927 AND 1996).

    CHAIN.

    FIELD: YMOVIE-AAYEAR,

    YMOVIE-CATEGORY.

    MODULE SELECT_LISTING.

    ENDCHAIN.

    Screen9000

    ** 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 immediately

    goes to the PBO event of the screen

    specified in the statement.

  • 8/13/2019 SAP Dynamic Screen Sequence

    7/13

    IBM Global Services

    2005 IBM Corporation7 Dec-2008Dynamic Screen Sequence |

    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 screen

    with 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 module

    for screen 9001.

    Enter Name

  • 8/13/2019 SAP Dynamic Screen Sequence

    8/13

  • 8/13/2019 SAP Dynamic Screen Sequence

    9/13

    IBM Global Services

    2005 IBM Corporation9 Dec-2008Dynamic Screen Sequence |

    Demonstration

    Demonstration of screen navigation commands in a sample online program.

  • 8/13/2019 SAP Dynamic Screen Sequence

    10/13

    IBM Global Services

    2005 IBM Corporation10 Dec-2008Dynamic Screen Sequence |

    Practice

    Demonstration of screen navigation commands in a sample online program.

  • 8/13/2019 SAP Dynamic Screen Sequence

    11/13

    IBM Global Services

    2005 IBM Corporation11 Dec-2008Dynamic Screen Sequence |

    Summary

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

    When the system encounters the LEAVE SCREEN ABAP statement, it

    immediately terminates the screens PAI event and goes to the PBO event of the

    screen specified in the Next Screen attribute.

    When the system encounters the SET SCREEN ABAP statement, ittemporarily overrides the Next Screen attribute with this and the PAI

    processing continues. After all PAI modules are executed, the system goes to

    the PBO event of .

    When the system encounters the LEAVE TO SCREEN ABAP

    statement, it terminates the screens PAI event and immediately goes to the PBO

    of .

    The LEAVE TO SCREEN statement performs the functionality of two

    statements: SET SCREEN and LEAVE SCREEN.

  • 8/13/2019 SAP Dynamic Screen Sequence

    12/13

    IBM Global Services

    2005 IBM Corporation12 Dec-2008Dynamic Screen Sequence |

    Summary (Contd.)

    When the system encounters the CALL SCREEN ABAP statement,it temporarily suspends the current screens PAI processing and immediately

    goes to the PBO event of . When control returns back to the calling

    screen, its PAI processing will resume.

    After you have called another screen, you need to code a way back to the

    calling screen. Using screen number zero will accomplish this task.

  • 8/13/2019 SAP Dynamic Screen Sequence

    13/13

    IBM Global Services

    2005 IBM Corporation13 Dec-2008Dynamic Screen Sequence |

    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?