Hey Guys,
Iu2019ve created one new field on VBAK called zzminvaluecheck and then in order to make this able to be changeable by BAPI I have also replicate it on the follow structures:
a) VBAKKOZ ( NEW FIELD WITH 3 CHARACTERS)
b) VBAKKOZX (NEW FIELD WITH 1 CHARACTER)
c) BAPE_VBAK ( NEW FIELD WITH 3 CHARACTERS)
d) BAPE_VBAKX (NEW FIELD WITH 1 CHARACTER)
This is my code:
wa_order_headerx-updateflag = 'U'.
wa_bape_vbak-vbeln = p_wa_output-vbeln.
wa_bape_vbakx-vbeln = p_wa_output-vbeln.
wa_bape_vbak-zzminvaluecheck = c_no.
wa_bape_vbakx-zzminvaluecheck = 'X'.
clear wa_exten.
wa_exten-structure = 'BAPE_VBAK'.
wa_exten-valuepart1 = wa_bape_vbak.
append wa_exten to ti_exten.
clear wa_exten.
wa_exten-structure = 'BAPE_VBAKX'.
wa_exten-valuepart1 = wa_bape_vbakx.
append wa_exten to ti_exten.
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = p_wa_output-vbeln
order_header_inx = wa_order_headerx
tables
return = ti_return
* ORDER_ITEM_IN =
* ORDER_ITEM_INX =
extensionin = ti_exten.
read table ti_return into wa_return with key type = 'E'.
if sy-subrc eq 0.
wa_output1-mesg = wa_return-message.
call function 'BAPI_TRANSACTION_ROLLBACK'.
else.
wa_output1-mesg = text-021.
call function 'BAPI_TRANSACTION_COMMIT' .
endif.
Iu2019ve got the following message:
ORDER_HEADER_IN has been processed successfully
No data was changed.
ACTUALLY NOTHING WAS CHANGED!
I missed something, can any of you guys tell me what is wrong with this code?
Best regards,
Alex
Edited by: ACR on Feb 22, 2011 11:27 PM
Moderator message: please use more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Feb 23, 2011 1:08 PM