‎2010 Dec 29 12:15 PM
Hi Folks,
I am developing a module pool program for MD12 (Planned Order) which further updates MD04.
In my initial screen user enters planned order no and hits enter. It navigates to second screen of MD12. Here in this screen
user enters Start Date, End date etc and has more functionalities. Later on the dates calculated in MD12 triggers in MD04 second screen.
i.e. After few screen transactions user moves to MD04 via MD12 , directly to second screen using parameter ID.
I need your suggestions on how can i know when user hits the back button in MD04 i need to go to MD04 initial screen.
Now it's going to selection screen if i use
SET SCREEN 0. LEAVE SCREEN.
Thanks in advance,
Fernissa Fahamalathi
‎2010 Dec 29 12:24 PM
Hope my understanding is right. Then i would suggest you to use these :
LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].
CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>]
‎2010 Dec 29 12:24 PM
Hope my understanding is right. Then i would suggest you to use these :
LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].
CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>]
‎2010 Dec 29 12:42 PM
if sy-tcode = 'MD04' and sy-ucomm = 'BACK'.
set screen 300. leave screen.
endif.
‎2010 Dec 29 1:00 PM
Hi K.Manas & Keshav T,
Thanks a lot for your answers.
I had used CALL TRANSACTION before hand and SKIP FIRST SCREEN. But if you read the documentation it suggests this statement saves the data of the calling program, and starts transaction <tcod>.
But on a happy note,
LEAVE TO TRANSACTION and SKIP FIRST SCREEN worked. This is what i needed.This statement ends the calling program and starts transaction <tcod>.
~ as suggested by K. Manas
From MD12 screen after doing some operations i directly trigger to MD04 second screen. I cannot use
SY-TCODE = 'MD04' and SY-UCOMM = 'BACK' as user may not press back and go further.
~ as suggested by Keshav T
Thanks a lot again,
Fernissa Fahamalathi