cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Calling last calling program in the stack

saurabh_shukla4
Explorer
730

Hello experts,

  I have a program (dialog program - scr 400) screen and button on the screen. It's calling another program (+ transaction) having selection screen and after execution ALV grid displayed. After performing work it should back to original calling screen having dialog program screen (400).

ZPROGRAM1 (Screen 400) -> Call Transaction - ZPROGRAM2 (+selection screen) -> ALV screen and then back with same sequence.

We have tried with, AT SELECTION SCREEN EXIT-COMMAND and leave 0 or set screen 0 but somehow it is not working. CALL SCREEN will not work since it back button is in another program which is called.

How to call previous screens which are in call stack.

Regards,

PD

Sandra_Rossi
Active Contributor
What is your issue? Leaving the ALV screen and go back to the selection screen? Leaving the selection screen? Then post the relevant code. No need to mix your question with Web Dynpro and CALL TRANSACTION.
View Entire Topic
saurabh_shukla4
Explorer
0 Kudos

@ulrich_mhrke 

Our code in ZPROG1 (having total 4 screens 100->200->300->400) from calling dialog programming module (at Screen no.400) on button click sy-ucomm case:

PAI module:

 

CALL TRANSACTION 'ZTRANS'  "AND SKIP FIRST SCREEN. "same is the program name ZTRANS

 

In ZTRANS program, there is selection screen and after executing selection screen thee is ALV display. This is working fine. After back from ALV, it is again coming back to Selection screen of ZTRANS. After this if we back to ZTRANS.

 

AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'PF01'.  "back or exit button FCODE
  SET SCREEN 0.

 

It is exiting from ZTRANS program (transaction) totally and not coming back to original calling screen of ZPROG1 (400). 

If we use, leave to screen 400, it will not find screen since both are different programs. If we do call transaction ZPROG1 then it is calling transaction 100 screen no which is starting. But, we want to come back to 400 (screen).

Any help appreciated.

PD

 

 

ulrich_mhrke
Explorer
0 Kudos
Please send the whole flow logic of screen 400 of program ZPROG1 and the whole PAI module where you call transaction ZTRANS.
ulrich_mhrke
Explorer
0 Kudos
Look at the Attributes of screen 400 of program ZPROG1. Maybe the "Next Screen" is set to 0 (empty in change mode).
Sandra_Rossi
Active Contributor
0 Kudos

deleted