2014 Aug 29 2:28 AM
Hello experts,i create a production order without material with TCODE co07,then i use BAPI 'BAPI_GOODSMVT_CREATE' to do the by-products GR(531),it is sucessful at this point,but when i do 532 reversal,it is failed,i have set below BAPI parameters:
ls_goodsmvt_item-material = gs_list-matnr.
ls_goodsmvt_item-plant = gs_list-werks.
ls_goodsmvt_item-stge_loc = gs_list-lgort.
ls_goodsmvt_item-orderid = gs_list-aufnr.
ls_goodsmvt_item-move_type = '532'.
ls_goodsmvt_item-order_itno = gs_list-posnr.
ls_goodsmvt_item-reserv_no = gs_list-rsnum.
ls_goodsmvt_item-res_item = gs_list-rspos.
ls_goodsmvt_item-entry_uom = gs_list-meins.
After i run the BAPI and commit,the posting is sucessfull, but the move type 532 would be replaced by 531 within the BAPI,pls. help me,thank you in advance.
2014 Aug 29 8:37 AM
I debug the BAPI and solve it by myself,implement BADI MB_BAPI_GOODSMVT_CREATE to set the field xstor fixed value 1,and create a record in table T156N.
2014 Aug 29 3:37 AM
I do a test,if i do not transport reservation parameters(reserv_no,res_item),the bapi could post the 532 sucessfully,but it posted to unplaned goods issue,i want to post to planned goods issue,pls. help.
2014 Aug 29 4:47 AM
Hi, not a direct answer to your question, but what if you use BAPI_GOODSMVT_CANCEL ?
Regards Jack
2014 Aug 29 5:17 AM
Thank you,i can't use BAPI_GOODSMVT_CANCEL,because i need to change the quantity.
2014 Aug 29 8:37 AM
I debug the BAPI and solve it by myself,implement BADI MB_BAPI_GOODSMVT_CREATE to set the field xstor fixed value 1,and create a record in table T156N.