2006 Nov 18 10:45 AM
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
2006 Nov 18 10:51 AM
HI,
follow below logic
if sy-tcode <> 'SM37'.
check sy-tcode <> 'ME21'.
...validation
endif.
Regards
amole
2006 Nov 18 10:56 AM
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
2006 Nov 18 11:10 AM
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