Note 2083799 和 626235 对 BAPI_ACC_DOCUMENT_POST
涉及税收科目的处理要点有详细讲解,建议仔细阅读。
与 FB01 手工过账不同,BAPI 不包括 “Automatically Calculate Tax” 功能,税的科目和金额要提前确定好,放在 BAPI 的 ACCOUNTTAX
参数中。原文:
Unlike the traditional FI posting transactions (such as FB01), the Accounting BAPIs do not include the function "Automatically Calculate Tax". The source application must therefore already determine the tax in advance. This tax is then transferred in the parameter ACCOUNTTAX to the BAPI.
对 ACCOUNTTAX
表参数的每一行,要与 ACCOUNTGL
参数进行关联。
在简单的情况下,只需要给定税码 (tax code)和税收科目 (tax account),在复杂的情况下,还需要指定条件码 (condition key),为避免涉及税收科目的会计凭证过账副作用,建议对每一个税收科目行项目都指定这些信息。原文:
In the case of simple tax transactions, all you have to do very often is transfer the tax code and the tax account. However, in the case of more complex transactions (such as multi-level tax codes or for postings with item-by-item tax calculation and tax jurisdiction codes), you also have to transfer the account and condition key. To avoid side effects during tax posting, we therefore recommend that you always transfer this information for every tax line item.
note 626535 给出的示例:
要生成的会计凭证:
Expense account 108 USD (debit)
To vendor -100 USD (credit)
To input tax -5 USD (Credit)
To input tax -2 USD (Credit)
To input tax -1 USD (Credit)
代码:
AccountGL-Itemno_acc = '0000000002'.
AccountGL-GL_Account = '0000400000'.
AccountGL-Tax_Code = 'U1'.
AccountGL-Taxjurcode = 'PA0011000'.
CurrencyAmount-Itemno_acc = '0000000002'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '108'.
*Input tax
AccountTax-Itemno_Acc = '0000000003'.
AccountTax-Tax_Code = 'U1'.
AccountTax-Acct_Key = 'MW1'.
AccountTax-Cond_Key = 'JP1U'.
AccountTax-Taxjurcode = 'PA0000000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '1'.
CurrencyAmount-Itemno_acc = '0000000003'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '5-'.
CurrencyAmount-Amt_Base = '100-'.
AccountTax-Itemno_Acc = '0000000004'.
AccountTax-Tax_Code = 'U1'.
AccountTax-Acct_Key = 'MW2'.
AccountTax-Cond_Key = 'JP2U'.
AccountTax-Taxjurcode = 'PA0010000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '2'.
CurrencyAmount-Itemno_acc = '0000000004'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '2-'.
CurrencyAmount-Amt_Base = '100-'.
AccountTax-Itemno_Acc = '0000000005'.
AccountTax-Tax_Code = 'U1'.
AccountTax-Acct_Key = 'MW3'.
AccountTax-Cond_Key = 'JP3U'.
AccountTax-Taxjurcode = 'PA0011000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '3'.
CurrencyAmount-Itemno_acc = '0000000005'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '1-'.
CurrencyAmount-Amt_Base = '100-'.
*--------------------------------------------------
*NVV
AccountTax-Itemno_Acc = '0000000006'.
AccountTax-Tax_Code = 'U1'.
AccountTax-Acct_Key = 'NVV'.
AccountTax-Cond_Key = 'JP1I'.
AccountTax-Taxjurcode = 'PA0000000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '1'.
AccountTax-Stat_Con = 'X'.
CurrencyAmount-Itemno_acc = '0000000006'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '5'.
CurrencyAmount-Amt_Base = '100'.
AccountTax-Itemno_Acc = '0000000007'.
AccountTax-Tax_Code = 'U1'.
AccountTax-Acct_Key = 'NVV'.
AccountTax-Cond_Key = 'JP2I'.
AccountTax-Taxjurcode = 'PA0010000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '2'.
AccountTax-Stat_Con = 'X'.
CurrencyAmount-Itemno_acc = '0000000007'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '2'.
CurrencyAmount-Amt_Base = '100'.
AccountTax-Itemno_Acc = '0000000008'.
AccountTax-Tax_Code = 'U1'.OBC
AccountTax-Acct_Key = 'NVV'.
AccountTax-Cond_Key = 'JP3I'.
AccountTax-Taxjurcode = 'PA0011000'.
accounttax-taxjurcode_deep = 'PA0011000'.
accounttax-taxjurcode_level = '3'.
AccountTax-Stat_Con = 'X'.
CurrencyAmount-Itemno_acc = '0000000008'.
CurrencyAmount-Curr_Type = '00'.
CurrencyAmount-Currency = 'USD'.
CurrencyAmount-Amt_Doccur = '1'.
CurrencyAmount-Amt_Base = '100'.
参考
- SAP note: 2083799
- SAP note: 626235
- Tax postings with accounting BAPI
网友评论