使用SAP CRM External Interface進行訂單同步

i042416發表於2020-03-16

We are not going to use CRM Middleware any longer for internal business processes, like creating a follow-up document from a service order. However, we want to still allow customers to use CRM MW for connecting external systems, like a BW system or a legacy system (through the XIF adapter).

So creation of the One Order messaging BDOC must still work, and the data should arrive correctly at the corresponding adapters. In particular, I am interested in any direct SELECT statements on the old One Order database tables on the way from creation of the BDOC to the (BW and XIF) adapters.

We have compiled a list of all SELECT statements, but sometimes it is hard to analyze whether the corresponding piece of code is actually processed in one of the supported scenarios.

It is still unclear in which system/client the activation of CRM Middleware could be tested.

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

Transaction BDFG is exactly that: it provides the possibility to generate the XIF idoc structures based on the bdoc structure.

The interface name can be found in table CRMXIF_BDOCIF.

Outbound Scenario

(1) Data is changed in application

(2) an mBDoc is created and transferred to CRM Middleware.

(3) CRM MW determines possible external receivers for the mBDoc and sent the mBDoc to XIF Adapter.

(4) XIF Adapter converts mBDoc to XML-like or IDOC and an appropriate basic service (SOAP, ALE) is started that sends the data object to the external receiver, for example, via a third-party Middleware tool.

Issue

(1) [ CRMXIF_ORDER_SAVE IDOC not getting generated for BUS_TRANS_MSG BDOC]( archive.sap.com/discuss )

The model of BDOC BUS_TRANS_MSG triggering IDOC CRMXIF_ORDER_SAVE_M02 perfectly worked in the development system???

(2) [use XIF adapter to transfer XML documents into CRM]( archive.sap.com/discuss )

(3) [ note: 2343680 - CRM outbound Idoc is not created after data is changed - Fiori url]( apps.support.sap.com/sa )

# Trouble shooting

(1) Go to t-code R3AC1 and make sure the object BUS_TRANS_MSG contains the flow context from CRM to XIF.

(2) table EDIDC

(3) FM: SMW3_OUTBOUNDADP_CALLADAPTERS, CRMXIF_ORDER_IDOC_SEND, CRM_STATUS_CHANGE_FOR_ACTIVITY, CRM_UPLOAD_BUS_TRANS_MSG

(4) TJ07 & TJ31:determine whether a Business transaction is allowed when the status is at a certain user status (TJ31) and a certain system status (TJ07). Example: in TJ07, if the system status is I3037 then CHNG business transaction is prohibhited because of the entry 3 in the field MODKZ. In user interaction terms the user cannot back the transaction editable if the system status of the tranaction is I3037. The user is presented with the error in this case 'No changes possible in document'. The entries in TJ07 could be found from transaction code BS32.

An interesting finding. Recently the C4C customer I supported asked some integration question regarding integration of C4C and CRM using PI. After I go through the integration document, I know that it is possible to replicate master data( BP, Product etc) and sales data between C4C and CRM.

The necessary configuration in AG9 Vs the counterpart in an old CRM system Q0C/304:

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

WE19 is the test tool for IDOC processing. If there are no IDOCs in the system, you have to create one from scratch using a message type, but if there are already IDOCs in the system, it is most convenient to use the option “Existing IDoc”.

# Sync 2017-11-20

Issue 1 - after saving a Service Order in QG3/130, mno BDOC is generated.

root cause:

使用SAP CRM External Interface進行訂單同步

# solution

使用SAP CRM External Interface進行訂單同步

Issue 2 - MBOC is generated, but no IDOC is generated.

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

Issue: no error handling in FM CRM_ORDER_SAVE_OW

There are lots of such occurance:

使用SAP CRM External Interface進行訂單同步

Then debug this FM - it is not executed AT ALL:

使用SAP CRM External Interface進行訂單同步

in FM: CRMXIF_BT_IO_MAP_TO_DATA

使用SAP CRM External Interface進行訂單同步

The status of this Service Order:

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

However, it is difficult for end user to find what exactly the errors are there from WebUI:

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

It is possible to write a report to remove I1030 and I1056 from CRM_JEST but I don't think it is a correct approach - we must resolve the error status with solution which is also feasible for end user.

# Sync 2017-11-22

It's my fault: I am testing on a service order which still has old persistence in QG3/130:

使用SAP CRM External Interface進行訂單同步

After I create a new Service Order from scratch, the XIF outbound scenario works quite well - the IDOC is generated and sent to XIF site successfully:

使用SAP CRM External Interface進行訂單同步 使用SAP CRM External Interface進行訂單同步

I quickly go through all accessed DB table traced by ST05:

使用SAP CRM External Interface進行訂單同步

You can also find trace file here:

使用SAP CRM External Interface進行訂單同步


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2680476/,如需轉載,請註明出處,否則將追究法律責任。

相關文章