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

Start md04 with pre-values

Former Member
0 Likes
884

Hi,

I want to run the md04 and when the transaction starts i want to fill the Material field and the plant field with two values that come from the program that calls the transaction and give the ok code to go to the screen that gives the information of the material.

basicly what i want is, i have a program, he calls the transaction MD04 and pass the values for material and plant and gives ok without the user see, and then what the user sees is the screen with the details of the material.

Thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
693

Please try this.

            set parameter id 'MAT' field itab-matnr.
            set parameter id 'WRK' field itab-werks.
            call transaction 'MD04' and skip first screen.

Regards,

Rich Heilman

Hi,

I want to run the md04 and when the transaction starts i want to fill the Material field and the plant field with two values that come from the program that calls the transaction and give the ok code to go to the screen that gives the information of the material.

basicly what i want is, i have a program, he calls the transaction MD04 and pass the values for material and plant and gives ok without the user see, and then what the user sees is the screen with the details of the material.

Thanks

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
694

Please try this.

            set parameter id 'MAT' field itab-matnr.
            set parameter id 'WRK' field itab-werks.
            call transaction 'MD04' and skip first screen.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
693

SET PARAMETER ID pid FIELD f.

(with pid = MAT for material and pid = WRK for plant and your values in 'f').

Then:

CALL TRANSACTION MD04 AND SKIP FIRST SCREEN

Read only

Former Member
0 Likes
693

Hi Ricardo,

You can use call transaction statement from your program.

The syntax would be :

*Fill material # in mat_no and plant # in plant_no field.

SET PARAMETER ID: 'MAT' FIELD mat_no,

'WRK' FIELD plant_no.

CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.

Cheers,

Vikram

Pls reward for helpful replies!!