composite read API CRM_PRODUCT_SALES_READ_API

165 阅读1分钟

The CRM APIs (for example, CRM_PRODUCT_SALES_READ_API) need to be refactored in such a way that they:
map the incoming GUID to a material number;
call the corresponding S/4 API;
map the S/4 structure to the CRM output structure.

This function only needs product guid as input, and here is an example of the result:

This wiki page introduces how these attributes are read in CRM.

product anchor data from COMM_PRODUCT

In the beginning of this API, COM API COM_PRODUCT_READ_SINGLE is called to retrieve header attribute from comm_product:

PRODUCT_TYPE

from table COMM_PRODUCT

CONFIG

from table COMM_PRODUCT

BATCH_DEDICATED

from table COMM_PRODUCT

See following source code screenshot for detail.

ITEM_CAT_GROUP

this attribute is modeled in set type COMM_PR_MAT , whose storage table: COMM_PRMAT

BASE_UOM

read by FM below, and the base_uom attribute is modeled in set type COMM_PR_UNIT.

USE_IPC

from customizing table COMS_PR_CONFIG:

This table belongs to package COM_PRODUCT_CUST:

Prod_hierarchy

read product hierarchy which is assigned to Sales application
read all product categories assigned to the current product, select the one which belongs to the product hierarchy found in step one, and return as result.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":