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: 

Module pool

Former Member
0 Kudos

Hi,

what is the difference between SET SCREEN,CALL SCREEN and LEAVE SCREEN. plz give in Detail..

Thanks in Advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sharmishta,

With SET SCREEN, the current screen simply specifies the next screen in the chain. control branches to this next screen as soon as the 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 (or screen chain) is called in. The called screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screen from the main application screen to let them enter secondary information. After they have completed their entries, 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 into the current one.

The LEAVE SCREEN statement ends the current screen and calls the subsequent screen. The next screen is either the static next screen or a dynamic next screen. In the second case, you must override the static next screen using the SET SCREEN statement before the LEAVE SCREEN statement.

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

Hope this helps you.

Regards,

Chandra Sekhar

8 REPLIES 8

Former Member
0 Kudos

Hi Sharmishta,

With SET SCREEN, the current screen simply specifies the next screen in the chain. control branches to this next screen as soon as the 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 (or screen chain) is called in. The called screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screen from the main application screen to let them enter secondary information. After they have completed their entries, 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 into the current one.

The LEAVE SCREEN statement ends the current screen and calls the subsequent screen. The next screen is either the static next screen or a dynamic next screen. In the second case, you must override the static next screen using the SET SCREEN statement before the LEAVE SCREEN statement.

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

Hope this helps you.

Regards,

Chandra Sekhar

Former Member
0 Kudos

Hii!

Check out this link

https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=5068583

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 .

Regards

Abhijeet

Former Member
0 Kudos

Hi

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 .

With CALL SCREEN, the current (calling) chain is suspended, and a next screen (or screen chain) is called in. The called screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screen from the main application screen to let them enter secondary information. After they have completed their entries, 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 into the current one.

Reward if useful

Regards

Divya

Former Member
0 Kudos

CALL SCREEN

Syntax

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.

The statement CALL SCREEN accesses the dynpros of the relevant main program of the current program group and these use the global data and dialog modules of the main program. Except when calling a dynpro in an externally called subroutine, the main program usually is the current program. If the specified dynpro does not exist in the main program of the program group, an untreatable exception occurs.

By default, the screens of all dynpros of the called dynpro sequence are displayed in the current window. Use addition STARTING AT to open a modal dialog window.

Addition

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

Effect

Use addition STARTING AT to open a new popup level and to display all screens of the called dynpro sequence in a modal dialog window. The upper left corner of the dialog window is determined by the values col1 and lin1 for column and line. The values refer to the window with popup level 0. The lower right corner is set automatically or you can use col2 and lin2 to specify it after ENDING AT. For col1, lin1, col2 and lin2, data objects of type i are expected. The values of col1, lin1 should be smaller than those of col2, lin2, because otherwise the behavior is undefined. The maximum popup level is 9.

Notes

The called dynpro should not be a selection screen. To call a selection screen, use the statement CALL SELECTION-SCREEN.

When nesting dynpro sequences and creating popup levels, remember that usually during the program execution, you are already within a (nested) dynpro sequence and that the system itself can also create other dynpro sequences or popup levels (for example, field or input help or messages in dialog windows). For this reason, you should never use the maximum values of 50 dynpro sequences or 9 popup levels within a program to capacity.

If during the processing of a modal dialog window a new dynpro sequence is called, it must be started in another popup level. You cannot use the statement CALL SCREEN without addition STARTING AT in this case.

When calling a dynpro in a dialog window, specify the window as a modal dialog window in its properties and set an appropriate GUI status beforehand. We recommend that a dynpro sequence in a modal dialog window consists of one dynpro only.

Exceptions

Non-Catchable Exceptions

Cause: Dynpro not found.

Runtime Error: DYNPRO_NOT_FOUND

SET SCREEN

Syntax

SET SCREEN dynnr.

Effect

This statement sets thescreen with the screen number specified in dynnr, as the next screen for processing of the current screen. For dynnr, a data object of type n and length 4 is expected. It must contain either the screen number of a screen in the main program of the current program group or the value 0, otherwise a non-catchable exception will be triggered. The specified next screen overwrites the previously-set next screen.

The next screen is automatically called when the system finishes the PAI processing of the current screen. If the screen number of the next screen is 0, the current next screen is ended.

Note

One next screen is always set during the processing of a screen. After you call a screen, the next screen whose characteristics are defined statically, applies; this next screen can be overwritten with the SET SCREEN statement for the duration of the actual next screen processing.

LEAVE [TO] SCREEN

Syntax

LEAVE { SCREEN | {TO SCREEN dynnr} }.

Variants:

1. LEAVE SCREEN.

2. LEAVE TO SCREEN dynnr.

Effect

This statement ends the processing of the current screen. The current processing block of the ABAP program and the current processing block of the dynpro are left immediately.

Variant 1

LEAVE SCREEN.

Effect

The variant LEAVE SCREEN calls the current next screen. This is either statically specified in the properties of the current screen or has been set before using the statement SET SCREEN.

Variant 2

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.

Regards,

Joy.

Former Member
0 Kudos

HI,

Set screen:

This statement sets thescreen with the screen number specified in dynnr, as the next screen for processing of the current screen. For dynnr, a data object of type n and length 4 is expected. It must contain either the screen number of a screen in the main program of the current program group or the value 0, otherwise a non-catchable exception will be triggered. The specified next screen overwrites the previously-set next screen.

The next screen is automatically called when the system finishes the PAI processing of the current screen. If the screen number of the next screen is 0, the current next screen is ended.

Note

One next screen is always set during the processing of a screen. After you call a screen, the next screen whose characteristics are defined statically, applies; this next screen can be overwritten with the SET SCREEN statement for the duration of the actual next screen processing.

LEAVE SCREEN:

The variant LEAVE SCREEN calls the current next screen. This is either statically specified in the properties of the current screen or has been set before using the statement SET SCREEN.

CALL SCREEN:

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.

The statement CALL SCREEN accesses the dynpros of the relevant main program of the current program group and these use the global data and dialog modules of the main program. Except when calling a dynpro in an externally called subroutine, the main program usually is the current program. If the specified dynpro does not exist in the main program of the program group, an untreatable exception occurs.

By default, the screens of all dynpros of the called dynpro sequence are displayed in the current window. Use addition STARTING AT to open a modal dialog window.

Former Member
0 Kudos

hi Dadapure ,

SET SCREEN

This statement sets thescreen with the screen number specified in dynnr, as the next screen for processing of the current screen. For dynnr, a data object of type n and length 4 is expected. It must contain either the screen number of a screen in the main program of the current program group or the value 0, otherwise a non-catchable exception will be triggered. The specified next screen overwrites the previously-set next screen.

The next screen is automatically called when the system finishes the PAI processing of the current screen. If the screen number of the next screen is 0, the current next screen is ended.

CALL SCREEN

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.

The statement CALL SCREEN accesses the dynpros of the relevant main program of the current program group and these use the global data and dialog modules of the main program. Except when calling a dynpro in an externally called subroutine, the main program usually is the current program. If the specified dynpro does not exist in the main program of the program group, an untreatable exception occurs.

By default, the screens of all dynpros of the called dynpro sequence are displayed in the current window. Use addition STARTING AT to open a modal dialog window.

LEAVE SCREEN

To SET a new screen without processing current screen, you need to use the following two statements together:

SET SCREEN 200.

LEAVE SCREEN.

Or a Single statement

LEAVE TO SCREEN 200.

Thanks,

Murugan.B

Former Member
0 Kudos

Hi,

1. SET SCREEN dynnr

This statement sets thescreen with the screen number specified in dynnr, as the next screen for processing of the current screen.

One next screen is always set during the processing of a screen. After you call a screen, the next screen whose characteristics are defined statically, applies; this next screen can be overwritten with the SET SCREEN statement for the duration of the actual next screen processing.

2.CALL SCREEN dynnr

[STARTING AT col1 lin1

[ENDING AT col2 lin2]].

This statement calls the dynpro with the dynpro number specified in dynnr.

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.

3. LEAVE SCREEN.

This statement ends the processing of the current screen. The current processing block of the ABAP program and the current processing block of the dynpro are left immediately.

The variant LEAVE SCREEN calls the current next screen. This is either statically specified in the properties of the current screen or has been set before using the statement SET SCREEN.

4.LEAVE TO SCREEN dynnr.

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.

This statement does not terminate the entire screen 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.

Hope this helps you.

plz reward if useful.

thanks,

dhanashri.