2011 Dec 21 9:46 AM
Hi
I want to do MB1B through bapi BAPI_GOODSMVT_CREATE . For that I am passing GOODSMVT_CODE = 04 .
But after executing it create delivery instead of material document .
can any body suggest me how can I create material document ?
2011 Dec 22 3:12 AM
Hi Vikram,
Paste your code.Pleas explain this to functional people and take the input values from them. Parallel check with MB_CREATE_GOODS_MOVEMENT.
Regards,
Madhu.
Edited by: madhurao123 on Dec 22, 2011 8:47 AM
2011 Dec 22 3:24 AM
Hi ,
how do you its creating Delivery Document ? , check MB03 with created document .....
this BAPI doesnt have Extra Codes to create 2 diff documents...
regards
Prabhu
2011 Dec 22 9:44 AM
I think that a material document is created at the same time as you get a delivery document, the delivery document is probably created because your movement is for a storage location that is warehouse managed and uses deliveries instead of Transport Orders.
try the same movement with MIGO, I am pretty certain that you get a delivery there too.
Edited by: Jürgen L. on Dec 22, 2011 10:45 AM
2011 Dec 22 3:41 PM
Check [this|https://wiki.sdn.sap.com/wiki/display/ERPSCM/How%20To%20Goods%20Movements%20with%20BAPI] out
2011 Dec 22 4:59 PM
Hi,
Try with this:
* other code
SELECT SINGLE gmcode FROM t158g
INTO l_goodsmvt_code
WHERE tcode = 'MB1B'.
* other code
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = l_goodsmvt_header
goodsmvt_code = l_goodsmvt_code
testrun = ' '
IMPORTING
goodsmvt_headret = l_goodsmvt_headret
materialdocument = l_mblnr
matdocumentyear = l_mjahr
TABLES
goodsmvt_item = i_goodsmvt_item
return = i_return.
* other code
I hope this helps you
Regards
Eduardo