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

Skipping screen backwards.

Former Member
0 Likes
447

Hi Guys,

I would like to ask for your help. I cant come out with something that will return to the 2nd screen of my program from the 4th screen.

Ex.

1st screen - Selection-screen

2nd screen - report

3rd screen - report per material

4th screen - other tranasaction.

currently my program returns to the 3rd screen from the 4th screen. The requirement is to return to the 2nd screen from the 4th screen. How can I do this? Thanks in advance guys! help will be much appreciated. Good day!

Regards,

Mike Nacionales

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
422

Hi,

1st screen - Selection-screen -- SCREEN 100

2nd screen - report -- SCREEN 200

3rd screen - report per material -- SCREEN 300

4th screen - other tranasaction. -- SCREEN 400

From screen 400, if you want to come to screen 200, then

LEAVE TO SCREEN 200.

Best regards,

Prashant

3 REPLIES 3
Read only

Former Member
0 Likes
423

Hi,

1st screen - Selection-screen -- SCREEN 100

2nd screen - report -- SCREEN 200

3rd screen - report per material -- SCREEN 300

4th screen - other tranasaction. -- SCREEN 400

From screen 400, if you want to come to screen 200, then

LEAVE TO SCREEN 200.

Best regards,

Prashant

Read only

0 Likes
422

I recieved a dynpro error. It says that screen 200 doesnt exist?

Read only

Former Member
0 Likes
422

Syntax Diagram

LEAVE TO TRANSACTION

Syntax

LEAVE TO { {TRANSACTION ta} | {CURRENT TRANSACTION} }

[AND SKIP FIRST SCREEN].

Addition:

... AND SKIP FIRST SCREEN

Effect

The statement LEAVE TO TRANSACTION calls the transaction whose transaction code is contained in the character-type data object ta or the current transaction. ta must contain the transaction code in upper case.

When CURRENT TRANSACTION is specified (as of release 6.20), the current transaction is called using the transaction code that was used to call the transaction using CALL TRANSACTION or LEAVE TO TRANSACTION. This transaction code is contained in the system field sy-tcode except for parameter transactions or variant transactions. When using parameter actions or variant transactions, their transaction code is used for the call and sy-tcode contains the name of the implicitly called dialog transaction.

When using LEAVE TO TRANSACTION, the current call sequence is exited completely. Upon completion of the called transaction, the runtime environment returns to the position where the first program in the call sequence was called.

When calling the transaction, the ABAP program to which the transaction code is linked is loaded into a new internal session. All previous internal sessions are deleted from the stack. At the same time, the ABAP memory is deleted, which means that EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION. The steps of the called dialog transaction or OO transaction (as of release 6.10) are the same as with CALL TRANSACTION. When the called transaction is exited, the runtime environment returns to the position where the first program in the current call sequence was called.

If the transaction specified in ta is not found, or if ta is initial or blank, the stack of the current call sequence is deleted and the runtime environment returns directly to the position where the first program in the current call sequence was called. If ta is not initial, an appropriate message appears in the status bar.

The LEAVE TO TRANSACTION statement always terminates the current call sequence, regardless of whether or not a new transaction can be called.

Addition

... AND SKIP FIRST SCREEN

Effect

The addition AND SKIP FIRST SCREEN has the same meaning as CALL TRANSACTION.

Notes

Contrary to the statement CALL TRANSACTION, the authorization of the current user for executing the called transaction is automatically checked when using the statement LEAVE TO TRANSACTION.

You can use CURRENT TRANSACTION in the call to execute a current parameter transaction or variant transaction with the corresponding parameters or the transaction variant. Alternatively, the method GET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the current transaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.