Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding module pool programming

Former Member
0 Kudos

What is the difference between CALL SCREEN, SET SCREEN & LEAVE TO SCREEN and can you explain me the scenarios when these can be used?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Hope it will help you.

CALL SCREEN - it will go to the called screen and retun to the calling screen back.

SET SCREEN - it will go to the called screen but dont return back to the calling screen

LEAVE TO SCReen - The LEAVE TO SCREEN statement exits the current screen and calls the dynamic next screen, which you specify as part of the statement. The LEAVE TO SCREEN statement is no more than a contraction of the two statements

Pls reward pts if help.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Call screen means it will take to that screen and after completion of it it will come to the same point i.e call screen.

set screen means it will set next screen .

leave to screen it will take to next screen and return the cursor to the next line of the statement.

Plzz reward points if it helps.

Former Member
0 Kudos

Hi

Hope it will help you.

Reward if help.

Screen processing always involves a screen sequence that you start either using CALL SCREEN or a transaction code. During screen processing, the ABAP program is controlled by the dialog processor. In the ABAP program, the PBO and PAI modules are executed as they are called from the screen flow logic.

To pass control from the dialog processor to the list processor, you must include the following statement in one of the dialog modules:

LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].

You can include this statement in either the PBO or the PAI event. Its effect is to start the list processor and display the basic list after the PAI processing of the current screen. The basic list contains any list output from all PBO and PAI modules that have been executed up to that point.

If detail lists are defined in the corresponding event blocks of the ABAP program (AT LINE-SELECTION, AT USER-COMMAND), user actions on the basic list will lead to the detail list, and further interaction will lead to further list levels.

You can leave list processing in two ways:

By leaving the basic list using the Back, Exit, or Cancel function.

By using the following statement during list processing:

LEAVE LIST-PROCESSING.

In both cases, control returns from the list processor to the dialog processor. Each time this occurs, the entire list system is initialized. Any subsequent list output statements in PBO and PAI modules apply to an empty basic list.

By default, the dialog processor returns to the PBO processing of the screen from which the list processor was called. The optional addition AND RETURN TO SCREEN allows you to specify a different screen in the current screen sequence at whose PBO event you want to resume processing. In particular, the statement

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

can be used to end the current screen sequence and return to the point from which it had originally been called.

Former Member
0 Kudos

Hi,

Go thru the below link for more info. on screen statements:

http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm

Kindly Reward Points If Found Usefull,

Cheers,

Chaitanya.

Former Member
0 Kudos

Hi

Hope it will help you.

CALL SCREEN - it will go to the called screen and retun to the calling screen back.

SET SCREEN - it will go to the called screen but dont return back to the calling screen

LEAVE TO SCReen - The LEAVE TO SCREEN statement exits the current screen and calls the dynamic next screen, which you specify as part of the statement. The LEAVE TO SCREEN statement is no more than a contraction of the two statements

Pls reward pts if help.

Former Member
0 Kudos

Hi Sir ,

Please have a look below .Hope it is suitable and simpler solution for your question.

Please do reward if useful.

Thankx.

The SET SCREEN and LEAVE SCREEN statements controls screen flow.

With SET SCREEN the current screen simply specifies the next screen in the chain , control branches to this next screen as sonn as th e current screen has been processed .Return from next screen to current screen is not automatic .It does not interrupt processing of the current screen.If we want to branch to the next screen without finishing the current one ,use LEAVE SCREEN.

With CALL SCREEN , the current (calling) chain is suspended , and a next screen (screen chain) is called .The called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0 .Sometime we might want to let an user call a pop up screen from the main application screen to let him enter secondary information.After they have completed their enteries, the users should be able to close the popup and return directly to the place where they left off in the main screen.Here comes CALL SCREEN into picture .This statement lets us insert such a sequence intp the current one.

Leave to screen.

Execution does not come back to the program from where the screen is called.

Former Member
0 Kudos

call screen : will go to the corresponding called screen and will end in the next screen and so on.

Set screen : will overwrite the next screen which u have declare in the screen painter.

Leave to screen : will just go to the next screen, it is the combination of SET SCREEN XXXX + LEAVE SCREEN.

regards,

Prabhu