I have created the following download request in tcode R3AR2 to try to download a BOM from ERP:
When I perform request download, I meet with the following error message:
I go to tcode R3AC1 to check the parent tab of adapter object BOM_ERP. To my surprise, there is no parent information maintained.
Compare the parent setting for OBJCL:
So where are the parent information Materials, Equipment and Function locations mentioned in the error message coming from?
I debug the request download program itself to know the answer.
Execute function module SMOF0_READ_SMOFSUBINT with the following parameters:
There are eight check function modules returned as the error message is raised within function module CRM_BOM_ERP_CHECK_FOR_FATAL:
Then in sub routine check_parent, I found out that the parent of BOM_ERP is set dynamically according to the table name maintained in download request. In my case, it is material.
The parent check will only pass if the status of parent object is D ( finished ).
In my case, the download status of MATERIAL is R ( running )
This status could be found in tcode R3AM1:
After I fix the error of MATERIAL itself and repeat request download of BOM_ERP, the error message disappears.
(1) In ERP, create one material 1468 “JVM”:
And another material 1469 “JDK 1.8”:
(2) Create BOM via tcode CS01 based on material 1468 with the following settings:
Add 1469 as line item:
Once saved, there is one entry generated in table MAST:
(3) Create one download request in CRM via tcode R3AR2:
Specify MATNR to the material id of BOM header:
After I perform request download via this request, in WebUI I found that the assignment block “Components” is still empty.
The reason is the dependent material 1469 is not downloaded to CRM yet.
(4) Then I first download material 1469 to CRM, and then I perform request download again via the request created in step 3.
After that in tcode SMW01 I can see necessary data for BOM structure, the relationship STRSET, is successfully downloaded.
Now go back to WebUI, I can see the expected component structure as displayed below.
However, in another set of CRM and ERP system, once the same operation has been done, we will not get BOM downloaded as relationship STRSET, but BOMITM instead. Let’s name the system so far discussed above where STRSET is generated as ERP system A and CRM system A, and the system mentioned in discussion below as ERP system B and CRM system B, where BOMITM is generated.
This is BOM created in ERP system B:
When this BOM is downloaded to CRM system B, the data is stored in relationship BOMITM instead:
The reason which leads to this different behavior is the different settings defined in table CRMSUBTAB in two ERP system to control what kinds of data for BOM should be extracted and sent to CRM:
Here via comparison we can find out that the extraction logic for adapter object BOM_ERP are different in two ERP system. In CRM middleware inbound process program LCOM_PRODUCT_IL_R3_ADAPTERF03, there is a IF-ELSE branch:
For CRM system A, in ERP system A,function module CRS_BOM_EXTRACT will fill data to MARA table so in CRM, the inbound processing will go into first IF branch.
And for CRM system B, the function module CRS_BOM_ERP_EXTRACT is executed in ERP system B, where MARA table is not filled, so finally in CRM system B, the inbound process goes to ESLE branch to generate data into BOMITM instead.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":