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

Field exits

Former Member
0 Likes
703

Hi All,

I have created a field exit for data element(MATKL) and inside the field exit function module i have done a validation and raised an error message.

When i m exectuing the transactions such as OMSF (SPRO->Logistsis->MasterData->Define Material group) , the error message is triggering and the field exit is working fine.

Now i have a requirement that this validation should neglect/not consider one particular transaction(eg: OMSF) and allow me to enter any value for MATKL field in that particular tranascation.

I tried to add my validation inside the field exit function module by checking sy-tcode...

i.e

***********************************************************

check not sy-tcode='OSMF'

if input = 'DC14'

message e004 with 'Obselete material group'

endif.

end function.

*******************************************************

but in this case the sy-tcode value is being SM30 as i m validating inside the FM.

In this case if i validate for sy-tcode for SM30 my requirement fails....

So in such cases i need a differentiator for recognising the transaction OSMF

Please help me to exclude this particular transaction while validating the field exit

Regards

Shiva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
677

when u enter OMSF the sy-ucomm holds this value...at this moment u might have to store this in some variable and use this variable.

when u enter OMSF the sy-ucomm holds this value...at this moment u might have to store this in some variable and use this variable.

4 REPLIES 4
Read only

Former Member
0 Likes
677

what u do is create a t-code for the requirement instead of SM30 and use this t-code in ur validation.

Read only

0 Likes
677

hi,

the transaction OMSF is a standard transaction in SPRO

i need to exclude this transaction

Regards

Shiva

Read only

0 Likes
677

Can you check the value in the field SY-MSGV1 ? It seems to contain the original transaction.

Read only

Former Member
0 Likes
678

when u enter OMSF the sy-ucomm holds this value...at this moment u might have to store this in some variable and use this variable.