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

Call T-Code MD04 initial screen

Former Member
0 Likes
808

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
659

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

3 REPLIES 3
Read only

Former Member
0 Likes
660

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

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
659

if sy-tcode = 'MD04' and sy-ucomm = 'BACK'.

set screen 300. leave screen.

endif.

Read only

Former Member
0 Likes
659

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