Application Development and Automation 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: 
Read only

module pool

Former Member
0 Likes
462

Hi ,

What is the diff b/n call screen and leave to screen?

Regards,

Siri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
440

Hello,

Bsically Call screen is to call a screen from current and decide the next screen also.

But Leave screen terminates at the left out screen.

Explanation :-

a program, you can use one of the two following ABAP statements to leave a screen:

LEAVE SCREEN.

or

LEAVE TO SCREEN .

statement. At the end of the screen sequence (next screen 0), the program continues processing directly after the CALL SCREEN statement.

since the CALL SCREEN statement interrupts the current screen sequence and starts a new one. When you start a screen sequence with a transaction code, you can stack up to 50 other screen sequences on top of it. However, you should not exceed 40 sequences, since help and error dialogs also use internally-implemented screen sequences.

Since during an R/3 terminal session you are always in a screen sequence of some kind, each CALL SCREEN statement leads to one screen sequence being inserted into another. For example, if you use the statement in an executable program, the screen sequence is normally inserted into the normal screen sequence for executable programs, that is, selection screen ® list.

Hope this will help u.

Rewar poiits if helpful.

Regards,

Deepu.K

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
440

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
440

Hi

1) Call Screen: Calling a single screen can be used for embedding a screen sequence. If you want to prevent the called screen from covering the current screen completely (say u want 2 display both screen) you can use the CALL SCREEN statement with the STARTING AT and ENDING AT

CALL SCREEN 200

If we write this statement in screen 100 ,it will goto screen 200 and it will retain screen 100(ie u can come back)

and moreover u have options using this

CALL SCREEN 200 STARTING AT x1 y1 ENDING AT x2 y2

2) If we use set screen first the processing blocks in the present screen will be executed and control goes to the screen which is called.

in this control remains in that calling screen only, it doesnt come back to our screen.

3)In screen 100,we call screen 200.The PBO and PAI of screen 200 is processed.Now in screen 200,if we use leave to screen 100,the processing starts from screen 100 after the call screen 200 statement.The PBO and the PAI of screen 100 need not be processed again from the beginning in this case.

4) That is if we use leave to screen,the control goes back to the screen from which the present screen was called and continues with the processing.

SET SCREEN 200

1) With the above statement , it will goto screen 200 and screen 100 no more remains

2) Screen No 0 : This special screen number causes the screen to jump back to the calling screen.

set screen 0 used to go back to the previous screen.

LEAVE TO SCREEN ..leaves that screen and goes to the screen mentioned .

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
440

Hi,

CALL SCREEN-

CALL SCREEN dynnr

[STARTING AT col1 lin1

[ENDING AT col2 lin2]].

Addition:

... STARTING AT col1 lin1 [ENDING AT col2 lin2]

Effect

This statement calls the dynpro with the dynpro number specified in dynnr. For dynnr, a data object of type n and length 4 is expected. The call starts a new dynpro sequence, which is embedded into the current dynpro sequence. The dynpro with dynpro number dynnr is the initial dynpro of the dynpro sequence. In a dynpro sequence started by a transaction code, you can nest up to 50 other dynpro sequences.

The called dynpro sequence is terminated as soon as one of the involved dynpros branches to a next dynpro with number 0. The program continues after CALL SCREEN

LEAVE TO SCREEN dynnr.

Effect

The variant LEAVE TO SCREEN calls the screen with the number dynnr as the next screen. A data object of the type n of the length 4 is expected for dynnr. It must contain either the screen number of a screen in the main program of the current program group or the value 0. Otherwise, an exception that cannot be handled is raised. This statement is a short form of the statements SET SCREEN dynnr and LEAVE SCREEN.

Note

This statement does not terminate the entire dynpro sequence; it branches to an additional screen in the same sequence. Only if the number 0 is used to branch to the next screen, LEAVE SCREEN terminates the screen sequence.

***DO REWARD IF UESFULL

REGARDS,

VIJAY

Read only

Former Member
0 Likes
441

Hello,

Bsically Call screen is to call a screen from current and decide the next screen also.

But Leave screen terminates at the left out screen.

Explanation :-

a program, you can use one of the two following ABAP statements to leave a screen:

LEAVE SCREEN.

or

LEAVE TO SCREEN .

statement. At the end of the screen sequence (next screen 0), the program continues processing directly after the CALL SCREEN statement.

since the CALL SCREEN statement interrupts the current screen sequence and starts a new one. When you start a screen sequence with a transaction code, you can stack up to 50 other screen sequences on top of it. However, you should not exceed 40 sequences, since help and error dialogs also use internally-implemented screen sequences.

Since during an R/3 terminal session you are always in a screen sequence of some kind, each CALL SCREEN statement leads to one screen sequence being inserted into another. For example, if you use the statement in an executable program, the screen sequence is normally inserted into the normal screen sequence for executable programs, that is, selection screen ® list.

Hope this will help u.

Rewar poiits if helpful.

Regards,

Deepu.K