<?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: The typical problem with BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149243#M117030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this is an old thread, but I wanted to provide a link (for those searching for an answer in the future) to a good way to get the document number after calling BAPI_ACC_DOCUMENT_POST.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my reply in the following SDN forum topic: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="485162"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;James Gaddis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2006 15:28:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-14T15:28:17Z</dc:date>
    <item>
      <title>The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149237#M117024</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;Just my first post in the forum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the BAPI_ACC_DOCUMENT_POST to generate an accountable document. As I've seen with a lot of people, the bapi is succesfully executed, but no doc. is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone have a look on my code and try to guide me through the right way to have my doc? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--- doc_head TYPE BAPIACHE09 ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;doc_head-obj_type   = 'BKPFF'.&lt;/P&gt;&lt;P&gt;CONCATENATE SY-SYSID 'CLNT' SY-MANDT INTO &lt;/P&gt;&lt;P&gt;                      DOC_HEAD-OBJ_SYS.&lt;/P&gt;&lt;P&gt;doc_head-obj_key    =  '$'.&lt;/P&gt;&lt;P&gt;doc_head-COMP_CODE  = P_BUKRS.&lt;/P&gt;&lt;P&gt;doc_head-DOC_TYPE   = 'SA'.&lt;/P&gt;&lt;P&gt;doc_head-PSTNG_DATE = P_BUDAT.&lt;/P&gt;&lt;P&gt;doc_head-FISC_YEAR  = sy-datum(4). "Periodo liquidación&lt;/P&gt;&lt;P&gt;doc_head-FIS_PERIOD = sy-datum+4(2).&lt;/P&gt;&lt;P&gt;doc_head-USERNAME   = SY-UNAME.&lt;/P&gt;&lt;P&gt;doc_head-DOC_DATE   = sy-datum.&lt;/P&gt;&lt;P&gt;doc_head-BUS_ACT    = 'RFBU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--- w_bseg TYPE TABLE OF BAPIACGL09 ---&lt;/P&gt;&lt;P&gt;--- t_cur_am TYPE TABLE OF BAPIACCR09 ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_bseg-ITEMNO_ACC = '0001'.&lt;/P&gt;&lt;P&gt;w_bseg-GL_ACCOUNT = '0006230000'.&lt;/P&gt;&lt;P&gt;w_bseg-ALLOC_NMBR = P_REF.&lt;/P&gt;&lt;P&gt;w_bseg-stat_con   = 'S'.&lt;/P&gt;&lt;P&gt;w_bseg-COSTCENTER = P_COST_CENTER.&lt;/P&gt;&lt;P&gt;w_bseg-TAX_CODE = 'S0'.&lt;/P&gt;&lt;P&gt;APPEND w_bseg.&lt;/P&gt;&lt;P&gt;CLEAR w_bseg-COSTCENTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_cur_am-ITEMNO_ACC = '0001'.&lt;/P&gt;&lt;P&gt;t_cur_am-CURRENCY   = 'EUR'.&lt;/P&gt;&lt;P&gt;t_cur_am-AMT_DOCCUR = '100'.&lt;/P&gt;&lt;P&gt;APPEND t_cur_am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_bseg-ITEMNO_ACC = '0002'.&lt;/P&gt;&lt;P&gt;w_bseg-ITEM_TEXT  = TEXT-001.&lt;/P&gt;&lt;P&gt;w_bseg-GL_ACCOUNT = '0004000900'.&lt;/P&gt;&lt;P&gt;w_bseg-ALLOC_NMBR = P_TEXT.&lt;/P&gt;&lt;P&gt;w_bseg-stat_con   = 'H'.&lt;/P&gt;&lt;P&gt;APPEND w_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Llenar importes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_cur_am-ITEMNO_ACC = '0002'.&lt;/P&gt;&lt;P&gt;t_cur_am-CURRENCY   = 'EUR'.&lt;/P&gt;&lt;P&gt;t_cur_am-AMT_DOCCUR = '100'.&lt;/P&gt;&lt;P&gt;APPEND t_cur_am.&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          = doc_head&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CUSTOMERCPD             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONTRACTHEADER          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    OBJ_TYPE                = obj_type&lt;/P&gt;&lt;P&gt;    OBJ_KEY                 = obj_key&lt;/P&gt;&lt;P&gt;    OBJ_SYS                 = obj_sys&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    ACCOUNTGL               = w_bseg&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ACCOUNTRECEIVABLE       = &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCOUNTPAYABLE           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ACCOUNTTAX              = &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CURRENCYAMOUNT          = t_cur_am&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CRITERIA                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUEFIELD               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSION1               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    RETURN                  = t_ret&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PAYMENTCARD              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONTRACTITEM             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSION2               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REALESTATE               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b_wait = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    WAIT          = b_wait&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    RETURN        = b_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get my "Document XXXXXXXXXX was Successfully created" but no BKPF record is created on the database. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Angel Garcia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2006 17:15:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149237#M117024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-26T17:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149238#M117025</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;Welcome to SDN!&lt;/P&gt;&lt;P&gt;I have encountered this problem before.&lt;/P&gt;&lt;P&gt;You should not pass anything for obj_type, obj_sys, and obj_key. Then SAP will assume that it has to generate a new document number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2006 19:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149238#M117025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-26T19:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149239#M117026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, Bhanumurthy, but I've tried that solution, and the BAPI is telling me to fill those fields. Have I missed any additional field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 00:16:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149239#M117026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-27T00:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149240#M117027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. U code must be absolutely right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The problem is with this general bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. I also faced the same problem,&lt;/P&gt;&lt;P&gt;   but there is no solution for this&lt;/P&gt;&lt;P&gt;    on SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. After posting the bapi, (also using commit)&lt;/P&gt;&lt;P&gt;   the message says, Docuement xXX created,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  but actually there is no document&lt;/P&gt;&lt;P&gt;   in tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Even the Number Range is incremented,&lt;/P&gt;&lt;P&gt;   but no document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Its really a mystery for me.&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;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 07:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149240#M117027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-27T07:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149241#M117028</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;Check this link.It is explaining the BAPI with sample code.Kindly reward points by clicking the star on the left of reply,if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://funciones.sapabap.cc/DocuFuncion.asp?Id=515" target="test_blank"&gt;http://funciones.sapabap.cc/DocuFuncion.asp?Id=515&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 07:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149241#M117028</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-01-27T07:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149242#M117029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jayanthi Jayaraman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am also facing BAP_ACC_DOCUMENT_POST problem ,sometimes document posted message ,but there is no document.I am unable to access your link.please can you provide me the solution.my mail id is sridhar_88@yahoo.com or srinsap@gmail.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;A href="http://funciones.sapabap.cc/DocuFuncion.asp?Id=515" target="test_blank"&gt;http://funciones.sapabap.cc/DocuFuncion.asp?Id=515&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 05:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149242#M117029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T05:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: The typical problem with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149243#M117030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this is an old thread, but I wanted to provide a link (for those searching for an answer in the future) to a good way to get the document number after calling BAPI_ACC_DOCUMENT_POST.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my reply in the following SDN forum topic: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="485162"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;James Gaddis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 15:28:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-typical-problem-with-bapi-acc-document-post/m-p/1149243#M117030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T15:28:17Z</dc:date>
    </item>
  </channel>
</rss>

