<?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/5589529#M1274288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shital!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this code also provide the possiblity to post from creditor &lt;SPAN __jive_emoticon_name="plus"&gt;&lt;/SPAN&gt; against an asset (-). See my tables/structures above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My report should book against a costcenter, wbs or internal order (ACCOUNTGL ) from a creditor or debitor ( ACCOUNTPAYABLE / Receiver).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that possible ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2009 20:22:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-05T20:22:01Z</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/5589526#M1274285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use BAPI_ACC_DOCUMENT_POST for Asset posting in G/L Account.I need to use the because I want to check the import Data with BAPI_ACC_DOCUMENT_CHECK, coming in via Excel File. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use  the Bapi, but how should i fill the structures/ tables - any code lines ? See my example and my return table ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* DOCUMENTHEADER

BUS_ACT                           RFBU
USERNAME                       &amp;lt;user-name&amp;gt;
HEADER_TXT                     HEADER_TXT
COMP_CODE                     1000
DOC_DATE                        15.04.2009
PSTNG_DATE                    15.04.2009
FISC_YEAR                       2009
FIS_PERIOD                      04
DOC_TYPE                       KN
REF_DOC_NO                   REF_NR

* ACCOUNTGL

ITEMNO_ACC                    0000000002
GL_ACCOUNT                   8800100
ITEM_TEXT                       Asset
ACCT_TYPE                     A
BUS_AREA                      1000
TAX_CODE                       N1
COSTCENTER                 
WBS_ELEMENT              2.023000001
ORDERID                        
ASSET_NO                     40000000
SUB_NUMBER                 0

* ACCOUNTPAYABLE

ITEMNO_ACC                     0000000001
VENDOR_NO                     100004
GL_ACCOUNT                    44000100
ITEM_TEXT                        4441225511
W_TAX_CODE                     **


* CURRENCYAMOUNT

ITEMNO_ACC                     0000000002
CURRENCY_ISO                EUR
AMT_DOCCUR                   1.000,0000-

ITEMNO_ACC                     0000000001
CURRENCY_ISO                EUR
AMT_DOCCUR                   1.000,0000

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return Table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
E RW                 609 Error in document: BKPFF $ FQ1CLNT206
E AAPO             161 Accounting transaction category RFBURFBU000000000000 is not defined.
E AA                  326 Enter a transaction type
E CJ                   021 WBS element &amp;lt;&amp;lt;&amp;lt;PR23000001&amp;gt;&amp;gt;&amp;gt; does not exist
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===&amp;gt; But the WBS ELEMENT exist. Also strange, if I run the bapi again in the se37 the error " WBS element  does not exist" is gone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me !&lt;/P&gt;&lt;P&gt;Thanks a lot!!!!&lt;/P&gt;&lt;P&gt;Benjamin&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 16:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/5589526#M1274285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T16:14:15Z</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/5589527#M1274286</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;Try this sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;&amp;lt; Unformatable code removed &amp;gt;&amp;gt;\&lt;/P&gt;&lt;P&gt;Please post only relevant portions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on May 5, 2009 1:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 16:59:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/5589527#M1274286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T16:59:02Z</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/5589528#M1274287</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;Check this out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report z_test_bapi_gl_ac_doc .
data:
obj_type like bapiache02-obj_type,
obj_key like bapiache02-obj_key,
obj_sys like bapiache02-obj_sys,
documentheader like bapiache08,

accountgl like bapiacgl08
occurs 0 with header line,
currencyamount like bapiaccr08
occurs 0 with header line,
return like bapiret2
occurs 0 with header line,
extension1 like bapiextc
occurs 0 with header line,

t_edidd like edidd occurs 0 with header line,
bapi_retn_info like bapiret2 occurs 0 with header line.
data: error_flag.

documentheader-username = sy-uname.
documentheader-header_txt = 'Test using BAPI'.
documentheader-comp_code = '1000'.
documentheader-doc_date = sy-datum.
documentheader-pstng_date = sy-datum.
documentheader-doc_type = 'SA'.

accountgl-itemno_acc = '1'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.

accountgl-itemno_acc = '2'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.

currencyamount-itemno_acc = '1'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '100.00'.
append currencyamount.

currencyamount-itemno_acc = '2'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '-100.00'.
append currencyamount.

* call BAPI-function in this system *
call function 'BAPI_ACC_GL_POSTING_POST'
exporting
documentheader = documentheader
* importing
* obj_type = obj_type
* obj_key = obj_key
* obj_sys = obj_sys
tables
accountgl = accountgl
currencyamount = currencyamount
return = return
extension1 = extension1
exceptions
others = 1.
if sy-subrc &amp;lt;&amp;gt; 0.
message e999(re) with 'Problem occured'.
else.
loop at return.
if not return is initial.
clear bapi_retn_info.
move-corresponding return to bapi_retn_info.
if return-type = 'A' or return-type = 'E'.
error_flag = 'X'.
endif.
append bapi_retn_info.
endif.
endloop.
if error_flag = 'X'.
message e999(re) with 'Problem occured'.
rollback work.
else.
commit work.
endif.
endif
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got it from [here|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561?cv=expanded], Also going thru BAPI Document always help &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;Shital&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 18:18:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/5589528#M1274287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T18:18:08Z</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/5589529#M1274288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shital!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this code also provide the possiblity to post from creditor &lt;SPAN __jive_emoticon_name="plus"&gt;&lt;/SPAN&gt; against an asset (-). See my tables/structures above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My report should book against a costcenter, wbs or internal order (ACCOUNTGL ) from a creditor or debitor ( ACCOUNTPAYABLE / Receiver).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that possible ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 20:22:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/5589529#M1274288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-05T20:22:01Z</dc:date>
    </item>
  </channel>
</rss>

