<?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: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/13915427#M2037559</link>
    <description>&lt;P&gt;Click to back and after that put cursor at "WAIT" and then click execute ikon, the document would get post successfully and the you get the output in BKPF table also&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2024 09:50:51 GMT</pubDate>
    <dc:creator>jamal_haider</dc:creator>
    <dc:date>2024-10-22T09:50:51Z</dc:date>
    <item>
      <title>how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252740#M1383916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use Bapi - 'BAPI_ACC_DOCUMENT_POST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below code gived message that - &lt;STRONG&gt;Document posted successfully: BKPFF 180000046710012010 DW1CLNT100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but the document number gererated is not getting stored in any of BKPF or BSEG tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Bapi should work in the same way as FB01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check and let me know your valuable suggestions on why document number is not getting saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_______________________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lwa_header  TYPE bapiache09,&lt;/P&gt;&lt;P&gt;      lt_ar       TYPE TABLE OF bapiacar09,&lt;/P&gt;&lt;P&gt;      lwa_ar      TYPE bapiacar09,&lt;/P&gt;&lt;P&gt;      lt_return   TYPE TABLE OF bapiret2,&lt;/P&gt;&lt;P&gt;      lwa_return  TYPE bapiret2,&lt;/P&gt;&lt;P&gt;      lt_curr     TYPE TABLE OF bapiaccr09,&lt;/P&gt;&lt;P&gt;      lwa_curr    TYPE bapiaccr09.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start&lt;/P&gt;&lt;P&gt;DATA : it_accountgl  TYPE STANDARD TABLE OF bapiacgl09 ,&lt;/P&gt;&lt;P&gt;       lwa_accountgl TYPE bapiacgl09.&lt;/P&gt;&lt;P&gt;*End&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: lwa_header, lt_ar, lwa_ar, lt_return, lwa_return, lt_curr, lwa_curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lwa_header-bus_act      = 'BKPF'.&lt;/P&gt;&lt;P&gt;lwa_header-username     = 'GOWDA'.&lt;/P&gt;&lt;P&gt;lwa_header-comp_code    = '1001'.&lt;/P&gt;&lt;P&gt;lwa_header-doc_date     = '20091102'.&lt;/P&gt;&lt;P&gt;lwa_header-pstng_date   = '20091102'.&lt;/P&gt;&lt;P&gt;lwa_header-trans_date   = '20091102'.&lt;/P&gt;&lt;P&gt;lwa_header-fisc_year    = '2010'.&lt;/P&gt;&lt;P&gt;lwa_header-fis_period   = '06'.&lt;/P&gt;&lt;P&gt;lwa_header-doc_type     = 'DR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lwa_accountgl-itemno_acc = '0000000001'.&lt;/P&gt;&lt;P&gt;lwa_accountgl-gl_account = '0020000000'.&lt;/P&gt;&lt;P&gt;lwa_accountgl-tax_code   = 'V1'.&lt;/P&gt;&lt;P&gt;lwa_accountgl-item_text  = 'BAPI Test G/L line item'.&lt;/P&gt;&lt;P&gt;APPEND lwa_accountgl TO it_accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lwa_ar-itemno_acc  = '0000000001'.&lt;/P&gt;&lt;P&gt;*lwa_ar-customer    = '4000000006'.&lt;/P&gt;&lt;P&gt;*lwa_ar-gl_account  = '0012110000'.&lt;/P&gt;&lt;P&gt;**lwa_ar-gl_account  = '0020000000'.&lt;/P&gt;&lt;P&gt;*lwa_ar-profit_ctr  = '0000000217'.&lt;/P&gt;&lt;P&gt;*APPEND lwa_ar TO lt_ar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lwa_curr-itemno_acc = '0000000001'.&lt;/P&gt;&lt;P&gt;lwa_curr-curr_type  = '00'.&lt;/P&gt;&lt;P&gt;lwa_curr-currency   = 'USD'.&lt;/P&gt;&lt;P&gt;lwa_curr-amt_base   = '100.00'.&lt;/P&gt;&lt;P&gt;APPEND lwa_curr TO lt_curr.&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    = lwa_header&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    accountgl         = it_accountgl&lt;/P&gt;&lt;P&gt;    accountreceivable = lt_ar&lt;/P&gt;&lt;P&gt;    currencyamount    = lt_curr&lt;/P&gt;&lt;P&gt;    return            = lt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;DATA: bt_return LIKE bapiret2.&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   = 'X'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    return = bt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT lt_return INTO lwa_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / lwa_return-message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 02:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252740#M1383916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T02:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252741#M1383917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check, are you passing all the parameters.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
    EXPORTING
      DOCUMENTHEADER    = DOC_HEADER
    IMPORTING
      OBJ_KEY           = OBJTYP
    TABLES
      ACCOUNTGL         = DOC_ITEM
      ACCOUNTRECEIVABLE = CUSTOMER
      ACCOUNTPAYABLE    = VENDOR
      CURRENCYAMOUNT    = DOC_VALUES
      RETURN            = RETURN.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      IMPORTING
        RETURN = RETURN.
    COMMIT WORK AND WAIT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 04:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252741#M1383917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T04:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252742#M1383918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you ples let me know how you are filling the parameters which you pass into the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;avi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 05:15:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252742#M1383918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T05:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252743#M1383919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACC_BAPI_TEST_DOCUMENT&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 05:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252743#M1383919</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2009-11-03T05:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252744#M1383920</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;Use parameter WAIT in BAPI_TRANSACTION_COMMIT as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:wa_return TYPE BAPIRET2.&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   = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return = wa_return.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 05:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252744#M1383920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T05:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252745#M1383921</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;use BAPI_TRANSACTION_COMMIT after BAPI_ACC_DOCUMENT_POST call was successful to commit changes to database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 06:07:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252745#M1383921</guid>
      <dc:creator>anusurbab</dc:creator>
      <dc:date>2009-11-03T06:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252746#M1383922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As u r getting sucess message in return table, it means values passed to the BAPI perameters are fine.&lt;/P&gt;&lt;P&gt;just use commit as..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.  thats it&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;P&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 07:45:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252746#M1383922</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-03T07:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252747#M1383923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As you can see in my code , I have tried that as well using BAPI TRANSACTION COMMIT Still its not happening&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 11:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252747#M1383923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T11:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252748#M1383924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data:          l_obj_type   LIKE bapiache08-obj_type,&lt;/P&gt;&lt;P&gt;         l_obj_key    LIKE bapiache02-obj_key,&lt;/P&gt;&lt;P&gt;         l_obj_sys    LIKE bapiache02-obj_sys.&lt;/P&gt;&lt;P&gt;   &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 = l_doc_header&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        obj_type       = l_obj_type&lt;/P&gt;&lt;P&gt;        obj_key        = l_obj_key&lt;/P&gt;&lt;P&gt;        obj_sys        = l_obj_sys&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        accountgl      = lt_doc_item&lt;/P&gt;&lt;P&gt;        currencyamount = lt_doc_values&lt;/P&gt;&lt;P&gt;        return         = lt_return&lt;/P&gt;&lt;P&gt;        extension1     = lt_extension1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to get the import parameters as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the same way for FB01 number of times and it is working fine for me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252748#M1383924</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-03T12:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252749#M1383925</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;Did you try using the parameter with WAIT = X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will surely work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subhashini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:08:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252749#M1383925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T12:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252750#M1383926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rahul,&lt;/P&gt;&lt;P&gt;Did you pass any values in Import parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please paste your code here on how you filled the Bapi import and export parameters&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;Avi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252750#M1383926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T12:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252751#M1383927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no i didnt ...its an import parameter...it only gives the value.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing.....&lt;/P&gt;&lt;P&gt;after seeing your code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in header ...u r passing posting/documnet date as 02 11 2009 and fiscal period as 06....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can that be possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check it.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fiscal period should be 11 if ur date format is ddmmyyyy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same for fiscal year .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please correct....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rahul Keshav on Nov 3, 2009 6:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252751#M1383927</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-03T12:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252752#M1383928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_doc_header-bus_act    = 'RFBU'.   replace BKPF with RFBU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also try to pass Business area or costcenter depending on the account type....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rahul Keshav on Nov 3, 2009 6:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 13:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252752#M1383928</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-03T13:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252753#M1383929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Avi,&lt;/P&gt;&lt;P&gt;Please check the document its been posting in 2010 fisical year. Its not correct. &lt;/P&gt;&lt;P&gt;Please change the fisical year to 2009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 13:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252753#M1383929</guid>
      <dc:creator>former_member206396</dc:creator>
      <dc:date>2009-11-03T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252754#M1383930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if answered please close the thread...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 13:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252754#M1383930</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-05T13:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252755#M1383931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Avi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact I've came across the same problem: this is due to the fact that the BAPI issues a success message even when the FI document is not finantialy correct, like in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that you´re trying to post a debit of USD 100, but not the credit - you need at least item '0000000002' with USD -100 for the posting to be successful. Of course this is only an example - what I mean is that the sum of positive (debit) items should be equal to (minus the) sum of negative (credit) items:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples of correct debit/credit using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USD 100&lt;/P&gt;&lt;P&gt;USD -100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USD 100&lt;/P&gt;&lt;P&gt;USD -30&lt;/P&gt;&lt;P&gt;USD -70&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;Joã&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 22:57:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252755#M1383931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-10T22:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252756#M1383932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this code  may you get some hint&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA gd_documentheader LIKE bapiache09.
DATA l_type            LIKE gd_documentheader-obj_type.
DATA l_key             LIKE gd_documentheader-obj_key.
DATA l_sys             LIKE gd_documentheader-obj_sys.
DATA it_accountgl      LIKE TABLE OF bapiacgl09 WITH HEADER LINE.
DATA it_currencyamount LIKE TABLE OF bapiaccr09 WITH HEADER LINE.
DATA it_return         LIKE TABLE OF bapiret2   WITH HEADER LINE.
DATA it_return1        LIKE TABLE OF bapiret2   WITH HEADER LINE.

gd_documentheader-username   = sy-uname.
gd_documentheader-header_txt = 'BAPI Test'.
gd_documentheader-comp_code  =  'RS01'.
gd_documentheader-fisc_year  = '2008'.
*gd_documentheader-doc_date   = '0'.
*gd_documentheader-pstng_date = sy-datum.
gd_documentheader-bus_act    = 'RMRP'.
gd_documentheader-fis_period = '11'.
gd_documentheader-doc_type = 'DW'.

CLEAR it_accountgl.
it_accountgl-itemno_acc     = 1.
it_accountgl-gl_account     = '0011500000'.
it_accountgl-tax_code       = 'V0'.
it_accountgl-item_text      = 'BAPI Test G/L line item'.
it_accountgl-customer       = 'AG0460'.
*it_accountgl-profit_ctr     = '0000002002'.
it_accountgl-de_cre_ind     = 'H'.
it_accountgl-comp_code      = 'RS01'.
it_accountgl-doc_type       = 'DR'.
*it_accountgl-fis_period     = '06'.
*it_accountgl-fisc_year      = '2009'.
it_accountgl-pstng_date     = sy-datum.
APPEND it_accountgl.

CLEAR it_currencyamount.
it_currencyamount-itemno_acc   = 1.
it_currencyamount-curr_type    = '00'.
it_currencyamount-currency     = 'INR'.
it_currencyamount-amt_base     = '100'.
APPEND it_currencyamount.

CLEAR it_currencyamount.
it_currencyamount-itemno_acc   = 2.
it_currencyamount-curr_type    = '00'.
it_currencyamount-currency     = 'INR'.
it_currencyamount-amt_base     = '100'.
APPEND it_currencyamount.

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader = gd_documentheader
  IMPORTING
    obj_type       = l_type
    obj_key        = l_key
    obj_sys        = l_sys
  TABLES
    accountgl      = it_accountgl
    currencyamount = it_currencyamount
    return         = it_return.

WAIT UP TO 10 SECONDS.

IF sy-subrc IS INITIAL.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 05:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252756#M1383932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-11T05:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252757#M1383933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 09:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252757#M1383933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-23T09:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252758#M1383934</link>
      <description>&lt;P&gt;You have the data in append, how do I place that data by loading an excel file Thank&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 00:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/6252758#M1383934</guid>
      <dc:creator>lic_dimasdaniel</dc:creator>
      <dc:date>2023-12-20T00:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to use Bapi -  'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/13915427#M2037559</link>
      <description>&lt;P&gt;Click to back and after that put cursor at "WAIT" and then click execute ikon, the document would get post successfully and the you get the output in BKPF table also&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi-bapi-acc-document-post/m-p/13915427#M2037559</guid>
      <dc:creator>jamal_haider</dc:creator>
      <dc:date>2024-10-22T09:50:51Z</dc:date>
    </item>
  </channel>
</rss>

