on 08-16-2007 9:47 PM
Hi,
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!
Susana Messias
Hi,
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
Sharif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharif,
Thanks for your answer, but I have one doubt.
If I create a Z function module (copy from BUPA_MWX_BDOC_CREATE_MAIN) and I create a code to check if the BP is to be replicated or not, I will create or not the BDoc.
Question: If in the future I install CRM Mobile and I son't want this "not prepared" prospects to be sent do R/3, but I want them to be sent to Mobiles, this solution will not be the best right? Because I will avoid the creation of a BDoc that will be used by R/3 and Mobile, am I correct?
If so, do you have any other option?
Thanks,
Susana Messias
Hi Susana ,
I believe you have a valid concern here , And I think you should be better using Filter Conditions for the Adapter Object which can be controller at Site Level too.
Go to R3AC1 and Select the specific Object ( BUPA_MAIN ) and go to Filter Settings and Specify . For Example : Table BUT000 , Field etc
You can add addiitional fields to be used in the Filter Setting in View SMOFFILFLD ( SM30 )
Since these filter setting are per Site , this addresses your concern.
Hope this helps.
Hi,
Thanks for your answer.
Do this filters work when we are sending BPs from CRM into R/3? Because I tried it this morning, but the system replicated the Bdoc to the R/3 site without respecting the filter I maintained in R3AC1 for BUPA_MAIN object.
If I am not wrong, we can only filter BUPA_MAIN using the subscription with criteria filter in SMOEAC transaction (Adminstration console). But here I have limitations concerning the available fields for filter the data. Do you know if it's possible to add other fields here?
Thanks and regards!
Susana Messias
Hi Sukant,
That table controls the filters used in R3AC1 for BUPA_MAIN, but not the filters used by a replication object in SMOEAC.
I would like to use the filters in R3AC1 as you sugestioned because it would be a very standard and easy solution, but I tried to use this filters in R3AC1 this morning and the system didn't take them into account.
So I ask if someone in the forum knows that this is a wrong response from my system and I should open a message in SAP Support, or if (as I though it was) the filters that control the replication from CRM to R/3 can only be set in SMOEAC transaction using a simple intelligent subscription.
Can you answer this question?
Susana
Let me add my thanks to Sukant as well. My requirement was to exclude certain Business Partner Groupings from being uploaded to R/3. I was hoping that the filters applied in R3AC1 would actually have some effect, but they didn't. I don't understand that part yet. SAP must have had something in mind when they allowed filters for both directions of data transfer in R3AC1.
Anyway, as Sukant suggested, I created a ZBUPA_MWX_BDOC_CREATE_MAIN function module and simply added the following code snippet:
* Start of custom code to check whether BP grouping = 0003/0008
LOOP AT ct_bp_extern into ls_one_bp.
IF ( ls_one_bp-central_data-common-data-bp_control-grouping NE '0003' ) AND
( ls_one_bp-central_data-common-data-bp_control-grouping NE '0008' ).
DELETE TABLE ct_bp_extern[] FROM ls_one_bp.
ENDIF.
ENDLOOP.
* End of custom code to check whether BP grouping = 0003/0008
Of course I had to create a copy of the function group, copy the includes and global variable declarations from the main program etc. But I was hoping that SAP would make such a simple filter more configurable rather than require coding, no matter how simple. If someone else with more knowledge comes across this thread in the future, please update it to let us know if we are asking for too much to have the filter option provided in R3AC1 actually work (for CRM --> R/3 data transfer).
You don't have copy the function group if you can get all the information from the ct_bp_extern parameter.
Simply create a new function module in an appropriate group, and make sure it has the same parameters as the function you were going to copy.
You can test the values in ct_bp_extern and delete if necessary.
Then add the function in CRMC_BUT_CALL_FU and make sure it is called before the standard SAP functions.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.