10-15-2007 7:46 PM
Hi ALL,
I have 2 programs (Zpgm1 and Zpgm2) and i am calling this program from another a customer screen based on a push button.
if pgm1 = 'X'.
submit ZPGM1 via selection-screen
with p_e = 'X' and return.
ELSEIF PGM2 = 'X'.
submit ZPGM2 via selection-screen
with p_t = 'ABC' and return.
ENDIF.
In ZPGM1
parameters : p_ET radiobutton group gp1,
p_TT radiobutton group gp1,
p_E type c no-display.
at selection-screen output.
if p_E = 'X'.
loop at screen.
if screen-name = 'P_ET' .
screen-INPUT = '0'.
modify screen.
endif.
ELSE.
Loop at screen.
if screen-name = 'P_TT' .
screen-INPUT = '0'.
modify screen.
endif.
ENDIF.
In ZPGM2
parameters : p_WERKS LIKE MARC-WERKS,
p_T type c no-display.
at selection-screen output.
if p_T = 'X'.
loop at screen.
if screen-name = 'P_WERKS' .
screen-INPUT = '0'.
modify screen.
endif.
ELSE.
Loop at screen.
if screen-name = 'P_WERKS' .
screen-INPUT = '1'.
modify screen.
endif.
ENDIF.
In zpgm1 when i hit the back button on the selection screen, it triggers the at selection-screen output. and if i press the back button thats when it takes me to orginal pgm from where iam calling
but in zpgm2 when i press the back button the at selection-screen output. doesnot triggers and takes me to orginal program
This is what i want
The only diff bet 2 pgms is one is tradition ALV programs and other is OO alv PROGRAMS
IS THAT A REASON FOR ITS BEHAVIOUR
LET ME KNOW
Thanks
10-16-2007 10:00 AM
Hi,
In the BACK button, add following logic:
sy-lsind = sy-lsind - 1.
if above doesnt work, then hardcode as follows:
sy-lsind = 1.
Best regards,
Prashant