Hello guys,
I'm looking for a way to fill some fields when creating an order (TA: IW31) automatically in dependence of other fields. In my case I created a custom field ZZBKP which I displayed on enhancement tab in order. When filling this field, the SAP standard field ILART should be filled as well.
At the moment I use exits EXIT_SAPLCOIH_018 / 019 for handling the custom field. Unfortunately in this exit I only have the custom fields in access and not the SAP standard fields of structure CAUFVD.
Is there any possibility (exit, BADI, BTE) to get some standard field of an order filled in dependence of some other field?
Regards
Michael
Check this thread: Need User exit or BADI for IW31/IW32 transactions | SCN
I fear there is no such BAdI/Exit. So you may be required to either use
Warning : Also insure the updated field is correct, as the program won't execute the expected PAI for this field.
Regards,
Raymond
Hello Michael,
This code in the include ZXWOCU07 (user-exit IWO10009) performs your requirement at SAVE event of the Order.
IF CAUFVD_IMP-ZZBKP = 'XYZ1234567' .
CAUFVD_IMP-ILART = '023'.
ENDIF.
CALL FUNCTION 'CO_IH_SET_HEADER'
EXPORTING
CAUFVD_IMP = CAUFVD_IMP.
PERFORM HEADER_UPDATE(SAPLCOIH).
Means: When the value 'XYZ1234567' is given in your custom field, then at the Save event of the Order the ILART field will be filled with '023' value. I have tested this. Works fine.
Hope this helps.
KJogeswaraRao
Add a comment