Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in BAPI_GOODSMVT_CREATE

Former Member
0 Kudos
103

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 ?

5 REPLIES 5

madhu_vadlamani
Active Contributor
0 Kudos
57

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

Former Member
0 Kudos
57

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

JL23
Active Contributor
0 Kudos
57

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

carlos_rodriguez4
Active Participant
0 Kudos
57

Check [this|https://wiki.sdn.sap.com/wiki/display/ERPSCM/How%20To%20Goods%20Movements%20with%20BAPI] out

eduardo_hinojosa
Active Contributor
0 Kudos
57

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