03-26-2009 6:47 AM
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...?
03-26-2009 6:59 AM
03-26-2009 7:07 AM
When I tried manually Its posting fine. The currency is of the currency of company code itself.
03-26-2009 7:11 AM
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
03-26-2009 8:31 AM
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 ?
03-26-2009 11:24 AM
Are the document currency and Local currency different? If yes, I guess the conversion might not be supported by BAPI.
03-26-2009 11:49 AM
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).
03-26-2009 11:56 AM
03-27-2009 4:54 AM
*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.
03-26-2009 7:03 AM
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.