<?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: Posting FI Docu BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372066#M182978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That more button is related to 'COPA' and you need to fill 'CRITERIA' and 'VALUEFIELD' structures for that. Read the documentation for these two tables parameters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2006 16:49:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-19T16:49:16Z</dc:date>
    <item>
      <title>Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372065#M182977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using BAPI BAPI_ACC_DOCUMENT_POST to post FI documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After posting I went to FB03 to see the Posted document. &lt;/P&gt;&lt;P&gt;When we double click the Posted Line item it takes us to a detail screen where we have a button "More" on the main screen and not on the Tool Bar. This more option pops up a screen that has more details like Asset, Profit Center, Cost center, Personnel Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What field shall I populate whil calling the Bapi so that I can see the Personnel Number field filled up. Right now I'm trying to pass GL, Accounts Receivable &amp;amp; Accounts Payable internal tables... Any help is appreciate...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 16:38:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372065#M182977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T16:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372066#M182978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That more button is related to 'COPA' and you need to fill 'CRITERIA' and 'VALUEFIELD' structures for that. Read the documentation for these two tables parameters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 16:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372066#M182978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T16:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372067#M182979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      The 'More Data' button shows data specific to the line item in the posting document.You need to link the item number ITEMNO_ACC passed through the ACCOUNTGL uniquely in the additional table structures provided which are CONTRACTITEM,CRITERIA and VALUEFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i suggest is that use the Where used list on the FM BAPI_ACC_DOCUMENT_POST and see a case in which these are populated to get an idea of how this can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Reward helpful answers&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Nishanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 16:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372067#M182979</guid>
      <dc:creator>nishanthbhandar</dc:creator>
      <dc:date>2006-05-19T16:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372068#M182980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the sample code................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP at podoc_it.&lt;/P&gt;&lt;P&gt;    CLEAR: offset_it, it_gl, it_curr, er_podoc,&lt;/P&gt;&lt;P&gt;           act_rec, tracc_it, pdoc_it, doc_it.&lt;/P&gt;&lt;P&gt;    ON CHANGE of podoc_it-belnr.&lt;/P&gt;&lt;P&gt;      line_item = 0.&lt;/P&gt;&lt;P&gt;    ENDON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE offset_it with key bukrs = podoc_it-bukrs&lt;/P&gt;&lt;P&gt;                                      saknr = podoc_it-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE tracc_it with key bukrs = podoc_it-bukrs&lt;/P&gt;&lt;P&gt;                                 belnr = podoc_it-belnr&lt;/P&gt;&lt;P&gt;                                 gjahr = podoc_it-gjahr&lt;/P&gt;&lt;P&gt;                                 binary search.&lt;/P&gt;&lt;P&gt;    IF NOT offset_it-osaknr is initial and&lt;/P&gt;&lt;P&gt;           tracc_it-obelnr = ''.&lt;/P&gt;&lt;P&gt;      SELECT single * from SKB1&lt;/P&gt;&lt;P&gt;                            where bukrs = podoc_it-bukrs and&lt;/P&gt;&lt;P&gt;                                  saknr = offset_it-osaknr.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        MOVE: podoc_it-bukrs to doc_it-bukrs,&lt;/P&gt;&lt;P&gt;              podoc_it-belnr to doc_it-belnr,&lt;/P&gt;&lt;P&gt;              podoc_it-gjahr to doc_it-gjahr,&lt;/P&gt;&lt;P&gt;              v_blart to doc_it-blart,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             pdoc_it-blart to doc_it-blart,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              podoc_it-shkzg to doc_it-shkzg,&lt;/P&gt;&lt;P&gt;              podoc_it-waers to doc_it-waers,&lt;/P&gt;&lt;P&gt;              podoc_it-wrbtr to doc_it-wrbtr,&lt;/P&gt;&lt;P&gt;              podoc_it-hkont to doc_it-hkont,&lt;/P&gt;&lt;P&gt;              offset_it-osaknr to doc_it-osaknr,&lt;/P&gt;&lt;P&gt;              podoc_it-error to doc_it-error.&lt;/P&gt;&lt;P&gt;              pdoc_it-bukrs = podoc_it-bukrs.&lt;/P&gt;&lt;P&gt;              pdoc_it-belnr = podoc_it-belnr.&lt;/P&gt;&lt;P&gt;              pdoc_it-gjahr = podoc_it-gjahr.&lt;/P&gt;&lt;P&gt;              pdoc_it-blart = podoc_it-blart.&lt;/P&gt;&lt;P&gt;              pdoc_it-xblnr = podoc_it-xblnr.&lt;/P&gt;&lt;P&gt;              pdoc_it-buzei = podoc_it-buzei.&lt;/P&gt;&lt;P&gt;              pdoc_it-koart = podoc_it-koart.&lt;/P&gt;&lt;P&gt;              pdoc_it-sgtxt = podoc_it-sgtxt.&lt;/P&gt;&lt;P&gt;              pdoc_it-hkont = podoc_it-hkont.&lt;/P&gt;&lt;P&gt;              pdoc_it-kunnr = podoc_it-kunnr.&lt;/P&gt;&lt;P&gt;              pdoc_it-shkzg = podoc_it-shkzg.&lt;/P&gt;&lt;P&gt;              pdoc_it-mwskz = podoc_it-mwskz.&lt;/P&gt;&lt;P&gt;              pdoc_it-waers = podoc_it-waers.&lt;/P&gt;&lt;P&gt;              pdoc_it-wrbtr = podoc_it-wrbtr.&lt;/P&gt;&lt;P&gt;        APPEND: pdoc_it, doc_it.&lt;/P&gt;&lt;P&gt;        line_item = line_item + 1.&lt;/P&gt;&lt;P&gt;        CLEAR v_bktxt.&lt;/P&gt;&lt;P&gt;        CONCATENATE podoc_it-belnr podoc_it-bukrs&lt;/P&gt;&lt;P&gt;                    podoc_it-gjahr into v_bktxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Header Data               " Sending comp code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        it_hdr-comp_code  = podoc_it-bukrs.&lt;/P&gt;&lt;P&gt;        it_hdr-doc_date   = p_podt.&lt;/P&gt;&lt;P&gt;        it_hdr-pstng_date = p_podt.&lt;/P&gt;&lt;P&gt;        it_hdr-doc_type   = v_blart.&lt;/P&gt;&lt;P&gt;        it_hdr-ref_doc_no = podoc_it-belnr.&lt;/P&gt;&lt;P&gt;        it_hdr-username   = sy-uname.&lt;/P&gt;&lt;P&gt;        it_hdr-HEADER_TXT = v_bktxt.&lt;/P&gt;&lt;P&gt;        it_hdr-bus_act    = 'RFBU'.&lt;/P&gt;&lt;P&gt;        APPEND it_hdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF podoc_it-koart = 'D'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         CLEAR: v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         CONCATENATE pdoc_it-belnr pdoc_it-buzei into v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          IF podoc_it-shkzg = 'S'.&lt;/P&gt;&lt;P&gt;            line_item = line_item + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             Account receivable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            act_rec-itemno_acc  = line_item.&lt;/P&gt;&lt;P&gt;            act_rec-CUSTOMER    = podoc_it-kunnr.&lt;/P&gt;&lt;P&gt;            act_rec-gl_account  = podoc_it-hkont.&lt;/P&gt;&lt;P&gt;            act_rec-BUS_AREA    = podoc_it-gsber.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           act_rec-item_text  = v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            APPEND act_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_curr-currency   = podoc_it-waers.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = podoc_it-wrbtr.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = it_curr-amt_doccur * -1.&lt;/P&gt;&lt;P&gt;            APPEND it_curr.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            line_item = line_item + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           Account number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            act_rec-itemno_acc  = line_item.&lt;/P&gt;&lt;P&gt;            act_rec-CUSTOMER    = podoc_it-kunnr.&lt;/P&gt;&lt;P&gt;            act_rec-gl_account  = podoc_it-hkont.&lt;/P&gt;&lt;P&gt;            act_rec-BUS_AREA    = podoc_it-gsber.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           act_rec-item_text  = v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            APPEND act_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_curr-currency   = podoc_it-waers.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = podoc_it-wrbtr.&lt;/P&gt;&lt;P&gt;            APPEND it_curr.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         CLEAR: v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         CONCATENATE pdoc_it-belnr pdoc_it-buzei into v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          IF podoc_it-shkzg = 'S'.&lt;/P&gt;&lt;P&gt;            line_item = line_item + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             Account number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_gl-gl_account = offset_it-osaknr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-fis_period = v_monat.&lt;/P&gt;&lt;P&gt;            it_gl-fisc_year  = v_gjahr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-tax_code   = podoc_it-mwskz.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-acct_key   = 'A00'.&lt;/P&gt;&lt;P&gt;            APPEND it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_curr-currency   = podoc_it-waers.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = podoc_it-wrbtr.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = it_curr-amt_doccur * -1.&lt;/P&gt;&lt;P&gt;            APPEND it_curr.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            line_item = line_item + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            Account number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_gl-gl_account = offset_it-osaknr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-fis_period = v_monat.&lt;/P&gt;&lt;P&gt;            it_gl-fisc_year  = v_gjahr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-tax_code   = podoc_it-mwskz.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_gl-acct_key   = 'A00'.&lt;/P&gt;&lt;P&gt;            APPEND it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;            it_curr-currency   = podoc_it-waers.&lt;/P&gt;&lt;P&gt;            it_curr-amt_doccur = podoc_it-wrbtr.&lt;/P&gt;&lt;P&gt;            APPEND it_curr.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;              eflag = 'X'.&lt;/P&gt;&lt;P&gt;        MOVE: podoc_it-bukrs to doc_it-bukrs,&lt;/P&gt;&lt;P&gt;              podoc_it-belnr to doc_it-belnr,&lt;/P&gt;&lt;P&gt;              podoc_it-gjahr to doc_it-gjahr,&lt;/P&gt;&lt;P&gt;              v_blart to doc_it-blart,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             pdoc_it-blart to doc_it-blart,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              podoc_it-shkzg to doc_it-shkzg,&lt;/P&gt;&lt;P&gt;              podoc_it-waers to doc_it-waers,&lt;/P&gt;&lt;P&gt;              podoc_it-wrbtr to doc_it-wrbtr,&lt;/P&gt;&lt;P&gt;              podoc_it-hkont to doc_it-hkont,&lt;/P&gt;&lt;P&gt;              offset_it-osaknr to doc_it-osaknr.&lt;/P&gt;&lt;P&gt;              doc_it-er_gl = 'X'.&lt;/P&gt;&lt;P&gt;        MOVE: podoc_it-belnr to er_podoc-belnr.&lt;/P&gt;&lt;P&gt;              er_podoc-er_doc = 'X'.&lt;/P&gt;&lt;P&gt;        APPEND doc_it.&lt;/P&gt;&lt;P&gt;        COLLECT er_podoc.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;            eflag = 'X'.&lt;/P&gt;&lt;P&gt;      MOVE: podoc_it-bukrs to doc_it-bukrs,&lt;/P&gt;&lt;P&gt;            podoc_it-belnr to doc_it-belnr,&lt;/P&gt;&lt;P&gt;            podoc_it-gjahr to doc_it-gjahr,&lt;/P&gt;&lt;P&gt;            v_blart to doc_it-blart,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           pdoc_it-blart to doc_it-blart,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            podoc_it-shkzg to doc_it-shkzg,&lt;/P&gt;&lt;P&gt;            podoc_it-waers to doc_it-waers,&lt;/P&gt;&lt;P&gt;            podoc_it-wrbtr to doc_it-wrbtr,&lt;/P&gt;&lt;P&gt;            podoc_it-hkont to doc_it-hkont,&lt;/P&gt;&lt;P&gt;            offset_it-osaknr to doc_it-osaknr.&lt;/P&gt;&lt;P&gt;            doc_it-error = 'X'.&lt;/P&gt;&lt;P&gt;      MOVE: podoc_it-belnr to er_podoc-belnr.&lt;/P&gt;&lt;P&gt;            er_podoc-er_doc = 'X'.&lt;/P&gt;&lt;P&gt;        APPEND doc_it.&lt;/P&gt;&lt;P&gt;        COLLECT er_podoc.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    AT END OF belnr.&lt;/P&gt;&lt;P&gt;     IF eflag = ''.&lt;/P&gt;&lt;P&gt;      REFRESH t_result. CLEAR t_result.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           IF NOT it_gl[] is initial and&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              NOT it_curr[] is initial and&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              NOT it_hdr[] is initial.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                    check posting&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                documentheader    = it_hdr&lt;/P&gt;&lt;P&gt;           TABLES&lt;/P&gt;&lt;P&gt;                accountgl         = it_gl&lt;/P&gt;&lt;P&gt;                ACCOUNTRECEIVABLE = act_rec&lt;/P&gt;&lt;P&gt;                currencyamount    = it_curr&lt;/P&gt;&lt;P&gt;                return            = t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT t_result WHERE ( type = 'E' OR&lt;/P&gt;&lt;P&gt;                               type = 'A' ).&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        REFRESH t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;                  documentheader    = it_hdr&lt;/P&gt;&lt;P&gt;             TABLES&lt;/P&gt;&lt;P&gt;                  accountgl         = it_gl&lt;/P&gt;&lt;P&gt;                  ACCOUNTRECEIVABLE = act_rec&lt;/P&gt;&lt;P&gt;                  currencyamount    = it_curr&lt;/P&gt;&lt;P&gt;                  return            = t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Print Message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT t_result.&lt;/P&gt;&lt;P&gt;        READ TABLE pdoc_it with key bukrs = podoc_it-bukrs&lt;/P&gt;&lt;P&gt;                                    gjahr = podoc_it-gjahr&lt;/P&gt;&lt;P&gt;                                    belnr = podoc_it-belnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Get Doc Number / Error msg&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IF  t_result-type = 'S' and&lt;/P&gt;&lt;P&gt;            t_result-id = 'RW' AND&lt;/P&gt;&lt;P&gt;            t_result-number = '605'.&lt;/P&gt;&lt;P&gt;          pdoc_it-obelnr = t_result-message_v2(10).&lt;/P&gt;&lt;P&gt;          pdoc_it-ogjahr = t_result-message_v2+14(4).&lt;/P&gt;&lt;P&gt;          pdoc_it-msg = t_result-message.&lt;/P&gt;&lt;P&gt;          pdoc_it-val_rec = 'X'.&lt;/P&gt;&lt;P&gt;          CLEAR flag.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          flag = 'X'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        MODIFY pdoc_it transporting obelnr ogjahr msg&lt;/P&gt;&lt;P&gt;                                     er_rec val_rec&lt;/P&gt;&lt;P&gt;                               where bukrs = podoc_it-bukrs and&lt;/P&gt;&lt;P&gt;                                     gjahr = podoc_it-gjahr and&lt;/P&gt;&lt;P&gt;                                     belnr = podoc_it-belnr.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF flag = 'X'.&lt;/P&gt;&lt;P&gt;        CLEAR t_result.&lt;/P&gt;&lt;P&gt;        READ TABLE t_result INDEX 2.&lt;/P&gt;&lt;P&gt;        pdoc_it-msg = t_result-message.&lt;/P&gt;&lt;P&gt;        pdoc_it-er_rec = 'X'.&lt;/P&gt;&lt;P&gt;        pdoc_it-val_rec = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      append doc_it.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MODIFY pdoc_it transporting obelnr ogjahr msg&lt;/P&gt;&lt;P&gt;                                  er_rec val_rec&lt;/P&gt;&lt;P&gt;                             where bukrs = podoc_it-bukrs and&lt;/P&gt;&lt;P&gt;                                   gjahr = podoc_it-gjahr and&lt;/P&gt;&lt;P&gt;                                   belnr = podoc_it-belnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             APPEND doc_it.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;      CLEAR: pdoc_it, it_hdr, it_gl, it_curr, act_rec, t_result, eflag.&lt;/P&gt;&lt;P&gt;      REFRESH: it_hdr, it_gl, it_curr, act_rec, t_result.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;    CLEAR: podoc_it.&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;Thanks.&lt;/P&gt;&lt;P&gt;If this helps you reward with points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 17:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372068#M182980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372069#M182981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to find as such but of no use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Posting that I'm doing contains just 2 line items and of which only line item 1 would have pernr value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I tried to populate the Criteria table like this&lt;/P&gt;&lt;P&gt;i_crit-itemno_acc = '0000000001'.&lt;/P&gt;&lt;P&gt;i_crit-fieldname  = 'PERNR'.&lt;/P&gt;&lt;P&gt;i_crit-character  = '00000005'.&lt;/P&gt;&lt;P&gt;APPEND i_value.&lt;/P&gt;&lt;P&gt;CLEAR i_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and BAPI is returning error message&lt;/P&gt;&lt;P&gt; Characteristic PERNR is not known in line item 0000000001    &lt;/P&gt;&lt;P&gt; Error in document: BKPFF $ SAPD10900                         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 18:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372069#M182981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T18:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372070#M182982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would this PERNR line item have an amount?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, it is necessary to fill also the CURRENCYAMT internal table and the ITEMNO_ACC should be the same as in the I_CRIT Internal Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I had helped you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel Carvalho.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 18:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372070#M182982</guid>
      <dc:creator>daniel_carvalho</dc:creator>
      <dc:date>2006-05-19T18:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372071#M182983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes PERNR has some cost to it ... so we are filling CURRENCYAMT internal table too..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at main internal table.&lt;/P&gt;&lt;P&gt;ITEMNO_ACC = counter.&lt;/P&gt;&lt;P&gt;Populated, GL,Customer,Vendor, Currency &amp;amp; finally Criteria Tables with same counter.&lt;/P&gt;&lt;P&gt;incrimented the counter&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BAPI to post account docuement&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      documentheader    = k_head&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      accountgl         = i_glitm&lt;/P&gt;&lt;P&gt;      accountreceivable = i_cusitm&lt;/P&gt;&lt;P&gt;      accountpayable    = i_venitm&lt;/P&gt;&lt;P&gt;      currencyamount    = i_curitm&lt;/P&gt;&lt;P&gt;      criteria          = i_crit&lt;/P&gt;&lt;P&gt;      return            = i_ret2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 19:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372071#M182983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T19:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Posting FI Docu BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372072#M182984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each entry (that will be related to a line item in the final document), you need to assign a different counter. For example, a customer invoice can be seen in FB03 transaction like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item PostKey Account        Amount&lt;/P&gt;&lt;P&gt;01   01      &amp;lt;Customer No.&amp;gt; N.NN&lt;/P&gt;&lt;P&gt;02   50      &amp;lt;GL Acc.       N.NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you need to:&lt;/P&gt;&lt;P&gt;a) Start counter = 1&lt;/P&gt;&lt;P&gt;b) Populate CUSTOMER,&lt;/P&gt;&lt;P&gt;c) Populate CURRENCY,&lt;/P&gt;&lt;P&gt;d) Increment counter&lt;/P&gt;&lt;P&gt;b) Populate GL ACCOUNT,&lt;/P&gt;&lt;P&gt;c) Populate CURRENCY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I had helped you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 10:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-fi-docu-bapi-acc-document-post/m-p/1372072#M182984</guid>
      <dc:creator>daniel_carvalho</dc:creator>
      <dc:date>2006-06-02T10:55:54Z</dc:date>
    </item>
  </channel>
</rss>

