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: 

List And Screens

Former Member
0 Kudos

what is the difference between LEAVE TO LIST PROCESSING and LEAVE LIST PROCESSING?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sravanthi,

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.

Reward if useful

I.

8 REPLIES 8

former_member181995
Active Contributor
0 Kudos

Sravanti,

LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN dynnr]. 



Addition: 
... AND RETURN TO SCREEN dynnr 



Effect 
This statement can be executed during PBOand PAI processing. After processing the current dynpro, this statement interrupts the respective dynpro sequence, starts the list processor, and displays the basic list. The basic list consists of the list outputs of all PBO and PAI modules of the dynpro sequence executed to this point. The statement has no effect in the event blocks for reporting events and list events. 

The list dynpro screen of the list processor replaces the screen presented in pop-up level 0. Modal dialog boxes that might be stacked on the display are hidden for the duration of the list display. The GUI status set in the dynpro sequence is used. List events initiated by user actions in the window of the list dynpro call the event blocks of the current main program. The details lists created there are displayed by the list processor in the basic list window (unless statement WINDOW is used). 

The user can exit the list processor or list display by selecting the functions Back, End, or Cancel in the display of list level 0, or using a program with the statement LEAVE LIST PROCESSING. By default, the interrupted dynpro sequence resumes in both cases with PBO processing of the dynpro, in which the list processor was called.

and:

Syntax 
LEAVE LIST-PROCESSING. 



Effect 
This statement immediately exits the list processor. The runtime environment continues the processing with the PBO event of the screen from which the list processor was called using LEAVE TO LIST PROCESSING or the screen that was set using the AND RETURN TO SCREEN addition to this statement. 

If the statement is not executed when the list is displayed by the list processor, it has no effect, except in the event blocks for reporting events. Here it branches to the end of the program and processing continues as described for the SUBMIT statement. 

When the list processor is exited, the list buffer of the screen sequence is initialized. New output statements describe a new basic list. 



Example 
This example shows the recommended procedure for displaying lists during screen sequences. A separate screen 500 is defined for calling the list processor. The screen does not contain any screen elements and it calls a single PBO module call_list but no PAI modules. The entire basic list, including the GUI status, is defined in the PBO module. When the screen is exited using LEAVE SCREEN, its processing is stopped and the list processor is started. The list events are handled in the same program. When the list processor is exited the screen sequence of screen 500 is ended, because the next screen 0 is specified when the list processor is called.

i would suggest such type of doubt must be remove by just taking of SAP help by pressing F4 on these keyword.

because sometime we may miss concept but SAP never.

Amit.

Former Member
0 Kudos

Hi Sravanthi Balabhadrapatruni,

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

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

Regards,

SAP.

Former Member
0 Kudos

if u have any doubt plzz come to me.

Regards,

SAP.

Former Member
0 Kudos

Hi Sravanthi,

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.

Reward if useful

I.

Former Member
0 Kudos

Hi,

Pls Go Through The Following, you will undresyand-

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.

Recommended Procedure

If you want to display lists during screen processing, you should create a separate screen for each list system that you want to call. This screen encapsulates the creation and display of the basic list. It can then be called from anywhere in the program using CALL SCREEN.

The actual screen mask of this screen can remain empty. You do not need any PAI modules, and only a single PBO module. In the PBO module, you define the basic list of the list system and call the list processor.

First, use the

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

statement to call the list display at the end of the screen, and to ensure that, after leaving the list, you return to the point from which the screen was called.

Next, set a GUI status for the list; for example, the default list status SPACE or a list status of your own.

Use one of the following statements to ensure that the empty screen is not displayed:

SUPPRESS DIALOG.

or

LEAVE SCREEN. Instead, the list is displayed immediately at the end of the screen.

Now define the entire basic list, and place any necessary data in the HIDE area.

If you want to process user actions on the list, you need to define the relevant event blocks in your ABAP program. If you want to call more than one independent list system in the program, you must ensure that you can tell them apart in the list event processing. You cannot do this using SY-DYNNR, since the container screen for a list is always number 120. Instead, you could assign a different GUI status to each list, and distinguish between the list systems using the value of SY-PFKEY, or you could place some unique information in the HIDE area of each list system.

Regards,

Sujit

Former Member
0 Kudos

Hello Sravanthi,

Each screen in a screen sequence has a corresponding list system of twenty levels.

You can start this list system using the

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

statement. This statement calls a system program that contains the standard container screen used for lists. This replaces the current screen. On this screen, you can display a basic list and up to 19 detail lists. List processing (reacting to user actions in list events) takes place in the calling program.

You can leave the list system using the

LEAVE LIST-PROCESSING.

statement.

In an executable program, the list system is automatically called after the last reporting event.

***Also go to this link to have a claer idea**

[http://help.sap.com/saphelp_46c/helpdata/en/9f/db9d2f35c111d1829f0000e829fbfe/content.htm]

Best of luck,

Bhumika

Former Member
0 Kudos

Hi,

LEAVE TO LIST-PROCESSING.

Addition

... AND RETURN TO SCREEN scr.

Effect:

Switches from "dialog processing" (module pool, screens) of the current transaction to "list processing". You can then use all the usual list layout commands ( WRITE , SKIP , ...).

After leaving the current screen, the list formatted in this way is displayed implicitly or explicitly by LEAVE SCREEN . Here, all list programming options are possible, e.g. line selection, F keys , windows.

LEAVE LIST-PROCESSING continues with "Processing Before Output" ( PBO ) of the screen which controls the list processing.

After switching to list processing mode with SET PF-STATUS ... , you are recommended to define a GUI (Graphical User Interface) of type List or List in dialog box .

Addition

... AND RETURN TO SCREEN scr.

Effect:

LEAVE LIST-PROCESSING continues with "Processing Before Output" ( PBO ) of the screen scr.

Using LEAVE LIST-PROCESSING to leave list processing explicitly is only necessary in exceptional cases; normally, the standard F keys (F3 Back and F15 Exit ) are sufficient.

Former Member
0 Kudos

thanks,

amit,sujit,swapna,bhumika,indu and rajitha

regards,

sravanthi