How does CRM middleware knows which sites are interested with CRM local changes

You could see the following BDOC in CRM which means the BDOC will be sent to multiple external sites besides ERP.

So how does CRM middleware knows which external sites must be sent with BDOC?
Basically speaking it is based on subscribe - publish mechanism.
Take BDOC PRODUCT_MAT for example, in view SMW3FDBDOC you can maintain callback for it:

The first callback, SMOH_REPLICATION_WRAPPER_MSG, is responsible for determine responsible receiving site for this BDOC sent from CRM via middleware:

This function is generated automatically:

From here, it means 6 receiving sites are determined:


So how does this guid A17123B82C2DD5118BC8080006277F8D mean which is used to query on table smohsubsit?
You can find its description in table below: Product Materials(MESG)

The external site subscription could be done in tcode SMOEAC. The setting below means QI3/504 is registered on publication “Product Materials(MESG)” which means when the change in CRM is done, the corresponding BDOC should be sent to QI3/504.

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