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
769

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 MM01/02 or any other transaction, 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 or ME21 assume) 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='ME21'

........<My field exit validation>........

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

Please help me to exclude a particular transaction(s) while valiating the field exit

Regards

Shiva

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 MM01/02 or any other transaction, 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 or ME21 assume) 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='ME21'

........<My field exit validation>........

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

Please help me to exclude a particular transaction(s) while valiating the field exit

Regards

Shiva

3 REPLIES 3
Read only

Former Member
0 Likes
698

HI,

follow below logic

if sy-tcode <> 'SM37'.

check sy-tcode <> 'ME21'.

...validation

endif.

Regards

amole

Read only

0 Likes
698

hi amole,

I dont think there is no differrence in if sy-tcode <>SE37

and check statement as in any case sy-tcode will be SE37

as i m doing the validation inside the Function module of the field exit...

Shiva

Read only

0 Likes
698

Hi

I don't believe when an exit is triggered the transaction code is SE37, because it's the trx for function editor.

Try to know the value of trx code writing code in a file in the field-exit

Max