<?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: PRoblem when posting more than one document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225116#M137660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a configuration issue. There is something called as a POSTING PERIOD, which the functional consultants will set up. Basically it will tell you to account for this in a specific month. These posting periods will have to closed and a new one has to be opened every month (according to the client's practice). So in you case, you are trying to post the document in the current period which 2006/04, where as that period is not open yet. So, you will have to close the previous periods and then open the current one. Only then you will be able to post the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing purposes, you can change the POSTING DATA parameter to some data in Dec / Jan and that should go through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try and let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Apr 2006 10:28:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-11T10:28:26Z</dc:date>
    <item>
      <title>PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225105#M137649</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;&lt;/P&gt;&lt;P&gt;I'm using BAPI    BAPI_GOODSMOVEMENT_CREATE to post the documents for PO_GR.when i post one document through text file it is done succesfuully. when i'm posting more than one document it is giving error "posting not possible".&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_data.&lt;/P&gt;&lt;P&gt;concatenate '0'   i_data-stor_loc  into i_data-stor_loc.&lt;/P&gt;&lt;P&gt;concatenate '00'  i_data-plant     into i_data-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i_item-po_number  = i_data-po_no.&lt;/P&gt;&lt;P&gt;    i_item-po_item    = i_data-po_item.&lt;/P&gt;&lt;P&gt;    i_item-move_type  = i_data-mvt_type.&lt;/P&gt;&lt;P&gt;    i_head-doc_date   = doc_date.&lt;/P&gt;&lt;P&gt;    i_head-pstng_date = post_date.&lt;/P&gt;&lt;P&gt;    i_head-ref_doc_no = i_data-del_note.&lt;/P&gt;&lt;P&gt;    i_item-entry_qnt  = i_data-entry_qty.&lt;/P&gt;&lt;P&gt;    i_item-stge_loc   = i_data-stor_loc.&lt;/P&gt;&lt;P&gt;    i_item-plant      = i_data-plant.&lt;/P&gt;&lt;P&gt;    i_item-stck_type  = i_data-stk_type.&lt;/P&gt;&lt;P&gt;    i_item-batch      = i_data-batch.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_ITEM-move_val_type      = i_data-move_batch.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND: i_item,i_head.&lt;/P&gt;&lt;P&gt;    CLEAR:i_item.&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;&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             = i_head&lt;/P&gt;&lt;P&gt;     goodsmvt_code               = i_code&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GOODSMVT_HEADRET            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MATERIALDOCUMENT            = matdoc&lt;/P&gt;&lt;UL&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               = i_item&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                      = return&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF return IS INITIAL.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  LOOP AT return.&lt;/P&gt;&lt;P&gt;    WRITE: return-message.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: matdoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease specify where i'm going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SImha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Feb 2024 19:08:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225105#M137649</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2024-02-03T19:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225106#M137650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Narasimha,&lt;/P&gt;&lt;P&gt; I assume that i_data is the internal table that has all the records that are uploaded.&lt;/P&gt;&lt;P&gt;so, you need to refresh the i_item, i_head etc for each set (for which you want to create a Goods movement doc).&lt;/P&gt;&lt;P&gt;Are you refreshing the i_item ,i_hed???&lt;/P&gt;&lt;P&gt;And the condition you are checking for commiting the transaction is not reliable.&lt;/P&gt;&lt;P&gt;the return structure may have success messages some times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 09:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225106#M137650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T09:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225107#M137651</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;Using the BAPI you can post one document at a time. So, if you have got more data in the field, upload that into table. loop at the table and call the BAPI inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, i_head doesn't seem to a TABLE parameter in the BAPI, then why have declared it as TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you give the structures of i_head and i_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 09:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225107#M137651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T09:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225108#M137652</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;I had used the same FM to post multiple documents, but never faced this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*- Header &lt;/P&gt;&lt;P&gt;  MOVE: sy-datum TO bapigm_head-pstng_date,&lt;/P&gt;&lt;P&gt;        sy-datum TO bapigm_head-doc_date,&lt;/P&gt;&lt;P&gt;        sy-uname TO bapigm_head-pr_uname,&lt;/P&gt;&lt;P&gt;        v_mblnr  TO bapigm_head-ref_doc_no,&lt;/P&gt;&lt;P&gt;        con_bfwms_bestand TO bapigm_head-ext_wms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*- Item&lt;/P&gt;&lt;P&gt;*- Populate item data&lt;/P&gt;&lt;P&gt;  LOOP AT i_items_trans.&lt;/P&gt;&lt;P&gt;    CLEAR ibapigm_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*- Convert the matnr backto 18 char form (External)&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        input            = i_items_trans-matnr&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        output           = i_items_trans-matnr&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        number_not_found = 1&lt;/P&gt;&lt;P&gt;        length_error     = 2&lt;/P&gt;&lt;P&gt;        OTHERS           = 3.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ibapigm_item-material   = i_items_trans-matnr.&lt;/P&gt;&lt;P&gt;    ibapigm_item-plant      = i_items_trans-werks.&lt;/P&gt;&lt;P&gt;    ibapigm_item-stge_loc   = i_items_trans-lgort.&lt;/P&gt;&lt;P&gt;    ibapigm_item-move_type  = '101'.   "Goods Receipt&lt;/P&gt;&lt;P&gt;    ibapigm_item-mvt_ind    = 'B'.     "Goods Movement for PO&lt;/P&gt;&lt;P&gt;    ibapigm_item-po_number  = i_items_trans-ebeln.&lt;/P&gt;&lt;P&gt;    ibapigm_item-po_item    = i_items_trans-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ibapigm_item-entry_qnt  = i_items_trans-ktmng.&lt;/P&gt;&lt;P&gt;    ibapigm_item-entry_uom  = i_items_trans-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND ibapigm_item.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-Call 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  = bapigm_head&lt;/P&gt;&lt;P&gt;      goodsmvt_code    = bapigm_code&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      goodsmvt_headret = bapigm_headret&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      goodsmvt_item    = ibapigm_item&lt;/P&gt;&lt;P&gt;      return           = ibapigm_ret.&lt;/P&gt;&lt;P&gt;*- Commit on Success&lt;/P&gt;&lt;P&gt;  IF NOT bapigm_headret-mat_doc IS INITIAL.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 09:13:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225108#M137652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T09:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225109#M137653</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;but y i'm getting the error &amp;lt;b&amp;gt;" posting not possible for this material??"&amp;lt;/b&amp;gt;. If i post the documents individually they r getting posted.&lt;/P&gt;&lt;P&gt;When i upload them in same file they r giving error..&lt;/P&gt;&lt;P&gt;any change has to be done in the code.&lt;/P&gt;&lt;P&gt;please resolve..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 09:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225109#M137653</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T09:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225110#M137654</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;In the data from the file, how are you differentiating the header from the item data. Unless that is known, we cannot separate the header and item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you put a sample data here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:01:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225110#M137654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225111#M137655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;This is tha sample data i am paasing.&lt;/P&gt;&lt;P&gt;when i post individually it gets posted. When i use both the PO's i'm getting the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will i have to pass any serial number in tha data???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4500000762	10	101	07.03.2006	07.03.2006	ABC	1	10	10	2	XXX&lt;/P&gt;&lt;P&gt;4500000760	10	101	07.03.2006	07.03.2006	ABC	1	10	10	1	XXX&lt;/P&gt;&lt;P&gt;Please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SImha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225111#M137655</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T10:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225112#M137656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  If your data has 2 records, should you get two mat docs in the end?&lt;/P&gt;&lt;P&gt;Is there any chance that these two recrds are two lines for the same mat docs?&lt;/P&gt;&lt;P&gt;Can you post your total code?&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225112#M137656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225113#M137657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I am assuming there is only one line item per PO that you want to create a GR for. Assuming i_data is the data from the file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_data.&lt;/P&gt;&lt;P&gt;concatenate '0' i_data-stor_loc into i_data-stor_loc.&lt;/P&gt;&lt;P&gt;concatenate '00' i_data-plant into i_data-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_item-po_number = i_data-po_no.&lt;/P&gt;&lt;P&gt;i_item-po_item = i_data-po_item.&lt;/P&gt;&lt;P&gt;i_item-move_type = i_data-mvt_type.&lt;/P&gt;&lt;P&gt;i_head-doc_date = doc_date.&lt;/P&gt;&lt;P&gt;i_head-pstng_date = post_date.&lt;/P&gt;&lt;P&gt;i_head-ref_doc_no = i_data-del_note.&lt;/P&gt;&lt;P&gt;i_item-entry_qnt = i_data-entry_qty.&lt;/P&gt;&lt;P&gt;i_item-stge_loc = i_data-stor_loc.&lt;/P&gt;&lt;P&gt;i_item-plant = i_data-plant.&lt;/P&gt;&lt;P&gt;i_item-stck_type = i_data-stk_type.&lt;/P&gt;&lt;P&gt;i_item-batch = i_data-batch.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_ITEM-move_val_type = i_data-move_batch.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND: i_item&lt;/P&gt;&lt;P&gt;CLEAR:i_item.&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;CALL FUNCTION 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;goodsmvt_header = i_head&lt;/P&gt;&lt;P&gt;goodsmvt_code = i_code&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GOODSMVT_HEADRET =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MATERIALDOCUMENT = matdoc&lt;/P&gt;&lt;UL&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 = i_item&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 = return&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF return IS INITIAL.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;LOOP AT return.&lt;/P&gt;&lt;P&gt;WRITE: return-message.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: matdoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear :  REturn[], i_head, i_item[], i_code.&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;Try this and let me know, if it still gives an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you get multiple line items for the same PO, then you will have to create one GR for all of them, in that case this code will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful posts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225113#M137657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225114#M137658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have got mulitple PO line items use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT I_DATA BY poNUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at i_data.&lt;/P&gt;&lt;P&gt;concatenate '0' i_data-stor_loc into i_data-stor_loc.&lt;/P&gt;&lt;P&gt;concatenate '00' i_data-plant into i_data-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_item-po_number = i_data-po_no.&lt;/P&gt;&lt;P&gt;i_item-po_item = i_data-po_item.&lt;/P&gt;&lt;P&gt;i_item-move_type = i_data-mvt_type.&lt;/P&gt;&lt;P&gt;i_head-doc_date = doc_date.&lt;/P&gt;&lt;P&gt;i_head-pstng_date = post_date.&lt;/P&gt;&lt;P&gt;i_head-ref_doc_no = i_data-del_note.&lt;/P&gt;&lt;P&gt;i_item-entry_qnt = i_data-entry_qty.&lt;/P&gt;&lt;P&gt;i_item-stge_loc = i_data-stor_loc.&lt;/P&gt;&lt;P&gt;i_item-plant = i_data-plant.&lt;/P&gt;&lt;P&gt;i_item-stck_type = i_data-stk_type.&lt;/P&gt;&lt;P&gt;i_item-batch = i_data-batch.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_ITEM-move_val_type = i_data-move_batch.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND: i_item&lt;/P&gt;&lt;P&gt;CLEAR:i_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At End of POnumber&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 = i_head&lt;/P&gt;&lt;P&gt;goodsmvt_code = i_code&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GOODSMVT_HEADRET =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MATERIALDOCUMENT = matdoc&lt;/P&gt;&lt;UL&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 = i_item&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 = return&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF return IS INITIAL.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;LOOP AT return.&lt;/P&gt;&lt;P&gt;WRITE: return-message.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: matdoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear : REturn[], i_head, i_item[], i_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:21:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225114#M137658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225115#M137659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ravi,&lt;/P&gt;&lt;P&gt;I have used ur code also.&lt;/P&gt;&lt;P&gt;It's giving the two errors now:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Posting only possible in periods 2006/01 and 2005/12 in company code 0003&lt;/P&gt;&lt;P&gt;CODE  is not supported by BAPI2017_GOODSMVT_CREATE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u tell me where i'm going wrong.&lt;/P&gt;&lt;P&gt;I will award u points.&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Simha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225115#M137659</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T10:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225116#M137660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a configuration issue. There is something called as a POSTING PERIOD, which the functional consultants will set up. Basically it will tell you to account for this in a specific month. These posting periods will have to closed and a new one has to be opened every month (according to the client's practice). So in you case, you are trying to post the document in the current period which 2006/04, where as that period is not open yet. So, you will have to close the previous periods and then open the current one. Only then you will be able to post the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing purposes, you can change the POSTING DATA parameter to some data in Dec / Jan and that should go through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try and let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225116#M137660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225117#M137661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;But when i posted the single document , why it's getting posted??&lt;/P&gt;&lt;P&gt;Then also it should have to give the error.&lt;/P&gt;&lt;P&gt;can u explain this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used ur code for multiple items.&lt;/P&gt;&lt;P&gt;Its giving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CODE  is not supported by BAPI2017_GOODSMVT_CREATE&lt;/P&gt;&lt;P&gt;CODE  is not supported by BAPI2017_GOODSMVT_CREATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for both the documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please it's very urgent for me..&lt;/P&gt;&lt;P&gt;Anyway ur points will be awarded.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;simha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:33:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225117#M137661</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T10:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225118#M137662</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;Looks like there is a problem with the value you are passing to i_code. what is the value there?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - You can mark each answer as helpful, if they have helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225118#M137662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225119#M137663</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;I just noticed, why can't you use&lt;/P&gt;&lt;P&gt;BAPI_GOODSMVMT_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225119#M137663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225120#M137664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ravi,&lt;/P&gt;&lt;P&gt;there is no such BAPI as u have said&lt;/P&gt;&lt;P&gt;BAPI_GOODSMVMT_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using i_code as '01'   which is for PO_GR.&lt;/P&gt;&lt;P&gt;IF i'm wrong correct me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease help me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SImha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Narasimha Rao Bandla&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225120#M137664</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T10:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225121#M137665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I meant, BAPI_GOODSMOVEMENT_CREATE.&lt;/P&gt;&lt;P&gt;In your other message, you have mentioned about BAPI2017 or something like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 10:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225121#M137665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-11T10:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225122#M137666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, even that BAPI doesn't exist.&lt;/P&gt;&lt;P&gt;Now one problem is solved .&lt;/P&gt;&lt;P&gt;for one document i can able to post.&lt;/P&gt;&lt;P&gt;But the second document in the post gives &lt;/P&gt;&lt;P&gt;Code not supported BAPI2017_GOODSMVT_CREATE&lt;/P&gt;&lt;P&gt;Plesae help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SImha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2006 11:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225122#M137666</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-04-11T11:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem when posting more than one document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225123#M137667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Use code 03 , but not 0003&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 17:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-when-posting-more-than-one-document/m-p/1225123#M137667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T17:27:37Z</dc:date>
    </item>
  </channel>
</rss>

