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: 

Field exits

Former Member
0 Kudos
73

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

Former Member
0 Kudos
47

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

Former Member
0 Kudos
47

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

0 Kudos
47

hi,

the transaction OMSF is a standard transaction in SPRO

i need to exclude this transaction

Regards

Shiva

0 Kudos
47

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

Former Member
0 Kudos
48

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.