Application Development and Automation 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: 
Read only

FB01 BDC POSTING_INTERFACE_DOCUMENT Tax Issue

Former Member
0 Likes
3,468

Hi guys,

I am using the Function Module POSTING_INTERFACE_DOCUMENT to Post a document in FB01.

I have passed the necessary parameters to the FM using the tables Parameter T_FTPOST.

In FB01, Posting is done against Vendor (Posting Key 29M and 39M).

The BDC runs successfully in all the cases expect one case.

When there is a Withholding Tax Code Set for the Vendor (Tcode FK01/FK02), the BDC gets stuck in the line item screen (More Data screen - Reference Key1 field of the first Line item), neither further data is populated nor the next screen is called.

The same code runs fine when the WithHolding Tax Code is not set for the Vendor.

On debugging the FM, I found that an Extra Screen was being called when the Tax code is set and the OKCODE for that is GO

*SAPLFWTD 100 X *

From the above case it seems that some data is missing which needs to be passed to the FM.

Please throw some light on the above issue. Has anyone come across this sort of problem. Which Extra Field needs to be passed?

Awaiting Solutions from Experts...

Thanks & regards,

Sriram

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,649

There is an old OSS [Note 673641 - RFBIBL00: Message 00 344 for screen SAPLFWTD0100 (IV)|https://service.sap.com/sap/support/notes/673641] which may help you. (RFBIBL00 and POSTING_INTERFACE_DOCUMENT have much in common)

Regards

5 REPLIES 5
Read only

Former Member
0 Likes
1,649

Please do not cross posting.Wait for replies.And in between you may read the rules.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,650

There is an old OSS [Note 673641 - RFBIBL00: Message 00 344 for screen SAPLFWTD0100 (IV)|https://service.sap.com/sap/support/notes/673641] which may help you. (RFBIBL00 and POSTING_INTERFACE_DOCUMENT have much in common)

Regards

Read only

0 Likes
1,649

Hi Raymond,

Thanks for you reply. Yes, you got very close to the problem.

I went through the note and also checked the system, the Note 673641 is already implemented in the system. Besides the Note says that it is relevant only for Transactions made through FB01 where the Posting Key is a payment related trasaction. But in my Case I am using Posting Key 29M and 39M which are not payment related.

So as said earlier my doubt is I am not passing the Withholding Tax related data to the FM POSTING_INTERFACE_DOCUMENT. This might lead to suppressing/addition of some screens.

If you have any further clue of what code for Tax needs to be passed to the FM, do let me know.

Thanks & regards,

Sriram

Read only

Former Member
0 Likes
1,649

Better u use the below BAPI "BAPI_ACC_DOCUMENT_POST"

Use the below code u fill the tax line item data for the above BAPI.

*...First Calculate the tax.

CALL FUNCTION 'CALCULATE_TAX_FROM_GROSSAMOUNT'

EXPORTING

i_bukrs = g_bukrs

i_mwskz = wa_filedata-mwskz

  • I_TXJCD = ' '

i_waers = wa_filedata-waers

i_wrbtr = wa_filedata-wrbtr

TABLES

t_mwdat = t_mwdat

.

READ TABLE t_mwdat INTO wa_mwdat INDEX 1.

*...Fill Tax item Internal table.

g_cnt = g_cnt + 1.

wa_bapiactx09-itemno_acc = g_cnt.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wa_mwdat-hkont

IMPORTING

output = wa_mwdat-hkont.

wa_bapiactx09-gl_account = wa_mwdat-hkont.

wa_bapiactx09-tax_code = wa_filedata-mwskz.

wa_bapiactx09-cond_key = wa_mwdat-kschl.

wa_bapiactx09-acct_key = wa_mwdat-ktosl.

wa_bapiactx09-taxjurcode = wa_mwdat-txjcd.

wa_bapiactx09-taxjurcode_deep = wa_mwdat-txjcd_deep.

wa_bapiactx09-taxjurcode_level = wa_mwdat-txjlv.

APPEND wa_bapiactx09 TO t_bapiactx09.

Read only

Former Member
1,649

Hi,

For Withholding Tax Data issue in FM POSTING_INTERFACE_DOCUMENT, add the values as below in internal table FT_POST.

TYPE = P

ITEM NUMBER = ITEM NUMBER value

WITH_ITEM-WITHHT = Withholding Tax Type value

TYPE = P

ITEM NUMBER = ITEM NUMBER value

WITH_ITEM-WT_WITHCD = Withholding Tax Code value

TYPE = P

ITEM NUMBER = ITEM NUMBER value

WITH_DIALG-WT_BASE = Withholding Tax Amount

Even if there are Multiple Withholding Tax Items, Standard SAP is going to take care of it.

The only dependency is the Configuration related to Withholding Tax should be in place.

I have already on this scenario and its working perfectly even for Multiple Withholding Tax Items.

Thanks,

Debashish Nandi