Programs in the Internal Session

download Programs in the Internal Session

of 3

Transcript of Programs in the Internal Session

  • 7/24/2019 Programs in the Internal Session

    1/3

    Programs in the Internal Session

    The following figure shows the memory organization within an internal session:

    Program Groups

    In an internal session it is possible to load multiple programs that can be organised in program groups. Afterreturning from an internal session, this is dismantled. It is then no longer possible to access data and objects ofthe internal session.

    Main Program Group

  • 7/24/2019 Programs in the Internal Session

    2/3

    During the creation of an internal session using the call of an ABA programusing SUBMITor a transaction

    code, the main program group is created and the called program ma!es up its main program. The internalsession e"ists for as long as the main program of the main program group is e"ecuted. This can be ane"ecutable program, a module pool, or a function group.

    Additional Program Group

    #$ery time that a new class poolor a new function groupis loaded by an e"ternal usage, an additional programgroup is created and the class pool or the function group is the main program of the additional program group.An e"ternal usage is usually an access to components e"posed %$isible components of the global class orfunction module& by the class pool or function group. 'owe$er, it can also be an access to local components,such as in a type specification using absolute type names. An additional program group e"ists for as long asthe internal session e"ists.

    Main Program of a Program Group

    The first program loaded of a program group is the main program of this group. The main program of a mainprogram group is the first program loaded into the internal session due to a program call %e"ecutable program,module pool, or function group&. The main program of an additional program group is a class pool or a function

    group whose loading results in the forming of the additional program group.

    Programs Loaded into a Program Group

    (hen programs that are not function groups or class pools are loaded because of an e"ternal usage, they donot form additional program groups, instead they are loaded into the program group of the user. This happensfor e"ample:

    during the e"ternal call of subroutines that are defined in e"ecutable programs, module pools or

    subroutine pools

    when using the screen statement CALL SUBSCREEN sub_area INCLUDING prog, if the screen is

    not defined in a function group

    during dynamic access to a local data type or object type of an e"ecutable program, module pool, or a

    subroutine using absolute type names

    with statements such as SET PF-STATUS OF PROGRAM, if the program of the necessary component

    is not a function group.

    Notes

    It is not the program typethat is important for the assignment of a program to a program group, but the

    introductory program statement. )or e"ample, if the the statement FUNCTION-POOLis used in a

    subroutine pool instead of PROGRAM, when the program is loaded by an e"ternal usage it forms an

    additional program group.

    *ince all the programs of a program group use the interface wor! area, the screens, lists, and +I

    statuses of the main program %more below&, the assignment of a program that is loaded into a programgroup is particularly important if procedures of this program are called e"ternally.

    Data Objects

  • 7/24/2019 Programs in the Internal Session

    3/3

    The data objectsof a program, with the e"ception of the interface wor! area, belong e"clusi$ely to theirprogram and are only $isible there. A loaded program e"ists for the same length of time as the internal session.After returning from a program, its data objects are retained and are a$ailable if a procedureof the program iscalled again.

    Class Instances

    -bjects as instances of classes can be used by all programs %and objects& of an internal session. An objecte"ists for as long as there are users for %and hence references to& the object.

    Note

    This means that references to objects of the internal session can be transferred to e"ternally called procedures.

    Interface or! Areas

    Data objects declared with TABLESor DATA BEGIN|END OF COMMON PART ...are interface wor! areas.

    These are only created once per program group and are used by all programs of a program group together.

    Note

    The assignment of a program to a program group, and thus the determination of which other programs itshares the interface wor! area with, can depend on the usage seuence.

    D"npros# Lists# and G$I Statuses

    -nly the dynprosof the main program of a program group can be called using CALL SCREEN. After an internal

    session is loaded, these are the dynpros of the main program of the main program group. The main programs%function groups& of additional program groups can also call their own dynpros.

    /istsare always assigned to the current dynpro seuenceand therefore also to the main program of theprogram group.

    As standard, SET PF-STATUSis used to access the +I statusof the main program of a program group and

    use its data objects for dynamic te"ts.

    All programs of a program group wor! with the dynpros, lists, and +I status of the main program by default. Astatement CALL SCREENin an e"ternally called subprogram, for e"ample, ne$er calls a dynpro from its own

    framewor! program. The dialog modules and list result bloc!s of the main program are e"ecuted.