Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ACC_DOCUMENT_POST getting error while giving tax details

Former Member
0 Kudos

Hi guys,

I am using BAPI_ACC_DOCUMENT_POST for FI posting.Here I want to have Tax VAT details to be posted.

After filling G/L details into lt_gldata I filled

lt_accounttax-itemno_acc,

lt_accounttax-gl_account,

lt_accounttax-tax_code,

'MWAS' TO lt_accounttax-cond_key,

'MWS' TO lt_accounttax-acct_key.

lt_curr-itemno_acc,

lt_curr-currency,

lt_curr-exch_rate,

lt_curr-amt_doccur,

lt_curr-amt_base

when I run the BAPI I am getting an error 'Foreign currency translation not supported for tax calculation'

please help to find why the above error is coming...?

9 REPLIES 9

Former Member
0 Kudos

Hi,

Contact FO, some data or config problem.

Regards,

Prashant.

0 Kudos

When I tried manually Its posting fine. The currency is of the currency of company code itself.

0 Kudos

Can you try using CURR_TYPE = '10' in BAPIACCR09. It will be good idea to put a break point in Include LFACIF1N and check.

Edited by: Romit Kewalramani on Mar 26, 2009 8:12 AM

0 Kudos

The currency type is defaulted to 00 document currency. When I give 10 for tax currency , Its updating only in Local currency. its not updating the values into document currency.

It was posting good. When i included the tax details it showed the error.

Whats all field should be filled for entering Tax details ?

0 Kudos

Are the document currency and Local currency different? If yes, I guess the conversion might not be supported by BAPI.

0 Kudos

No Both the local currency & Document currency are same. But when we use Currency type as 10 (Company code currency) Its posting. But for all the line items the values are updated only on Local currency filed(DMBTR), the document currency filed value is blank(WRBTR).

0 Kudos

Can you send me your code?

0 Kudos

*Posting Key indicates gl account

CLEAR st_gldata.

MOVE: st_lineitem TO st_gldata-itemno_acc,

gt_input-hkont TO st_gldata-gl_account,

gt_input-sgtxt TO st_gldata-item_text,

gt_input-zuonr TO st_gldata-alloc_nmbr,

gt_input-projk TO st_gldata-wbs_element,

gt_input-kostl TO st_gldata-costcenter,

gt_input-prctr TO st_gldata-profit_ctr,

gt_input-xref1 TO st_gldata-ref_key_1,

gt_input-xref2 TO st_gldata-ref_key_2,

gt_input-mwskz TO st_gldata-tax_code,

st_bukrs TO st_gldata-comp_code.

APPEND st_gldata.

*Move data to currency table

CLEAR st_curr.

MOVE: st_lineitem TO st_curr-itemno_acc,

st_waers TO st_curr-currency,

st_kursf TO st_curr-exch_rate,

gt_input-wrbtr TO st_curr-amt_doccur,

gt_input-fwbas TO st_curr-amt_base,

'00' TO st_curr-curr_type.

IF gt_input-hkont EQ tax_acct.

CLEAR : st_curr-amt_base.

MOVE: gt_input-fwba2 TO st_curr-amt_base,

gt_input-fwste TO st_curr-tax_amt.

*Move data to Tax table

CLEAR st_accounttax .

MOVE: st_lineitem TO st_accounttax-itemno_acc,

gt_input-hkont TO st_accounttax-gl_account,

gt_input-mwsk2 TO st_accounttax-tax_code,

'MWAS' TO st_accounttax-cond_key,

'MWS' TO st_accounttax-acct_key.

st_accounttax-itemno_tax = st_lineitem - 1.

APPEND st_accounttax .

ENDIF.

APPEND st_curr.

Former Member
0 Kudos

Can you check what currency you are using for posting the document. If it different from Company code currency? Check setting the value for CURTP in BAPIACCR09 accordingly.