<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BAPI_GOODSMVT_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210311#M133278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.4ap.de/abap/bapi_goodsmvt_create.php" target="test_blank"&gt;http://www.4ap.de/abap/bapi_goodsmvt_create.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Mar 2006 04:43:57 GMT</pubDate>
    <dc:creator>ferry_lianto</dc:creator>
    <dc:date>2006-03-19T04:43:57Z</dc:date>
    <item>
      <title>BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210309#M133276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have to do a material stock movement from one batch to another. I'm trying to use the BAPI 'BAPI_GOODSMVT_CREATE' that will allow me to&lt;/P&gt;&lt;P&gt;do a 309 movement. Anyone has done something similar or has an example to share? Also I want to know what data are necessary, and what fields are mandatory to assign in the item table?. Help will be appreciated. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sebastian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2006 00:06:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210309#M133276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-19T00:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210310#M133277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some sample code from one of my programs, which does a 551 movement type.  This should get you started.  Just check the RETURN table for messages, they should tell you what you are missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


* Structures for BAPI
  data: gm_header  type bapi2017_gm_head_01.
  data: gm_code    type bapi2017_gm_code.
  data: gm_headret type bapi2017_gm_head_ret.
  data: gm_item    type table of
                   bapi2017_gm_item_create with header line.
  data: gm_return  type bapiret2 occurs 0.
  data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.

  clear: gm_return, gm_retmtd. refresh gm_return.


* Setup BAPI header data.
  gm_header-pstng_date = sy-datum.
  gm_header-doc_date   = sy-datum.
  gm_code-gm_code      = '06'.                              " MB11

* Write 551 movement to table
  clear gm_item.
  move '551'        to gm_item-move_type     .
  move '000000000040001234' to gm_item-material.
  move '1'        to gm_item-entry_qnt.
  move 'EA'       to gm_item-entry_uom.
  move '0004'     to gm_item-plant.
  move '4000'     to gm_item-stge_loc.
  move '201'      to gm_item-move_reas.

* Determine cost center per plant
  case xresb-werks.
    when '0004'.
      move '0000041430' to gm_item-costcenter.
    when '0006'.
      move '0000041630' to gm_item-costcenter.
    when '0007'.
      move '0000041731' to gm_item-costcenter.
    when '0008'.
      move '0000041830' to gm_item-costcenter.
  endcase.

  append gm_item.

* Call goods movement BAPI
  call function 'BAPI_GOODSMVT_CREATE'
       exporting
            goodsmvt_header  = gm_header
            goodsmvt_code    = gm_code
       importing
            goodsmvt_headret = gm_headret
            materialdocument = gm_retmtd
       tables
            goodsmvt_item    = gm_item
            return           = gm_return.

   call function 'BAPI_TRANSACTION_COMMIT'
       exporting
            wait = 'X'.



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2006 00:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210310#M133277</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-19T00:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210311#M133278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.4ap.de/abap/bapi_goodsmvt_create.php" target="test_blank"&gt;http://www.4ap.de/abap/bapi_goodsmvt_create.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2006 04:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210311#M133278</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-03-19T04:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210312#M133279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, thanks for your answer. In my case, I guess I must call the MB1B transaction assigning 04 as the gm_code because is a transfer posting (a material quantity movement from one batch to another). The BAPI return this messages: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deficit of BA Unrestr. prev. 90 ST : 5150104 U050 2800 LOTE 2&lt;/P&gt;&lt;P&gt;Deficit of BA Unrestricted-use 80 ST : 5150104 U050 2800 V   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And below is the code. Where could be my mistake?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MATERIAL   = '000000000005150104'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-PLANT      = 'U050'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-STGE_LOC   = '2800'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-BATCH      = 'LOTE 2'. "original batch&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_MAT   = '000000000005150104'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_PLANT = 'U050'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_STLOC = '2800'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_BATCH = 'V'. "receiving batch&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_TYPE  = '309'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-ENTRY_QNT  = 90&lt;/P&gt;&lt;P&gt;    APPEND GOODSMVT_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MATERIAL   = '000000000005150104'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-PLANT      = 'U050'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-STGE_LOC   = '2800'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-BATCH      = 'V'. "receiving batch&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_MAT   = '000000000005150104'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_PLANT = 'U050'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_STLOC = '2800'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_BATCH = 'LOTE 2'. "original batch&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_TYPE  = '309'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-ENTRY_QNT  = 90.&lt;/P&gt;&lt;P&gt;    APPEND GOODSMVT_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;        Sebastian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2006 14:20:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210312#M133279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-20T14:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_GOODSMVT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210313#M133280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I am using 311 movement type for store to store movement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 13:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-goodsmvt-create/m-p/1210313#M133280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T13:57:48Z</dc:date>
    </item>
  </channel>
</rss>

