<?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 Function Module for Goods Movement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053926#M423753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a requirement to move goods from one plant to another plant with movement type 301, storage location 0001, my source plant is fix and there are four receiving plants. I am getting allocation percentage of qty from a report (which i want to distribute in four plants).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function module for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found one BAPI_GOODSMVT_CREATE but not getting import parameters should be coz i don't know BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you plz help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 15:25:41 GMT</pubDate>
    <dc:creator>anilekar</dc:creator>
    <dc:date>2007-03-13T15:25:41Z</dc:date>
    <item>
      <title>Function Module for Goods Movement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053926#M423753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a requirement to move goods from one plant to another plant with movement type 301, storage location 0001, my source plant is fix and there are four receiving plants. I am getting allocation percentage of qty from a report (which i want to distribute in four plants).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function module for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found one BAPI_GOODSMVT_CREATE but not getting import parameters should be coz i don't know BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you plz help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 15:25:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053926#M423753</guid>
      <dc:creator>anilekar</dc:creator>
      <dc:date>2007-03-13T15:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Goods Movement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053927#M423754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is an abap program making used of the BAPI function &amp;lt;b&amp;gt;BAPI_GOODSMVT_CREATE&amp;lt;/b&amp;gt; to do Goods Receipts for Purchase Order after importing the data from an external system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BAPI TO Upload Inventory Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     02 - MB31 - Goods Receipts for Prod Order&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     03 - MB1A - Goods Issue&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     04 - MB1B - Transfer Posting&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     05 - MB1C - Enter Other Goods Receipt&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                     06 - MB11&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Domain: KZBEW - Movement Indicator&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     Goods movement w/o reference&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; B - Goods movement for purchase order&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; F - Goods movement for production order&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; L - Goods movement for delivery note&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; K - Goods movement for kanban requirement (WM - internal only)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; O - Subsequent adjustment of "material-provided" consumption&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; W - Subsequent adjustment of proportion/product unit material&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;report zbapi_goodsmovement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p-file like rlgrap-filename default&lt;/P&gt;&lt;P&gt;                                 'c:\sapdata\TEST.txt'.&lt;/P&gt;&lt;P&gt;parameters: e-file like rlgrap-filename default&lt;/P&gt;&lt;P&gt;                                 'c:\sapdata\gdsmvterror.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: xpost like sy-datum default sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of gmhead.&lt;/P&gt;&lt;P&gt;        include structure bapi2017_gm_head_01.&lt;/P&gt;&lt;P&gt;data: end of gmhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of gmcode.&lt;/P&gt;&lt;P&gt;        include structure bapi2017_gm_code.&lt;/P&gt;&lt;P&gt;data: end of gmcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of mthead.&lt;/P&gt;&lt;P&gt;        include structure bapi2017_gm_head_ret.&lt;/P&gt;&lt;P&gt;data: end of mthead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 100.&lt;/P&gt;&lt;P&gt;        include structure bapi2017_gm_item_create.&lt;/P&gt;&lt;P&gt;data: end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of errmsg occurs 10.&lt;/P&gt;&lt;P&gt;        include structure bapiret2.&lt;/P&gt;&lt;P&gt;data: end of errmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wmenge like iseg-menge,&lt;/P&gt;&lt;P&gt;      errflag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of pcitab occurs 100,&lt;/P&gt;&lt;P&gt;        ext_doc(10),           "External Document Number&lt;/P&gt;&lt;P&gt;        mvt_type(3),           "Movement Type&lt;/P&gt;&lt;P&gt;        doc_date(8),           "Document Date&lt;/P&gt;&lt;P&gt;        post_date(8),          "Posting Date&lt;/P&gt;&lt;P&gt;        plant(4),              "Plant&lt;/P&gt;&lt;P&gt;        material(18),          "Material Number&lt;/P&gt;&lt;P&gt;        qty(13),               "Quantity&lt;/P&gt;&lt;P&gt;        recv_loc(4),           "Receiving Location&lt;/P&gt;&lt;P&gt;        issue_loc(4),          "Issuing Location&lt;/P&gt;&lt;P&gt;        pur_doc(10),           "Purchase Document No&lt;/P&gt;&lt;P&gt;        po_item(3),            "Purchase Document Item No&lt;/P&gt;&lt;P&gt;        del_no(10),            "Delivery Purchase Order Number&lt;/P&gt;&lt;P&gt;        del_item(3),           "Delivery Item&lt;/P&gt;&lt;P&gt;        prod_doc(10),          "Production Document No&lt;/P&gt;&lt;P&gt;        scrap_reason(10),      "Scrap Reason&lt;/P&gt;&lt;P&gt;        upd_sta(1),            "Update Status&lt;/P&gt;&lt;P&gt;      end of pcitab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename                      = p-file&lt;/P&gt;&lt;P&gt;    filetype                      = 'DAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = pcitab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 6&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gmhead-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;gmhead-doc_date = sy-datum.&lt;/P&gt;&lt;P&gt;gmhead-pr_uname = sy-uname.&lt;/P&gt;&lt;P&gt;gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at pcitab.&lt;/P&gt;&lt;P&gt;  itab-move_type  = pcitab-mvt_type.&lt;/P&gt;&lt;P&gt;  itab-mvt_ind    = 'B'.&lt;/P&gt;&lt;P&gt;  itab-plant      = pcitab-plant.&lt;/P&gt;&lt;P&gt;  itab-material   = pcitab-material.&lt;/P&gt;&lt;P&gt;  itab-entry_qnt  = pcitab-qty.&lt;/P&gt;&lt;P&gt;  itab-move_stloc = pcitab-recv_loc.&lt;/P&gt;&lt;P&gt;  itab-stge_loc   = pcitab-issue_loc.&lt;/P&gt;&lt;P&gt;  itab-po_number  = pcitab-pur_doc.&lt;/P&gt;&lt;P&gt;  itab-po_item    = pcitab-po_item.&lt;/P&gt;&lt;P&gt;  concatenate pcitab-del_no pcitab-del_item into itab-item_text.&lt;/P&gt;&lt;P&gt;  itab-move_reas  = pcitab-scrap_reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  write:/ itab-material, itab-plant, itab-stge_loc,&lt;/P&gt;&lt;P&gt;          itab-move_type, itab-entry_qnt, itab-entry_uom,&lt;/P&gt;&lt;P&gt;          itab-entry_uom_iso, itab-po_number, itab-po_item,&lt;/P&gt;&lt;P&gt;                                              pcitab-ext_doc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;call function 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    goodsmvt_header             = gmhead&lt;/P&gt;&lt;P&gt;    goodsmvt_code               = gmcode&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TESTRUN                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    goodsmvt_headret            = mthead&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MATERIALDOCUMENT            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MATDOCUMENTYEAR             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    goodsmvt_item               = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GOODSMVT_SERIALNUMBER       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    return                      = errmsg&lt;/P&gt;&lt;P&gt;          .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;clear errflag.&lt;/P&gt;&lt;P&gt;loop at errmsg.&lt;/P&gt;&lt;P&gt;  if errmsg-type eq 'E'.&lt;/P&gt;&lt;P&gt;    write:/'Error in function', errmsg-message.&lt;/P&gt;&lt;P&gt;    errflag = 'X'.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    write:/ errmsg-message.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if errflag is initial.&lt;/P&gt;&lt;P&gt;  commit work and wait.&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    write:/ 'Error in updating'.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    write:/ mthead-mat_doc, mthead-doc_year.&lt;/P&gt;&lt;P&gt;    perform upd_sta.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM UPD_STA                                                  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ........                                                      *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form upd_sta.&lt;/P&gt;&lt;P&gt;  loop at pcitab.&lt;/P&gt;&lt;P&gt;    pcitab-upd_sta = 'X'.&lt;/P&gt;&lt;P&gt;    modify pcitab.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      filename                      = p-file&lt;/P&gt;&lt;P&gt;      filetype                      = 'DAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data_tab                      = pcitab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 6&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- End of Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to Reward Points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Hiren Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 09:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053927#M423754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T09:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Goods Movement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053928#M423755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks hiren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2007 11:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053928#M423755</guid>
      <dc:creator>anilekar</dc:creator>
      <dc:date>2007-03-15T11:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module for Goods Movement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053929#M423756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I  don't konw about w/o moving ,this is bapi doing  dealing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Apr 2008 16:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-goods-movement/m-p/2053929#M423756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-05T16:35:14Z</dc:date>
    </item>
  </channel>
</rss>

