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: 

Problem with BAPI_ACC_DOCUMENT_POST for f-47 ( WITHHOLDING TAX ).

0 Kudos
2,392

Hi All,

My requirement is to post vendor advance payment request (F-47) using BAPI_ACC_DOCUMENT_POST. Anyways i did BADI and finally achieved to post without any error using this BAPI. But i am facing a problem while posting along withholding tax.It is throwing an error 'Accouting interface:Balance in transaction currency' and another error is 'Withholding tax amount exceeds total bank line item amounts'.Please help me to sort out this issue.

9 REPLIES 9

TMSingh_SAP
Participant
0 Kudos
422

Hi Kishore,

The error itself says that there is issue with +/- and so the balance is not done correctly.You have to change the calculation logic

Pls check if you are using FM - CALCULATE_TAX_FROM_NET_AMOUNT - For Tax

If total amt is 100 and tax is 10 % then then ur line item will be 90 and tax line will be 10

CURRENCYAMOUNT and ACCOUNTTAX ( using the above FM to get T_MWDAT).. should be correctly populated in BAPI

For withholding tax - populate ACCOUNTWT in BAPI

Thanks,

Mohan

0 Kudos
422

Hi Mohan,

My sincere thanks for your reply.
Actually i am working on F-47(Vendor Advance Payment Request) . So after posting we will get only single line item i.e vendor line item , there will be no GL line items in F-47.So there is no scope for amount unbalance. I know well that BAPI_ACC_DOCUMENT_POST will allow to post only if the summation of vendor(my case) and GL is zero then only will post. To avoid this error i did BADI. Moreover i am not passing any TAX CODES right now.I am just passing withholding tax. In F-47 even when we assign witholding tax against vendor there will be no separate line item for withholding tax, the only line item exists is Vendor line item. We can check withholding tax amount by double click on vendor line item and then clicking on withholding tax button(then pop up will come which holds complete witholding tax details).Here the problem i am facing is when i assign withholding tax details in ACCOUNTWT against vendor line item

then 'Accouting interface:Balance in transaction currency' and another error is 'Withholding tax amount exceeds total bank line item amounts'. error is throwing. Another complicated point to consider in F-47 this witholding tax amount wont deduct from Vendor line item . WHT amount just for reference i mean wht amont will not effect on vendor amount in F-47 but WHT amount will use when doing advance payment.Please help me on this.

Thanks,

Kishore.

0 Kudos
422

The only thing i need is one Vendor line item need to create and when i double click on vendor line item--->withholding tax code. In that pop up the WHT details like WHT code WHT type Wht amount need to display which i maintained in AACUNTWT table in BAPI_ACC_DOCUMENT_POST.

Pradeep_Reddy
Participant
0 Kudos
422

Hi Kishore,

Check the FM FI_WT_ACI_PROCESS_WITH in debugging. Here with holding tax line item has to fill. But unfortunately with holding tax line item is not filling. I did some work around by using enhancement.

Replacing actual awtyp at the end of FM


Regards,

Pradeep

0 Kudos
422

Hi Pradeep,

Thanks for reply.

It is not working .Any other suggestions.

0 Kudos
422

Hi Kishore,

For me it is working and r u filling the with holding tax bapi parameter ?. Check once in the foreground and pass same values to the BAPI after doing the enhancement

lt_accountwt[] = VALUE #( ( wt_type = it_input-wt_type wt_code = it_input-wt_withcd itemno_acc = '0000000002'
bas_amt_ind = 'X' bas_amt_lc = it_input-dmbtr
awh_amt_lc = it_input-dmbtr ) ).

Regards,

Pradeep

0 Kudos
422

Hi All,

Please Help me.Still my issue is not sort out.

former_member184588
Active Participant
0 Kudos
422

Hi, sukeer.rakeshI have the same requirement F-47 (with PO and without) and it just gets more and more confusing.

Is there a good tutorial how to post downpayments via BAPI?

Thanks, Vanessa

former_member184588
Active Participant
422

Did you also check on nic.teunckens great posting here (Point 1):

https://answers.sap.com/questions/669214/down-payment-on-bapi-incominginvoice-create.html

?