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 Withholding Tax

mrio_espinheira
Participant
0 Kudos

Hi!

I'm using BAPI_ACC_DOCUMENT_POST to post Accounting Documents and it works fine. I then tried do pass Withholding Tax information through the Table parameter ACCOUNTWT like this:

ITEMNO_ACC = 0000000006

WT_TYPE = 20

WT_CODE = 20

BAS_AMT_LC = 0,8700

BAS_AMT_TC = 0,0000

BAS_AMT_L2 = 0,0000

BAS_AMT_L3 = 0,0000

MAN_AMT_LC = 0,8700

MAN_AMT_TC = 0,0000

MAN_AMT_L2 = 0,0000

MAN_AMT_L3 = 0,0000

AWH_AMT_LC = 0,0000

AWH_AMT_TC = 0,0000

AWH_AMT_L2 = 0,0000

AWH_AMT_L3 = 0,0000

BAS_AMT_IND = X

MAN_AMT_IND = X

It doesn't work. When I click on the Withholding Tax button of the item, nothing happens.

Can anyone help me with this?

Best regards,

Mário Espinheira

1 ACCEPTED SOLUTION

mrio_espinheira
Participant
0 Kudos

My problem is already resolved but i'm not using the ACCOUNTWT table parameter anymore. Instead I implemented the RWBAPI01 BTE for FI-FI (the FM SAMPLE_INTERFACE_RWBAPI01 has an example of the needed interface).

6 REPLIES 6

mrio_espinheira
Participant
0 Kudos

My problem is already resolved but i'm not using the ACCOUNTWT table parameter anymore. Instead I implemented the RWBAPI01 BTE for FI-FI (the FM SAMPLE_INTERFACE_RWBAPI01 has an example of the needed interface).

0 Kudos

Hi ,

We are having the same issue, I have implemented the BTE and as well as the interface where i am able to populate the

with holding tax information as below.

The documents are getting posted but when we are looking the with holding tax information only with holding tax types are getting displayed, No tax code and corresponding amounts are getting populated.

Any help will be appreciated.

Please see my code :

Population of the extension strucutre :

loop at wk_lfbw where lifnr = it_file-lifnr and bukrs = it_file-bukrs.

  • Populate with holding tax code

it_extension1-field1 = wa_line-itemno_acc+4(6). " Line Item number

it_extension1-field2 = wk_lfbw-WITHT. " With Holding Tax type

it_extension1-field3 = wk_lfbw-WT_WITHCD. " With Holding tax code

append it_extension1.

clear it_extension1.

endloop.

Interface code

loop at EXTENSION .

IT_ACCWT-WT_KEY = EXTENSION-field1. " Passing key as line item number

IT_ACCWT-WITHT = EXTENSION-field2. " tax type

IT_ACCWT-WT_WITHCD = EXTENSION-field3. " Tax code

IT_ACCWT-WT_QSSHH = '100.00'.

append IT_ACCWT.

clear IT_ACCWT.

eNdloop.

Thanks ,

Venkat Bomma

ravi_rajput
Participant
0 Kudos

Try linking this filed wt_key in both the tables  ie. it_accit-wt_key should be synonymous with it_accit_wt-wt_key.

If linking is properly done. Witholding tax would get calculated.

former_member209920
Active Participant
0 Kudos

instead of using BTE, you just need to add tax line in currency line items of BAPI parameters with withholding tax lines.

0 Kudos

In my case, just using the BAPI table parameters didn't work. That's why I had to use the BTE mentioned before.

Regards,

Mário Espinheira

0 Kudos

Can you share the solution??