2006 Nov 20 4:53 PM
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) 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) 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
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) 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) 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
2006 Nov 20 10:34 PM
Hi,
When you active a field exit (using report RSMODPRF), it is necessary to indicate the program and dynpro number where the field exit will work. Therefore if you define the correct dynpro number in combination with sy-tcode, you should not have problems validating this field.
Regards,
Alejandro.
2006 Nov 20 11:46 PM
Hi
Try to use the system function DY_GET_CURRENT_TRANSACTION to get the trx code:
DATA: TCODE LIKE SY-TCODE.
CALL 'DY_GET_CURRENT_TRANSACTION' ID 'TRANSACTION_NAME'
FIELD TCODE.
IF TCODE = ......
ENDIF.Max
2006 Nov 21 1:13 AM
Hi Shiva
Also, please check if you can make use of system field: <b>SY-CPROG</b>.
Kind Regards
Eswar
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |