2010 Feb 23 6:12 AM
Hello
I have query which calling transaction MD04 which needs 2 parameters : Material & Plant.
I call the Transaction (from the query) by calling the hereunder ABAP Report Program.
Its doesn'twork...
Can u advise ?
Thanks.
Amnon.
REPORT ZMD04.
data : p_matnr type matnr,
p_werks type werks_d.
IMPORT MDKP-MATNR TO p_matnr FROM MEMORY ID 'P_MAT'.
SET PARAMETER ID 'MAT' FIELD P_MATNR.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
call TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
Hello
I have query which calling transaction MD04 which needs 2 parameters : Material & Plant.
I call the Transaction (from the query) by calling the hereunder ABAP Report Program.
Its doesn'twork...
Can u advise ?
Thanks.
Amnon.
REPORT ZMD04.
data : p_matnr type matnr,
p_werks type werks_d.
IMPORT MDKP-MATNR TO p_matnr FROM MEMORY ID 'P_MAT'.
SET PARAMETER ID 'MAT' FIELD P_MATNR.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
call TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
2010 Feb 23 6:45 AM
Hi,
What's your SAP version. I have tried with ECC6.0 it's working, i.e. it's calling the transaction. You can try with another way by submitting the program like SUBMIT SAPMM61R AND RETURN.
Thanks,
Abhijit
2010 Feb 23 9:04 AM
Hello,
Thanks for your reply.
The transaction MD04 opened, but without the material and plant value from the line in the Abap-Query. Tthe parameters value in report are empty.
When the transaction MD04 opened, i get the error massage "fill in all required fields.
I use Ecc 6.
Amnon
2010 Feb 23 9:23 AM
HI ,
Your code is proper & working.
Take any matnr & werks like below.
data : p_matnr type matnr VALUE '000000001000004065',
p_werks type werks_d VALUE '2001'.
IMPORT MDKP-MATNR TO p_matnr FROM MEMORY ID 'P_MAT'.
SET PARAMETER ID 'MAT' FIELD P_MATNR.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
call TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
Regard's
Shabbir
2010 Feb 23 9:42 AM
Hi Amnon,
I tried this and working fine.
data : p_matnr type matnr VALUE '111',
p_werks type werks_d VALUE '123'.
SET PARAMETER ID 'MAT' FIELD P_MATNR.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
call TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
Please check your code. import may not working in your case. try in debug and check the value.
Regards,
Venkat
2010 Feb 23 9:57 AM
Hi, <li> Problem may be with IMPORT MDKP-MATNR TO p_matnr FROM MEMORY ID 'P_MAT' statement. Check corresponding EXPORT statement where you are passing p_matnr value. <li>It does not skip first screen, if you pass empty material number. Thanks Venkat.O
2010 Feb 23 12:25 PM
Hello Experts
I found the problem. I need to define the data with "PARAMETERS" command and not with "DATA".
Here is the final report :
REPORT ZMD04.
parameters : p_matnr type matnr,
parameters : p_werks type werks_d.
SET PARAMETER ID 'MAT' FIELD P_MATNR.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
call TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |