I have assigned relationship PRDLOCS to product category MAT_HAWA in CRM:

SAP CRM Location Assignment的实现原理

And I create a product based on category MAT_HAWA. To my surprise, I could not see Location assignment block as expected.
I use the following test code in my utility class to list what exactly relationships assigned to my product:

SAP CRM Location Assignment的实现原理

In the list result, PRDLOC is NOT there ( only PRDLOI ).

SAP CRM Location Assignment的实现原理

So I begin to debug function module COM_PRCAT_IL_REL_GET_RELTYPES:

SAP CRM Location Assignment的实现原理

I could see PRDLOC is selected successfully from database table, so it must be filtered out somewhere else.

SAP CRM Location Assignment的实现原理

Soon I found there is a special check routine for PRDLOC:

SAP CRM Location Assignment的实现原理
SAP CRM Location Assignment的实现原理

It will call its dedicated check function module:

SAP CRM Location Assignment的实现原理

This check function module will check whether MARC and MARC_KEY is registered for adapter object MATERIAL in tcode R3AC1.
After I add these two missing entries,

SAP CRM Location Assignment的实现原理

The expected relationship PRDLOC is now available for my product.

SAP CRM Location Assignment的实现原理

And finally I could see the Location assignment block in Overview page.

SAP CRM Location Assignment的实现原理

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP CRM Location Assignment的实现原理

相关文章: