<?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: BAPI_ACC_GL_POSTING_POST -POSTING KEY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456976#M215953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;posting key will be automatically generated by the bapi based on the currency &lt;SPAN __jive_emoticon_name="plus"&gt;&lt;/SPAN&gt; or &lt;SPAN __jive_emoticon_name="minus"&gt;&lt;/SPAN&gt; depending on the the posting item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'BAPI_ACC_DOCUMENT_CHECK'&lt;/P&gt;&lt;P&gt;'BAPI_ACC_DOCUMENT_POST' are better for the requirement. have the payments terms fields based on Vendor or Customer depending on the requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2006 18:37:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-20T18:37:02Z</dc:date>
    <item>
      <title>BAPI_ACC_GL_POSTING_POST -POSTING KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456974#M215951</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;can anyone plz tell me how to pass Posting key and ZTERM values in this bapi .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i using this bapi for tranction F-02 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: sridhar reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 08:52:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456974#M215951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T08:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_GL_POSTING_POST -POSTING KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456975#M215952</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;Look at the sample code for posting through BAPI.&lt;/P&gt;&lt;P&gt;**************************&lt;/P&gt;&lt;P&gt;data: it_hdr like standard table of bapiache09&lt;/P&gt;&lt;P&gt;                              with header line,             "#EC NEEDED&lt;/P&gt;&lt;P&gt;      it_gl like standard table of bapiacgl09 with header line,&lt;/P&gt;&lt;P&gt;      it_curr like standard table of bapiaccr09 with header line,&lt;/P&gt;&lt;P&gt;      t_result like standard table of bapiret2 with header line,&lt;/P&gt;&lt;P&gt;      act_rec like standard table of bapiacar09 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_blart = 'ZT'.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ON CHANGE of podoc_it-belnr.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     line_item = 0.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ENDON.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    on change of podoc_it-belnr or&lt;/P&gt;&lt;P&gt;                 podoc_it-gjahr.&lt;/P&gt;&lt;P&gt;      line_item = 0.&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;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   = sy-datum.&lt;/P&gt;&lt;P&gt;      if p_podt is initial.&lt;/P&gt;&lt;P&gt;        it_hdr-pstng_date = podoc_it-budat.&lt;/P&gt;&lt;P&gt;        v_monat = podoc_it-monat.&lt;/P&gt;&lt;P&gt;        v_gjahr = podoc_it-gjahr.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        it_hdr-pstng_date = p_podt.&lt;/P&gt;&lt;P&gt;      endif.&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;    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;              podoc_it-per_yr to doc_it-per_yr,&lt;/P&gt;&lt;P&gt;              podoc_it-buzei to doc_it-buzei,&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             offset_it-osaknr to doc_it-osaknr,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              podoc_it-error to doc_it-error,&lt;/P&gt;&lt;P&gt;              podoc_it-invno to doc_it-invno,&lt;/P&gt;&lt;P&gt;              podoc_it-sono to doc_it-sono,&lt;/P&gt;&lt;P&gt;              podoc_it-soitem to doc_it-soitem,&lt;/P&gt;&lt;P&gt;              podoc_it-lnum to doc_it-lnum,&lt;/P&gt;&lt;P&gt;              podoc_it-lname to doc_it-lname,&lt;/P&gt;&lt;P&gt;              podoc_it-panum to doc_it-panum,&lt;/P&gt;&lt;P&gt;              podoc_it-pname to doc_it-pname,&lt;/P&gt;&lt;P&gt;              podoc_it-pono to doc_it-pono.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if podoc_it-koart = 'D'.&lt;/P&gt;&lt;P&gt;          move: podoc_it-kunnr to doc_it-hkont,&lt;/P&gt;&lt;P&gt;                podoc_it-kunnr to doc_it-osaknr.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          move: 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;        endif.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             pdoc_it-hkont = podoc_it-hkont.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;&lt;/P&gt;&lt;P&gt;        if podoc_it-koart = 'D'.&lt;/P&gt;&lt;P&gt;          clear: v_sgtxt.&lt;/P&gt;&lt;P&gt;          concatenate podoc_it-bukrs podoc_it-gjahr&lt;/P&gt;&lt;P&gt;                      podoc_it-belnr podoc_it-buzei into v_sgtxt.&lt;/P&gt;&lt;P&gt;          if podoc_it-shkzg = 'S'.&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;P&gt;            act_rec-item_text  = v_sgtxt.&lt;/P&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;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;P&gt;            act_rec-item_text  = v_sgtxt.&lt;/P&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;P&gt;          clear: v_sgtxt.&lt;/P&gt;&lt;P&gt;          concatenate podoc_it-bukrs podoc_it-gjahr&lt;/P&gt;&lt;P&gt;                      podoc_it-belnr podoc_it-buzei into v_sgtxt.&lt;/P&gt;&lt;P&gt;          if podoc_it-shkzg = 'S'.&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;P&gt;            it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-fis_period = v_monat.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-fisc_year  = v_gjahr.&lt;/P&gt;&lt;/LI&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;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;P&gt;            it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-fis_period = v_monat.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_gl-fisc_year  = v_gjahr.&lt;/P&gt;&lt;/LI&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;              podoc_it-buzei to doc_it-buzei,&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;        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;&lt;/P&gt;&lt;P&gt;        if podoc_it-koart = 'D'.&lt;/P&gt;&lt;P&gt;          move: podoc_it-kunnr to doc_it-hkont,&lt;/P&gt;&lt;P&gt;                podoc_it-kunnr to doc_it-osaknr.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          move: 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;        endif.&lt;/P&gt;&lt;P&gt;&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."IF SENDING A/C not found&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;            podoc_it-buzei to doc_it-buzei,&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;      doc_it-error = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if podoc_it-koart = 'D'.&lt;/P&gt;&lt;P&gt;        move: podoc_it-kunnr to doc_it-hkont,&lt;/P&gt;&lt;P&gt;              podoc_it-kunnr to doc_it-osaknr.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        move: 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;      endif.&lt;/P&gt;&lt;P&gt;&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;      er_podoc-er_sac = 'X'.&lt;/P&gt;&lt;P&gt;&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;    if podoc_it-blart = 'DF' and podoc_it-xbilk = space.&lt;/P&gt;&lt;P&gt;      read table upd_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;                                 vbeln = podoc_it-sono&lt;/P&gt;&lt;P&gt;                                 posnr = podoc_it-soitem&lt;/P&gt;&lt;P&gt;                                 binary search.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        clear bklog_it.&lt;/P&gt;&lt;P&gt;        bklog_it-vbeln = upd_it-vbeln.&lt;/P&gt;&lt;P&gt;        bklog_it-posnr = upd_it-posnr.&lt;/P&gt;&lt;P&gt;        bklog_it-upd_amt = upd_it-upd_amt.&lt;/P&gt;&lt;P&gt;        append bklog_it.&lt;/P&gt;&lt;P&gt;      endif.&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;P&gt;&lt;/P&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(28).&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;        else.&lt;/P&gt;&lt;P&gt;          loop at bklog_it into valid_bklog_it.&lt;/P&gt;&lt;P&gt;            collect valid_bklog_it.&lt;/P&gt;&lt;P&gt;          endloop.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        clear v_per_yr.&lt;/P&gt;&lt;P&gt;        concatenate '0' v_monat '-' v_gjahr&lt;/P&gt;&lt;P&gt;                                     into v_per_yr.&lt;/P&gt;&lt;P&gt;        move v_per_yr to pdoc_it-sper_yr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        modify pdoc_it transporting obelnr ogjahr sper_yr 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, bklog_it.&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>Thu, 20 Jul 2006 08:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456975#M215952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T08:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_GL_POSTING_POST -POSTING KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456976#M215953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;posting key will be automatically generated by the bapi based on the currency &lt;SPAN __jive_emoticon_name="plus"&gt;&lt;/SPAN&gt; or &lt;SPAN __jive_emoticon_name="minus"&gt;&lt;/SPAN&gt; depending on the the posting item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'BAPI_ACC_DOCUMENT_CHECK'&lt;/P&gt;&lt;P&gt;'BAPI_ACC_DOCUMENT_POST' are better for the requirement. have the payments terms fields based on Vendor or Customer depending on the requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 18:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-gl-posting-post-posting-key/m-p/1456976#M215953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T18:37:02Z</dc:date>
    </item>
  </channel>
</rss>

