Hello,
I need to update the fields "Plant" and "Work Center" for each operations when saving an order in IW32.
I know that the user exit that I have to use is ZXWOCU07.
These 2 fields have to be replaced by the values in the header data.
The field "Plant" is updated correctly but "Work Center" always keeps it's old value.
Could any one tell my what I'm doing wrong?
There is the code I use :
CALLFUNCTION'CO_BO_OPR_OF_ORDER_GET'
EXPORTING
aufnr_imp = caufvd_imp-aufnr
TABLES
afvgd_get = lit_afvgdget.
LOOPAT lit_afvgdget ASSIGNING<l_fs_wa_afvg> .
<l_fs_wa_afvg>-ARBPL = caufvd_imp-VAPLZ.
<l_fs_wa_afvg>-WERKS = caufvd_imp-VAWRK.
<l_fs_wa_afvg>-VBKZ = 'U'.
endloop.
"Updating operations buffer
CALLFUNCTION'CO_BO_UPDATE_OPR_OF_ORDER'
EXPORTING
FLG_NO_SCHED = abap_true
TABLES
afvgd_upd = lit_afvgdget.
Thanks a lot for your help