cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help on BBP_DET_TAXCODE_BADI

Former Member
0 Kudos

Hi Guru's ,

Need inputs on on BBP_DET_TAXCODE_BADI .

The business requirement is to enable tax code and tax value determination in SRM Purchase Orders. This tax code should be available in the SRM PO for changes and it should also flow down to the SAP Purchase Order copy for further usage on Invoicing.

Tax code determination and tax % (value) determination should happen as today, except that this will be occurring in the SRM system first and will then flow down to the R/3 PO copy.

So , I was trying to chanage the Tax code in the BADI , BBP_DET_TAXCODE_BADI while creating the PO .

I can see in the BADI , EV_TAX_CODE (sales tax code) is taking the correct value .

But after ordering the PO , its changing it to default Tax code , which was there while creatinig the shoping cart .

Any inputs on this will be a really valuable help for me.

Thank you,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Any pointers

Edited by: Vijay P on Dec 22, 2008 9:53 AM

Former Member
0 Kudos

Vijay,

Then please debug this function module : BBP_TAX_CREATE_TABLE, add a break-point in the below line and start debugging. Thats should help.

LOOP AT et_new_tax WHERE p_guid = it_item-guid.

Regards

Kathirvel

Former Member
0 Kudos

Hi Krathivel ,

I was debugging this function module , what I noticed is that when it calls this function module BBP_TAX_CREATE_TABLE its getting correct tax code for the new items correctly , since within this function module only BADI will call . And getting the correct Tax code from the BADI logic.

LOOP AT et_new_tax WHERE p_guid = it_item-guid.

But after this function module BBP_TAX_UPDATE_TAX_SEG will be called. There its maintained tax code in the table it_tax_in .

If I see in this table its showing for the first line item correctly, where as for the rest of the items it's taking from the config.

So finally it's keeping the old tax code only in the table for the rest of the items it_tax_in

Any pointers for this issue will really helpful for me.

Thanks in advance.

Former Member
0 Kudos

See note 1454670

Former Member
0 Kudos

Hi Vijay,

If the BADI is implemented, then it will definitely populate the tax code correctly and the same will be replicated to backend system. Besides this BADI will by pass the configuration as well (please refer the function BBP_TAX_DETERMINE_TAX_CODE).

The only other option for this strange behaviour could be due to BBP_DOC_CHANGE_BADI / BBP_DOC_SAVE_BADI implementations. Please have a look at that as well. There could be some other logic to overwrite the values again.

Regards

Kathirvel

Former Member
0 Kudos

Hi Kathirvel,

Thank you for your reply .

Yeah as you said , we are able get the correct tax code .

But we are facing one issue here .when we are creating shopping cart with multiple line items , Tax code is not populating for all the line items , But its populating correct value for the first line item only.

This has 3 identical items(I added one item first and completed the data for it , then just copied it twice to create 3 items in the cart).

There is only one vendor in this cart (we are giving in the header level custom field ) and this is assigned same vendor to all 3 line items( we mapping this one in BBP_DOC_CHANGE_BADI ) when I see in BBP_PD

But when I see the tax code change - This has occured only for the first line item. The tax code has changed from config what ever i have maintaied to new tax code ( which will be from BBP_DET_TAXCODE_BADI LOGIC)

The other 2 items still showine me , Tax code from config only .

Can anybody give some pointers to reslove this issue.

Thanks in Advance.