<?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  Tax code must be entered in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508954#M1654695</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;Thanks for yuor helpful answers The problem was tax code in some accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Mireya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2012 19:35:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-17T19:35:44Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST  Tax code must be entered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508950#M1654691</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;I am using bapi  BAPI_ACC_DOCUMENT_POST   to post in FB01 but  i am getting a error "Tax code must be entered". The amounts are  equals in  S/H but I don´t  know what happen. Anybody  have a suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Mireya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 05:40:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508950#M1654691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T05:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  Tax code must be entered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508951#M1654692</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;Please check wat you are filling in ACCOUNTTAX parameter &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside ACCOUNTTAX check&lt;/P&gt;&lt;P&gt; TAX_CODE = TAX CODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check this thread for filling ACCOUNTTAX &lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="thread" id="48837"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 05:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508951#M1654692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T05:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  Tax code must be entered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508952#M1654693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Here is a sample code how to use this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: it_acc_gl LIKE bapiacgl09 OCCURS 0 WITH HEADER LINE,
it_acc_ap LIKE bapiacap09 OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
it_curr_amt LIKE bapiaccr09 OCCURS 0 WITH HEADER LINE,
it_doc_header LIKE bapiache09 OCCURS 0 WITH HEADER LINE,
it_acc_tax LIKE bapiactx09 OCCURS 0 WITH HEADER LINE,
obj_type LIKE bapiache09-obj_type,
obj_key LIKE bapiache09-obj_key,
obj_sys LIKE bapiache09-obj_sys,
pstng_date LIKE it_doc_header-pstng_date,
doc_date LIKE it_doc_header-doc_date,
loop_cnt TYPE i VALUE 0,
gv_vendor(10) TYPE c,
gv_gl_acc(10) TYPE c.
 
LOOP AT bdc_source.
* First line of table is heading so don't do anything
IF bdc_layout IS INITIAL.
MOVE bdc_source TO bdc_layout.
TRANSLATE bdc_layout TO UPPER CASE.
CONTINUE.
ENDIF.
bdc_out = bdc_source.
CLEAR: obj_type, obj_sys, obj_key, pstng_date, doc_date, gv_vendor, gv_gl_acc.
* Setup the dates in correct format
CONCATENATE bdc_source-col_c+6(4) bdc_source-col_c(2) bdc_source-col_c+3(2) INTO pstng_date.
CONCATENATE bdc_source-col_b+6(4) bdc_source-col_b(2) bdc_source-col_b+3(2) INTO doc_date.
* Padding zeros, very important otherwise bunch of stuff is missing
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = bdc_source-col_e
IMPORTING
output = gv_vendor.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = bdc_source-col_j
IMPORTING
output = gv_gl_acc.
* Header
REFRESH it_doc_header.
it_doc_header-bus_act = 'RFBU'.
it_doc_header-username = sy-uname.
it_doc_header-header_txt = bdc_source-col_h. " Invoice Text
it_doc_header-comp_code = bdc_source-col_a. " Company Code
it_doc_header-doc_date = doc_date. " Invoice Date
it_doc_header-pstng_date = pstng_date. " Posting Date
it_doc_header-doc_type = 'KR'. " Return Order...?
it_doc_header-ref_doc_no = bdc_source-col_d. " Invoice Number
APPEND it_doc_header.
* GL Account
REFRESH it_acc_gl.
it_acc_gl-itemno_acc = '1'.
it_acc_gl-gl_account = gv_gl_acc. " GL Account
it_acc_gl-item_text = bdc_source-col_o. " Line Item Text
it_acc_gl-doc_type = 'KR'. " Return Order...?
it_acc_gl-comp_code = bdc_source-col_a. " Company Code
it_acc_gl-pstng_date = pstng_date. " Posting Date
it_acc_gl-vendor_no = gv_vendor. " Vendor Number
it_acc_gl-costcenter = bdc_source-col_k. " Cost Center
it_acc_gl-wbs_element = bdc_source-col_q. " WBS Element
"it_acc_gl-tax_code = bdc_source-col_m. " Tax Code
it_acc_gl-network = bdc_source-col_p. " Internal Order
conv_s_amt = bdc_source-col_f. " Invoice Amount
REPLACE ALL OCCURRENCES OF ',' IN conv_s_amt WITH ''.
IF conv_s_amt &amp;lt; 0.
it_acc_gl-de_cre_ind = 'H'. " H-Credit
conv_s_amt = - conv_s_amt.
ELSE.
it_acc_gl-de_cre_ind = 'S'. " S-Debit
ENDIF.
CONDENSE conv_s_amt.
APPEND it_acc_gl.
* AP Account
REFRESH it_acc_ap.
it_acc_ap-itemno_acc = '2'. " Invoice Number
it_acc_ap-vendor_no = gv_vendor. " Vendor Number
it_acc_ap-comp_code = bdc_source-col_a. " Company Code
it_acc_ap-item_text = bdc_source-col_o. " Line Item Text
APPEND it_acc_ap.
* Currancy
REFRESH it_curr_amt.
it_curr_amt-itemno_acc = '1'. " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = bdc_source-col_g. " Currancy
it_curr_amt-amt_doccur = conv_s_amt. " Line Item Amount
APPEND it_curr_amt.
it_curr_amt-itemno_acc = '2'. " Invoice Number
it_curr_amt-curr_type = '00'.
it_curr_amt-currency = bdc_source-col_g. " Currancy
it_curr_amt-amt_doccur = conv_s_amt * -1. " Line Item Amount
APPEND it_curr_amt.
REFRESH it_return.
* Do the post to GL Account and AP
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = it_doc_header
IMPORTING
obj_type = obj_type
obj_key = obj_key
obj_sys = obj_sys
TABLES
accountgl = it_acc_gl
currencyamount = it_curr_amt
accountpayable = it_acc_ap
return = it_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
* Check for any errors
loop_cnt = 0.
LOOP AT it_return.
IF it_return-type = 'E'.
bdc_out-code = 'E'.
error_count = error_count + 1.
ELSE.
bdc_out-code = 'S'.
ENDIF.
loop_cnt = loop_cnt + 1.
IF loop_cnt = 1.
bdc_out-mesg1 = it_return-message.
ELSE.
IF loop_cnt = 2.
bdc_out-mesg2 = it_return-message.
ENDIF.
ENDIF.
ENDLOOP.
APPEND bdc_out.
cur_line = cur_line + 1.
ENDLOOP.  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 07:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508952#M1654693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T07:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  Tax code must be entered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508953#M1654694</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;While posting document, Tax Code is mandatory field. So, because of that it is giving error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 08:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508953#M1654694</guid>
      <dc:creator>Harsh_Bansal</dc:creator>
      <dc:date>2012-02-17T08:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  Tax code must be entered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508954#M1654695</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;Thanks for yuor helpful answers The problem was tax code in some accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Mireya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 19:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-tax-code-must-be-entered/m-p/8508954#M1654695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T19:35:44Z</dc:date>
    </item>
  </channel>
</rss>

