11-12-2012 2:02 PM
Hi guys,
I'm implementing a Screen Exit on MM01/MM02/MM03 and I'm trying to get the value from the field MARC-WERKS using the commands below:
DATA: w_matnr_aux TYPE mara-matnr,
w_werks TYPE marc-werks,
w_marc TYPE marc.
GET PARAMETER ID 'MAT' FIELD w_matnr_aux.
GET PARAMETER ID 'WRK' FIELD w_werks.
So, when I access the MM02 transaction to change the Material Data the ID 'WRK' is empty, but I can get the MATNR using the ID 'MAT'.
How can I get the value from WERKS???
Please, could somebody help me???
Thanks a lot!!
Regards,
Marcos Fernando Dotta
11-12-2012 3:45 PM
'WRK' will not be populated unless you access a screen which is plant dependent, or which contains MARC.
11-12-2012 3:45 PM
'WRK' will not be populated unless you access a screen which is plant dependent, or which contains MARC.
11-12-2012 3:57 PM
Hi Chinmay,
The view "Sales: General/Plant Data" is accessed. I choose this view, but the field was empty too.
Thanks,
Marcos F. Dotta
11-12-2012 4:21 PM
hello,
The PARAMETER ID 'WRK' needs to be SET before you use the GET command. So if somehow it is not set or populated the GET command won't work. This PARAMETER ID needs to be set somewhere for you to get it's value.
best regards,
swanand
11-12-2012 4:28 PM
Hi Swanand,
I was trying to find an user-exit where I could to set this parameter id, but I didn't find it until now. Did you already use this parameter in an user-exit for MM02 transaction code?
Thanks,
Marcos F. Dotta
11-12-2012 4:34 PM
hello,
This means you are trying to initialize the material or plant fields and then later read it before the screen exit ?
I may have done it in the past, cannot recollect now. You could get one of those find user exit program for a t-code and find the exits for MM01 and see in debug one suitable for you.
best regards,
swanand
07-21-2016 8:15 AM