<?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: Error in bapi_goodsmvt_create in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546512#M853227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the field name i think it should be itab-stge_loc not&lt;/P&gt;&lt;P&gt;itab-stge-loc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2008 07:08:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-27T07:08:52Z</dc:date>
    <item>
      <title>Error in bapi_goodsmvt_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546510#M853225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Frriends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am totally new to bapi .Rt now i have given a task that is goods should transfer from one plant to amother plant....using BAPI_GOODSMVT_CREATE. but i am getting a error ....the code which i have written is as follows:&lt;/P&gt;&lt;P&gt;&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;ALV .......................&lt;/P&gt;&lt;P&gt;..........................................&lt;/P&gt;&lt;P&gt;............................(Some coding)&lt;/P&gt;&lt;P&gt;FORM BAPI_GOODS_MVT.&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 = '04'.   "04 - MB1B - Transfer Posting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at IT_FINAL.&lt;/P&gt;&lt;P&gt;    itab-move_type   = '301'.&lt;/P&gt;&lt;P&gt;    itab-material    = it_final-matnr.&lt;/P&gt;&lt;P&gt;    itab-plant       = it_final-f_werks .&lt;/P&gt;&lt;P&gt;    itab-stge-loc    = it final-f_lgort .&lt;/P&gt;&lt;P&gt;    itab-plant       = it_final-t_werks .&lt;/P&gt;&lt;P&gt;    itab-stge-loc    = it_final-t_lgort .&lt;/P&gt;&lt;P&gt;    itab-entry-qnt   = it_final-labst .&lt;/P&gt;&lt;P&gt;    itab-move-reas   = it_final-remark.&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;  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;LI level="1" type="ul"&gt;&lt;P&gt;    GOODSMVT_HEADRET            =&lt;/P&gt;&lt;/LI&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;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      WAIT = 'X'.&lt;/P&gt;&lt;P&gt;endif.&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;endloop.&lt;/P&gt;&lt;P&gt;i have pased the whole data in internal table that is it_final...the error i am getting as itab-stge-loc    = it final-f_lgort .here asfield it is unknown...it is neither specifiend in table or data...can any one chk what is the error n give me the solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 01:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546510#M853225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T01:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error in bapi_goodsmvt_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546511#M853226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA : lrc TYPE sy-subrc,&lt;/P&gt;&lt;P&gt;         lasnqty TYPE zmm001-qty ,&lt;/P&gt;&lt;P&gt;         lasnqtycount TYPE zmm001-qty ,&lt;/P&gt;&lt;P&gt;         lasnqtyrev TYPE zmm001-qty ,&lt;/P&gt;&lt;P&gt;         lebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;         lebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt;         lvbeln TYPE likp-vbeln,&lt;/P&gt;&lt;P&gt;         lmblnr TYPE mseg-mblnr,&lt;/P&gt;&lt;P&gt;         llgort TYPE mard-lgort,&lt;/P&gt;&lt;P&gt;         lbox TYPE rv50a-verur_la.&lt;/P&gt;&lt;P&gt;  DATA:l_matedoc LIKE mkpf-mblnr.&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF it_result OCCURS 1000,&lt;/P&gt;&lt;P&gt;        msg(220) TYPE c, "Error message&lt;/P&gt;&lt;P&gt;       END OF it_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;   itab_header LIKE bapi2017_gm_head_01 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;   itab_code LIKE bapi2017_gm_code OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;   itab_item LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;   it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab_code-gm_code = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab_header-doc_date = sy-datum.&lt;/P&gt;&lt;P&gt;    itab_header-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;    itab_header-header_txt = itab-ASNNO.&lt;/P&gt;&lt;P&gt;     itab_header-ref_doc_no = itab-ref_doc.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab_item-material = itab-matnr.&lt;/P&gt;&lt;P&gt;    itab_item-plant = itab-plant.&lt;/P&gt;&lt;P&gt;    itab_item-stge_loc = p_lgort.&lt;/P&gt;&lt;P&gt;    itab_item-batch = itab-batch.&lt;/P&gt;&lt;P&gt;    itab_item-move_type = '101'.&lt;/P&gt;&lt;P&gt;    itab_item-entry_qnt = itab-asnqty.&lt;/P&gt;&lt;P&gt;    itab_item-entry_uom = itab-uom.&lt;/P&gt;&lt;P&gt;    itab_item-vendor = itab-vendor.&lt;/P&gt;&lt;P&gt;    itab_item-po_number = itab-ebeln.&lt;/P&gt;&lt;P&gt;    itab_item-po_item = itab-ebelp.&lt;/P&gt;&lt;P&gt;    itab_item-item_text = itab-vpn.&lt;/P&gt;&lt;P&gt;    itab_item-mvt_ind = 'B'.&lt;/P&gt;&lt;P&gt;    APPEND itab_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              goodsmvt_header  = itab_header&lt;/P&gt;&lt;P&gt;              goodsmvt_code    = itab_code&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              materialdocument = l_matedoc  "material document&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              goodsmvt_item    = itab_item&lt;/P&gt;&lt;P&gt;              return           = it_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    COMMIT WORK.&lt;/P&gt;&lt;P&gt;    WAIT UP TO 5 SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aove all is only for the reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;George shi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 07:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546511#M853226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T07:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error in bapi_goodsmvt_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546512#M853227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the field name i think it should be itab-stge_loc not&lt;/P&gt;&lt;P&gt;itab-stge-loc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 07:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546512#M853227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T07:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in bapi_goodsmvt_create</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546513#M853228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see that you have two storage location one should be souce and the other should be destination. You have declared both fields similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Change STGE_LOC (second one from your internal table) to MOVE_STLOC.  As this one should be a destination location which is MOVE_STLOC.  I am sure it will solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;siddu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 03:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-goodsmvt-create/m-p/3546513#M853228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T03:03:03Z</dc:date>
    </item>
  </channel>
</rss>

