Skip to Content
0
Jul 10, 2012 at 04:38 PM

Issue Calculating withholding tax with BAPI

241 Views

Hi all,

I'm using BAPI_ACC_DOCUMENT_POST, and it works fine, but now I want to calculate the withholding tax

and I can't find the right way to fill accountwt table in order to accomplish this.

I have this data in tables:

i_accountax:


ITEMNO_ACC GL_ACCOUNT COND_KEY ACCT_KEY TAX_CODE DIRECT_TAX 11 230005 MWAS MWS A2 X

i_accountwt:

ITEMNO_ACC WT_TYPE WT_CODE BAS_AMT_TC BAS_AMT_IND 12 M6 2 71880.0000- X

i_curren:


ITEMNO_ACC CURRENCY
AMT_DOCUR
AMT_BASE
TAX_AMT
30 MXN 41740.0000- 6678.40000-
20 MXN 30140.0000- 4822.40000-
10 MXN 83380.8000 71880.0000 11500.8000 11 MXN 11500.8000- 71880.0000
12 MXN 11500.8000 71880.0000

But when I execute the BAPI:


CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = w_header
IMPORTING
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
TABLES
accountgl = i_accountgl
accountreceivable = i_accountre
accounttax = i_accountax
currencyamount = i_curren
return = i_return
accountwt = i_accountwt.

I'm getting no lines for withholding tax in the document generated.

Any suggestion how to solve this issue?

I will appreciate any guidance.

Attachments

doc.jpg (24.2 kB)