User-exit / BADI to control BP replication from CRM into R/3
I have a scenario where besides the entries maintained in PIDE for replication from CRM into R/3, I need to control the replication or not concerning another field in CRM BP Master data.
It's something like this:
I need to replicate CRM prospects to R/3, but not all of them. This should be done only when a specific field from the BP master data is filled.
I have to set the entry prospect --> ZXXX (account group in R/3) in PIDE transaction. But them I need something more to check the field in BP master data and prevent the "not prepared" prospects to be sent do R/3.
Do I have any option to filter the replication from CRM into R/3 based in this field?
Another possible option could be the development of a user exit or BADI that controls the BP replication to R/3. Does anybody knows a user exit where I can do this?
Thanks a lot!
This is very much possible. That is through a User Exit.
Goto Tcode: CRMC_BUT_CALL_FU
Here check for teh ecttry:
Event = BPOUT
Object = BUPA
Item = 200000
Function Name = BUPA_MWX_BDOC_CREATE_MAIN
Call = 'X'
This is the FM that is called every time a BDOC is cerated.
Just copy it and create a New FM ZBUPA_MWX_BDOC_CREATE_MAIN
Write your code in the start itself where you check if the BP is to be replicated or not.
If the BP is not to be replicated, just EXIT the FM. THis would stop any BDOC from being created adn ecentually the replication would not take place.
Note: dont disturb the earlier code jsut add yours on the top
Now replace the previous FM with your Z-FM and save.
I hope this helps.
Kindly reward with points in case helpful