<?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_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478226#M15663</link>
    <description>&lt;P&gt;Hi Karim,&lt;/P&gt;&lt;P&gt;Please review your code and below link give you some idea.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2013/07/23/accounttax-in-bapiaccdocumentpost"&gt;https://blogs.sap.com/2013/07/23/accounttax-in-bapiaccdocumentpost&lt;/A&gt;/&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2017 15:09:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-05-26T15:09:47Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478224#M15661</link>
      <description>&lt;P&gt;I know many questions have been asked about this BAPI, I've done countless searches but all the questions are advanced compared to where I am at, so here it goes..&lt;/P&gt;&lt;P&gt;These are the errors I am getting in BAPI return tables generated by the code below.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;I&gt;&lt;STRONG&gt;609 Error in document: BKPFF $ MPECLNT130 &lt;/STRONG&gt;&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;&lt;STRONG&gt;002 No item information transferred into Accounting &lt;/STRONG&gt;&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;&lt;STRONG&gt;602 Required field USERNAME was not transferred in parameter DOCUMENTHEADER&lt;/STRONG&gt;&lt;/I&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;NOTE: when I entered these exact same parameters in the "BAPI" transaction test run, posting was actually successful.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zpost
TYPE-POOLS truxs.

"declaring tables to be passed to BAPI

data:
DOCUMENTHEADER LIKE BAPIACHE09 occurs 0 WITH HEADER LINE,
ACCOUNTGL LIKE BAPIACGL09 occurs 0 with HEADER LINE,
CURRENCYAMOUNT LIKE BAPIACCR09 occurs 0 with HEADER LINE,

"declare working areas for each of the above tables.

wa_DOCUMENTHEADER type BAPIACHE09,
wa_ACCOUNTGL type BAPIACGL09,
wa_CURRENCYAMOUNT type BAPIACCR09,

"BAPI return table

return type table of bapiret2 WITH HEADER LINE.

"populate BAPI manually
wa_DOCUMENTHEADER-username = 'ADEL'.
wa_DOCUMENTHEADER-header_txt = 'header1'.
wa_DOCUMENTHEADER-comp_code = 'amle'.
wa_DOCUMENTHEADER-DOC_DATE = '250517'.
wa_DOCUMENTHEADER-PSTNG_DATE = '250517'.
wa_DOCUMENTHEADER-DOC_TYPE = 'SA'.
append wa_DOCUMENTHEADER to DOCUMENTHEADER.

wa_ACCOUNTGL-ITEMNO_ACC = 1.
wa_ACCOUNTGL-GL_ACCOUNT = '410010000'.
wa_ACCOUNTGL-ITEM_TEXT = 'item test'.
wa_ACCOUNTGL-PROFIT_CTR = 'Z010101040'.
append wa_accountgl to accountgl.

wa_ACCOUNTGL-ITEMNO_ACC = 2 .
wa_ACCOUNTGL-GL_ACCOUNT = '121201300'.
wa_ACCOUNTGL-ITEM_TEXT = 'item test'.
append wa_accountgl to accountgl.

wa_CURRENCYAMOUNT-ITEMNO_ACC = 1.
wa_currencyamount-CURRENCY = 'EGP'.
wa_currencyamount-AMT_DOCCUR = '-1000.0'.
wa_currencyamount-AMT_BASE = '-1000.0'.
append wa_CURRENCYAMOUNT to currencyamount.

wa_CURRENCYAMOUNT-ITEMNO_ACC = 2.
wa_currencyamount-CURRENCY = 'EGP'.
wa_currencyamount-AMT_DOCCUR = '1000.0'.
wa_currencyamount-AMT_BASE = '1000.0'.
append wa_CURRENCYAMOUNT to currencyamount.


          CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
            EXPORTING
              documentheader          = documentheader
*             CUSTOMERCPD             =
*             CONTRACTHEADER          =
*           IMPORTING
*             OBJ_TYPE                =
*             OBJ_KEY                 =
*             OBJ_SYS                 =
            tables
*             ACCOUNTGL               =
*             ACCOUNTRECEIVABLE       =
*             ACCOUNTPAYABLE          =
*             ACCOUNTTAX              =
              currencyamount          = currencyamount
*             CRITERIA                =
*             VALUEFIELD              =
*             EXTENSION1              =
              return                  = return
*             PAYMENTCARD             =
*             CONTRACTITEM            =
*             EXTENSION2              =
*             REALESTATE              =
*             ACCOUNTWT               =
 .&amp;lt;&amp;lt;&amp;lt;&amp;lt;breakpoint-here for debugging
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 May 2017 16:47:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478224#M15661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-05-25T16:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478225#M15662</link>
      <description>&lt;P&gt;Why are you doing APPEND? DOCUMENTHEADER is a structure, not a table. You don't need the WA_... part at all there.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 18:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478225#M15662</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-05-25T18:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478226#M15663</link>
      <description>&lt;P&gt;Hi Karim,&lt;/P&gt;&lt;P&gt;Please review your code and below link give you some idea.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2013/07/23/accounttax-in-bapiaccdocumentpost"&gt;https://blogs.sap.com/2013/07/23/accounttax-in-bapiaccdocumentpost&lt;/A&gt;/&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 15:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478226#M15663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-05-26T15:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478227#M15664</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please enter dates in internal format, e.g. '20170525'.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 16:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478227#M15664</guid>
      <dc:creator>gabriel_pill-kahan</dc:creator>
      <dc:date>2017-05-26T16:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478228#M15665</link>
      <description>&lt;P&gt;You are not passing accountgl&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 17:40:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478228#M15665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-05-26T17:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478229#M15666</link>
      <description>&lt;P&gt;wa_DOCUMENTHEADER-PSTNG_DATE ='250517'.&lt;/P&gt;&lt;P&gt;Maybe this is the issue place because of the wrong  key in.&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2017 01:03:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478229#M15666</guid>
      <dc:creator>former_member192023</dc:creator>
      <dc:date>2017-05-27T01:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478230#M15667</link>
      <description>&lt;UL&gt;&lt;LI&gt;Agree, here Abap will consider you pass the (ugly, obsolete) header line of the internal table to the BAPI (and due to your code it's an initial record) &lt;/LI&gt;&lt;LI&gt;You also forgot to pass the accountgl table. &lt;/LI&gt;&lt;LI&gt;BAPI mostly use internal format for data (e.g. date) when SE37/BAPI test use dynpro conversion from ext to int format.&lt;/LI&gt;&lt;LI&gt;etc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Reread your code more carefully.&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 06:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/478230#M15667</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-05-29T06:57:40Z</dc:date>
    </item>
  </channel>
</rss>

