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: 

screens

Former Member
0 Kudos

what is the difference between call screen and leave to screen????what is the use of fct code in the layout editor in screen painter?????

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

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 [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.

Notes

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.

This statement must not be used when handling events of the Control Framework.

Regards,

Renjith Michael.

3 REPLIES 3

Former Member
0 Kudos

hi,

call screen will return back to the calling program.

leave to screen won,t

Function code that triggers the PAI event. When the user clicks the tab, the function code is placed in the system field SY-UCOMM. If you are scrolling at the backend, the function code is also placed in the OK_CODE field.

Regards

Former Member
0 Kudos

Hi,

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 [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.

Notes

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.

This statement must not be used when handling events of the Control Framework.

Regards,

Renjith Michael.

Former Member
0 Kudos

my query is answered ....thanks to all