cancel
Showing results for 
Search instead for 
Did you mean: 

BAdI BBP_CATALOG_TRANSFER - Material Group Mapping issue

Former Member
0 Kudos

Hi all,

Currently, we have to map Vendor Product Category to SAP Material Group using a customized table, as the shopping cart items are transferred via OCI (Open Catalog Interface) from External Catalog. I realize mapping can be done using BAdI BBP_CATALOG_TRANSFER in SRM system.

Before any mapping logic is placed in the above BAdI, I notice Application Log (Tcode SLG1) returns me an error message after shopping cart items transferred via OCI:

000001 Unable to find appropriate Category Id 98218237

Hence, I have placed Product Category mapping logic in the above BAdI using CATALOG_CONTENT-MATGROUP (where Vendor Category ID 98218237 will be mapped to SAP Material Group 001803). However, once I attain Material Group 001803 from mapping z-table, I am not sure which internal table I need to update , should it be CATALOG_CONTENT, ENRICHED_ITEM_DATA, or ET_SC_ITEM_DATA?

I notice that ET_SC_ITEM_DATA having empty entry, while CATALOG_CONTENT and ENRICHED_ITEM_DATA contains the shopping cart items from External Catalog. I have tried to update ENRICHED_ITEM_DATA but I still get the error message from Appl. Log (SLG1).

000001 Unable to find appropriate Category Id 98218237

What is the different between ENRICHED_ITEM_DATA and ET_SC_ITEM_DATA, while EV_SC_STRUCTURES_USED = 'X', when I debug the BAdI? And which table I need to update after I attain the right SAP Material Group from Mapping z-table, while ET_SC_ITEM_DATA is empty?

Kindly advise.

Many thanks,

Patrick

P/S: I'm on SRM 5.0

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

If you use EV_SC_STRUCTURES_USED that means you use all the ET* tables in the badi. Instead of the old ENRICH structure.

If the ET_SC_ITEM_DATA is empty, look at the ERROR structure and see if there is an error there. The OCI may not be working correctly. Most commonly the unit of measure is not correct. The item should be in the ET_SC_ITEM_DATA table.

Regards,

Robin

Former Member
0 Kudos

Hi Robin,

Thanks for your reply.

Yes, I have set EV_SC_STRUCTURES_USED = 'X' as to use structure ET_SC*.

Yeah, I found that I had an error message from table ET_SC_MESSAGES due to Vendor Catalog's Product Category mismatch with SAP Material Group. Based on the documentation from BBP_CATALOG_TRANSFER, if there is any error from OCI, the item causing the error is not transferred to ET_SC_ITEM_DATA. Actually, the reason to use BAdI BBP_CATALOG_TRANSFER is to map valid Material Group from bespoke z-table.

What I can do now is to add the item (that caused error) from CATALOG_CONTENT to table ET_SC_ITEM_DATA, and the shopping cart is showing my details, but with the following messages:

- Jurisdiction code could not be determined

- No G/L account was entered. Enter a G/L account

- Error in account assignment for item 1

- Not possible to calculate tax

- You are not allowed to enter a tax jurisdiction code for country US

Please can you shed some light on the above messages return in shopping cart?

I'm not sure whether BAdI BBP_TAX_MAP_BADI should solve the above mentioned...

Many thanks,

Patrick

Former Member
0 Kudos

1. Jurisdiction code could not be determined

This is tax related

2. No G/L account was entered. Enter a G/L account

3. Error in account assignment for item 1

These aren't important, just enter valid details in the shopping cart in the accounting tab

4. Not possible to calculate tax

5. You are not allowed to enter a tax jurisdiction code for country US

Again tax related.

It looks like there is some tax related customising missing. So I don't think you have any problem in the shopping cart, only some customising left to do.

Regards,

Robin

Former Member
0 Kudos

Hi Robin,

Yeah, you are right, now it just left for customizing.

Thanks for your help.

Cheers,

Patrick

Former Member
0 Kudos

HI,

I am not sure how could you solve your concern, I have been to similar situations..and here is my opinion.

The errors what you are getting for:

Error: Jurisdiction code could not be determined

Reason: You are using a Location or Ship-to-address in such a way that there are two Jurisdiction Codes in your backend system (are you using Third Party Tax engine such as Taxware?). In such case, Shopping Cart gets confused to select from two codes and throws out error message...or simply your backend system has not maintained any Tax Jurisdiction Code at all!!!

Error: Not possible to calculate tax

Reason: Because Shopping Cart could not get any correct Jurisdiction Code, it can not calculate tax!

How to solve above two errors? Solve the 1st one, second one is automatically solved!

You can implement BADI BBP_DET_TAXCODE_BADI to find atleast one and only one Jurisdiction Code for a line item of the Shopping Cart (or PO). (Tip: You can call an RFC to backend to call standard FM to get the Tax Jurisdiction Codes, if there are more than one, select the first one and return, or if there are none..use any default (which is okay to your customer) and give it to the structure.

Let me share my understanding on the three structures you found in the BBP_CATALOG_TRANSFER BAdI.

CATALOG_CONTENT: Contains the OCI fields flowing from the catalog. They are the original items coming from Catalog.

ENRICHED_ITEM_DATA: Contains the Catalog_Content structure as sub-structure. This is used to modify the content as a broker.

ET_SC_ITEM_DATA: Contains the SC items that is created because of Catalog Transfer. If there is any application error such as mismatch of Unit of measurement, ISO Codes, Product Category etc. this structure will not be filled in completely..Only perfect items (without any mapping error) will get into this structure.

If you are finding that ET_SC_ITEM_DATA is empty, then check BBP_OCI object in SLG1 transaction, that will show you errors while catalog transfer and the same can be found during debugging of the BAdI.

I think this can give some idea on how to use them..

Thanks for reading...

Ashok Kawa

Former Member
0 Kudos

Hi Ashok,

Thanks for your reply.

Now, in SRM Shopping Cart, I have another issue that when screen returns to Shopping Cart from External Vendor Catalog, and when I click on Item Details (click on Magnifier icon in 'Action' column), it brings me to Item Details page, where I can see Basic Data, Cost Assignment, Documents and Attachments, Ship-To Address/Performance Location, and Sources of Supply / Service Agents.

I notice when I click on Sources of Supply / Service Agents, there are messages return:

No vendor assigned

No vendors/contracts/info records exist

I have done the config for the vendor in the following path in SRM, for my External Vendor Catalog:

SPRO --> Supplier Relationship Management --> SRM Server --> Master Data --> Define External Web Services

where, I assigned Vendor Number 90000987 as BP Number in Source of Supply Assinged to Product Catalog.

I am wondering why Vendor No. 90000987 is missing during the transfer to shopping cart. Due to this, I have checked BADI BBP_CATALOG_TRANSFER, method ENRICH_ITEM_DATA, table ET_SC_PARTNER, and I found entry for Vendor Number 90000987 is in the table with Partner Function '00000019'. I bet there is nothing I can do in BADI BBP_CATALOG_TRANSFER.

Another BADI BBP_DOC_CHANGE_BADI, which triggered after BADI BBP_CATALOG_TRANSFER, and I found that table IT_PARTNER of method BBP_SC_CHANGE does not contain any entry for Vendor Number 90000987 with Partner Function '00000019'. I have tried to place a breakpoint there and append entry for Vendor Number 90000987 manually in debugger, surprisingly, the Vendor is showing now.

Do you have any idea of which area (config or etc) I have missed out to cause Vendor Number 90000987 being excluded in tale IT_PARTNER of method BBP_SC_CHANGE in BADI BBP_DOC_CHANGE_BADI?

Many thanks for your help.

Regards,

Patrick

P/S: I will create another thread for this issue.

Former Member
0 Kudos

Hi all,

I have resolved Vendor assignment issue in Detail page by referring back to the GUID Partner (using Partner Function '19').

Hope this help to whom encounter this issue.

Regards,

Patrick