欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

使用SAP CRM中间件从ERP下载BOM的一些常见问题 SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

程序员文章站 2022-07-04 09:48:15
...

I have created the following download request in tcode R3AR2 to try to download a BOM from ERP:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

When I perform request download, I meet with the following error message:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

I go to tcode R3AC1 to check the parent tab of adapter object BOM_ERP. To my surprise, there is no parent information maintained.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

Compare the parent setting for OBJCL:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

There are eight check function modules returned as the error message is raised within function module CRM_BOM_ERP_CHECK_FOR_FATAL:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

The parent check will only pass if the status of parent object is D ( finished ).

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

In my case, the download status of MATERIAL is R ( running )

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

This status could be found in tcode R3AM1:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

After I fix the error of MATERIAL itself and repeat request download of BOM_ERP, the error message disappears.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

How to download BOM from ERP to CRM – relationship STRSET or BOMITM?

(1) In ERP, create one material 1468 “JVM”:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

And another material 1469 “JDK 1.8”:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

(2) Create BOM via tcode CS01 based on material 1468 with the following settings:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

Add 1469 as line item:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

Once saved, there is one entry generated in table MAST:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

(3) Create one download request in CRM via tcode R3AR2:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

Specify MATNR to the material id of BOM header:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

After I perform request download via this request, in WebUI I found that the assignment block “Components” is still empty.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

The reason is the dependent material 1469 is not downloaded to CRM yet.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

(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.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

Now go back to WebUI, I can see the expected component structure as displayed below.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

When this BOM is downloaded to CRM system B, the data is stored in relationship BOMITM instead:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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:

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

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.

 

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform 

 

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

使用SAP CRM中间件从ERP下载BOM的一些常见问题
            
    
    
        SAPCloud Application ProgrammingCRMSAP云平台SAP Cloud Platform