<?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 BAPI BAPI_ACC_DOCUMENT_POST is not posting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765607#M1584052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the BAPI_ACC_DOCUMENT_POST BAPI, when i call it from my code I get a SUCCESSFUL message and the document number created by the BAPI. But when I look in the system for this document, it does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ussing the BAPI_TRANSACTION_COMMIT after BAPI_ACC_DOCUMENT_POST, in fact I tried to code a COMMIT WORK but none of those solutions works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, if you have any idea or solution share it with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Mar 2011 18:31:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-30T18:31:39Z</dc:date>
    <item>
      <title>BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765607#M1584052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the BAPI_ACC_DOCUMENT_POST BAPI, when i call it from my code I get a SUCCESSFUL message and the document number created by the BAPI. But when I look in the system for this document, it does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ussing the BAPI_TRANSACTION_COMMIT after BAPI_ACC_DOCUMENT_POST, in fact I tried to code a COMMIT WORK but none of those solutions works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, if you have any idea or solution share it with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 18:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765607#M1584052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T18:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765608#M1584053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure you are checking the RETURN table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your code and let us see what you are doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, is this in your DEV environment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if so, make sure the company you are posting for is setup correctly for GL entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 18:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765608#M1584053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T18:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765609#M1584054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried with commit work and wait?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 18:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765609#M1584054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T18:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765610#M1584055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keith,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sg_doc_header-username   = sy-uname.
  sg_doc_header-header_txt = p_i_index_header-import_text.
  sg_doc_header-comp_code  = p_i_index_header-bukrs.
  sg_doc_header-doc_date   = p_i_index_header-bldat.
  sg_doc_header-pstng_date = p_i_index_header-budat.
  sg_doc_header-doc_type   = c_ka.
  sg_doc_header-ref_doc_no = p_i_index_header-xblnr.

LOOP AT p_t_index_item ASSIGNING &amp;lt;sl_items&amp;gt;.

    sg_accountpay-itemno_acc = c_0010.
    sg_accountpay-vendor_no  = p_i_index_header-lifnr.
    sg_accountpay-comp_code  = &amp;lt;sl_items&amp;gt;-bukrs.
    sg_accountpay-pymt_meth  = c_t.
    sg_accountpay-pmnt_block = c_a.
    sg_accountpay-item_text  = &amp;lt;sl_items&amp;gt;-sgtxt.
    sg_accountpay-po_sub_no  = &amp;lt;sl_items&amp;gt;-ebeln.
    sg_accountpay-po_checkdg = &amp;lt;sl_items&amp;gt;-ebelp.
    sg_accountpay-tax_code   = &amp;lt;sl_items&amp;gt;-tax_code1.
    sg_accountpay-alloc_nmbr = &amp;lt;sl_items&amp;gt;-zuonr.
sg_accountpay-bline_date =  vl_fdtag.

    READ TABLE tl_ekpo WITH KEY ebeln = &amp;lt;sl_items&amp;gt;-ebeln
                                ebelp = &amp;lt;sl_items&amp;gt;-ebelp
     ASSIGNING &amp;lt;sl_ekpo&amp;gt; BINARY SEARCH.
 IF sy-subrc = 0.
      CASE &amp;lt;sl_ekpo&amp;gt;-knttp.
        WHEN c_p.
          sg_accountpay-sp_gl_ind = c_b.
        WHEN OTHERS.
          sg_accountpay-sp_gl_ind = c_a.
      ENDCASE.
    ENDIF.

    APPEND sg_accountpay TO tg_accountpay.
    CLEAR sg_accountpay.

    sg_currency-itemno_acc = c_0010.
    sg_currency-currency = p_i_index_header-waers.
    sg_currency-amt_base = &amp;lt;sl_items&amp;gt;-wrbtr.

    APPEND sg_currency TO tg_currency.
    CLEAR sg_currency.

endloop.

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
    EXPORTING
      documentheader = sg_doc_header
    IMPORTING
      obj_type       = vg_obj_type
      obj_key        = vg_obj_key
      obj_sys        = vg_obj_sys
    TABLES
      accountpayable = tg_accountpay
      currencyamount = tg_currency
      return         = tl_return.

READ TABLE tl_return WITH KEY type = c_e TRANSPORTING NO FIELDS.
    IF sy-subrc &amp;gt;&amp;lt; 0.
      IF vg_obj_key IS NOT INITIAL.
        p_successful = c_x.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = c_x
          IMPORTING
            return = sl_return.
      ENDIF.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Mar 31, 2011 9:30 AM - code tags added, "sy-subrc &amp;gt;&amp;lt; 0" changed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 19:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765610#M1584055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T19:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765611#M1584056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tl_return WITH KEY type = c_e TRANSPORTING NO FIELDS.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;IF vg_obj_key IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few problems here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- errors returned in the RETURN table can have type E, A, or X (not just E). You should check for all of these&lt;/P&gt;&lt;P&gt;- the line "IF sy-subrc 0' is not syntactically correct! Was there a problem in pasting the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Paul Bakker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 06:19:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765611#M1584056</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2011-03-31T06:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765612#M1584057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the line "IF sy-subrc 0' is not syntactically correct! Was there a problem in pasting the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;lt;&amp;amp;gt; is being automatically removed from posts because it is interpreted as an HTML tag, I have changed it to &amp;gt;&amp;lt; now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 07:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765612#M1584057</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2011-03-31T07:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765613#M1584058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is not any problem with the messages validation, the system makes the commit. But when I'm looking for the document I can not find it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example is for posting a FB65 document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 16:58:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765613#M1584058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T16:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765614#M1584059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you see if there were any documents posted on the day in question? Just look at the date of entry only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 17:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765614#M1584059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T17:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI BAPI_ACC_DOCUMENT_POST is not posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765615#M1584060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CORRECTION: I have to post a F-47 document using the BAPI, i just have ONE position.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 20:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-bapi-acc-document-post-is-not-posting/m-p/7765615#M1584060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T20:10:17Z</dc:date>
    </item>
  </channel>
</rss>

