Application Development 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: 

MM01/MM02/MM03 - screen exit - "GET PARAMETER ID 'WRK'" doesn't work.

marcosfernando_dotta
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

'WRK' will not be populated unless you access a screen which is plant dependent, or which contains MARC.

6 REPLIES 6

Former Member
0 Kudos

'WRK' will not be populated unless you access a screen which is plant dependent, or which contains MARC.

0 Kudos

Hi Chinmay,

The view "Sales: General/Plant Data" is accessed. I choose this view, but the field was empty too.

Thanks,

Marcos F. Dotta

0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

This message was moderated.