<?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: How to use bapi 'BAPI_GOODSMVT_CREATE'  in program? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046885#M967351</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;You can use it like this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  i_item TYPE STANDARD TABLE OF bapi2017_gm_item_create INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;         i_return TYPE STANDARD TABLE OF bapiret2 INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;         wa_header TYPE bapi2017_gm_head_01,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS:   c_code    TYPE bapi2017_gm_code VALUE '04',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then populate WA_HEADER. then call the FM&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 = wa_header      &lt;/P&gt;&lt;P&gt;    goodsmvt_code   = c_code         &lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    goodsmvt_item   = i_item         &lt;/P&gt;&lt;P&gt;    return          = i_return.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 08:53:40 GMT</pubDate>
    <dc:creator>Subhankar</dc:creator>
    <dc:date>2008-06-30T08:53:40Z</dc:date>
    <item>
      <title>How to use bapi 'BAPI_GOODSMVT_CREATE'  in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046882#M967348</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;   plz tell me how to use bapi 'BAPI_GOODSMVT_CREATE'  in program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:44:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046882#M967348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use bapi 'BAPI_GOODSMVT_CREATE'  in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046883#M967349</link>
      <description>&lt;P&gt;Check out the below related program&lt;/P&gt;&lt;P&gt;[Removed by the moderator.]&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046883#M967349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use bapi 'BAPI_GOODSMVT_CREATE'  in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046884#M967350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the following sample code&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;TABLES: ZMM_GI_WIP,&lt;/P&gt;&lt;P&gt;        zmmint_usr,&lt;/P&gt;&lt;P&gt;        EKKO,&lt;/P&gt;&lt;P&gt;        MSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;data: wmenge like iseg-menge,&lt;/P&gt;&lt;P&gt;      errflag.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          gmhead-pstng_date = G_DATE.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;"01 - MB01 - Goods Receipts for Purchase Order&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          gmcode-gm_code = '03'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          refresh itab.&lt;/P&gt;&lt;P&gt;          clear itab.&lt;/P&gt;&lt;P&gt;          SORT I_MAIN BY SOL_DOCNO.&lt;/P&gt;&lt;P&gt;          LOOP AT I_MAIN WHERE SOL_DOCNO = I_TAB-SOL_DOCNO.&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;              itab-move_type  = '291'.&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;            itab-mvt_ind    = ' '.&lt;/P&gt;&lt;P&gt;            itab-plant      = I_MAIN-WERKS.&lt;/P&gt;&lt;P&gt;            itab-material   = I_MAIN-MATNR.&lt;/P&gt;&lt;P&gt;            itab-entry_qnt  = I_MAIN-ERFMG.&lt;/P&gt;&lt;P&gt;            itab-stge_loc   = I_MAIN-LGOBE.&lt;/P&gt;&lt;P&gt;            itab-ENTRY_UOM = I_MAIN-ERFME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              itab-TR_PART_BA = '12'.&lt;/P&gt;&lt;P&gt;              append itab.&lt;/P&gt;&lt;P&gt;            CLEAR: ITAB.&lt;/P&gt;&lt;P&gt;          ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          if not itab[] is initial.&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;/UL&gt;&lt;P&gt;            IMPORTING&lt;/P&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;&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', 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;             &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;              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            WAIT          =&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;            RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;           commit work and wait.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;&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;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:49:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046884#M967350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use bapi 'BAPI_GOODSMVT_CREATE'  in program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046885#M967351</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;You can use it like this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  i_item TYPE STANDARD TABLE OF bapi2017_gm_item_create INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;         i_return TYPE STANDARD TABLE OF bapiret2 INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;         wa_header TYPE bapi2017_gm_head_01,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS:   c_code    TYPE bapi2017_gm_code VALUE '04',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then populate WA_HEADER. then call the FM&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 = wa_header      &lt;/P&gt;&lt;P&gt;    goodsmvt_code   = c_code         &lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    goodsmvt_item   = i_item         &lt;/P&gt;&lt;P&gt;    return          = i_return.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 08:53:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-goodsmvt-create-in-program/m-p/4046885#M967351</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2008-06-30T08:53:40Z</dc:date>
    </item>
  </channel>
</rss>

