CRM PRODUCT_MAT, BDOC和customer product id修改

Product HT-1055 is downloaded from ERP. When you make changes in CRM for example change its customer product id:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTA5ZWEzOTJjODc4YzU2ZTYucG5n?x-oss-process=image/format,png)
After save, you can observe there are three BDOC related to this save.
This series of wiki pages discusses the scenario behind it.
When you perform change in WebUI and save:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLWRiNDQ5N2IwMmFmYmIzNjEucG5n?x-oss-process=image/format,png)
This function module will call a BAdI implementation:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTA4NjM5ZjE3OTIzNGVjNWQucG5n?x-oss-process=image/format,png)
This badi is responsible for sending product changes done in CRM to other registered site which are intrested with this change.
The related BDOC type PRODUCT_MAT is hard coded in line 62:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTA2NGYwNTgxMzNhMjViYzgucG5n?x-oss-process=image/format,png)
And what content is included in this BDOC? Just header information about product being changed, but not any detail data like changed customer product id:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTE5MWM5MmUzNTVlZDc4NWMucG5n?x-oss-process=image/format,png)
Why this BDOC has red light in tcode SMW01? It is becasue one of the receiver site, the XIF_XML, has some trouble when receiving this BDOC.
However, since our main focus is to research the data exchange between ERP and CRM, we can just ignore this error.
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTE0YjI0MjA0YTM5NjY1M2MucG5n?x-oss-process=image/format,png)
For the reason why this CSA queue is needed, please read this issue: What is CSA* queue
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8yMDg1NzkxLTAzMDk3YmM3NDlmYjE3NzIucG5n?x-oss-process=image/format,png)
本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。