‎2005 Jun 22 6:13 AM
Hi,
-
GET PARAMETER ID
is returning sy-subrc 4
in field exit
for MM02
-
I have used the below mentioned
code in a field exit for some
field on tcode MM02.
In MM02, there is one field WERKS (Plant)
which i need to capture in my field exit.
But not working.
The same is working for MATNR.
-
data : werks TYPE marc-werks.
GET PARAMETER ID 'WRK' FIELD werks.
-
Can anybody guide ?
Regards,
Amit Mittal.
‎2005 Jun 22 7:07 AM
for get parameter to work the same should have been set before in the program or maintained at system->user profile->owndata -> parameters tab.
<b><u>here are the few lines from ABAP key word documentation</u></b>
If the SPA/GPA parameter specified in pid was not yet created in the SAP Memory for the current user, the data object dobj is initialized and sy-subrc is set to 4.
sy-subrc Meaning
0 The SPA/GPA parameter specified in pid exists for the current user in the SAP Memory and its value was transferred to the target field.
4 The SPA/GPA parameter specified in pid does not exist for the current user in the SAP Memory.
An SPA/GPA parameter that is readable with GET PARAMETER can previously have been created in the SAP Memory using the SET PARAMETER statement or automatically during the event PAI of a screen or selection screen.
Regards
Raja