(1) Trigger the IDOC sending using tcode R3AS

SAP CRM IDOC的详尽调试步骤

Choose the receiver destination site from f4 help:

SAP CRM IDOC的详尽调试步骤

Click f8 to execute the sending.

SAP CRM IDOC的详尽调试步骤

(2) Launch tcode SMQ2 to check inbound QRFC queue, you should find one entry for our R3AS run in step1.

SAP CRM IDOC的详尽调试步骤

Double click on it:

SAP CRM IDOC的详尽调试步骤

Then double click it again, choose the entry for FM BAPI_CRM_SAVE and click debug icon:

SAP CRM IDOC的详尽调试步骤

(3) Now debugger window automatically pops up:

SAP CRM IDOC的详尽调试步骤

Adapter module COM_MAP_BAPIMTCS_TO_PRODUCT will be called.

SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤

Middleware framework class will be called:

SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤

These above three function modules will be executed one by one. The first one is for message replication and the second for master data management and we are only interested in the last one for IDOC sending.

SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤

Function module CRMXIF_ADP_OUTBOUND will be called:

SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤

Variable ls_data_mapped contains the product data to be sent:

SAP CRM IDOC的详尽调试步骤
SAP CRM IDOC的详尽调试步骤

Get the ALE function module name:

SAP CRM IDOC的详尽调试步骤

The real sending occurs in function module MASTER_IDOC_DISTRIBUTE. After execution the IDOC document number will be stored in variable idoc_comm.

SAP CRM IDOC的详尽调试步骤

The variable IDOC_DATA contains the formatted data to be sent:

SAP CRM IDOC的详尽调试步骤

write down the document number 214003

SAP CRM IDOC的详尽调试步骤

And have a look at it in tcode WE05:

SAP CRM IDOC的详尽调试步骤

It is in error status 29

SAP CRM IDOC的详尽调试步骤

Error code 29 means the receiver of IDoc is its own logical system
So we can check via tcode SMOEAC against the IDOC receiver site. And yes, the configuration there is wrong, since currently we are triggering IDOC send right in QDD, and we should not set it again as receiver site.

SAP CRM IDOC的详尽调试步骤

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP CRM IDOC的详尽调试步骤

相关文章: