Skip to Content

Filtering object instances in asynchronous outbound replication scenarios

Have you come across the following requirements with your customer?
“I want to replicate prospects out of C4C, but no accounts. The latter should come from a central ERP system and shall not be editable in C4C.”
“Only accounts of a certain sales area shall be replicated out of C4C.”
“We use CRM OP for our US market. C4C shall only send US opportunities to this CRM.

What all of these requirements have in common is that the customer wants to use the respective standard outbound replication scenario in general, but in detail he would like to block certain object instances from being sent out of C4C while others shall be sent as usual.
How can this be achieved? The answer is by implementing a simple code snippet in SAP Cloud Application Studio to implement the desired filter! Here are the steps which need to be implemented:

1) Create an enhancement implementation…

2) … and select the enhancement option “CheckBusinessObjectInstanceProcessIntegrationRelevance”.

Once created you will see 2 entities as part of the enhancement implementation:
– Filter parameters (.fltr)
– ABSL coding to perform the filtering (.absl)

3) As a next step you need to specify the filter parameters of your enhancement implementation. Here you need to list the integration scenarios for which the enhancement implementation shall be called. In our case we create a filter for scenario “1297 – Request Business Partner Replication”

4) Now the .absl snippet needs to be coded to implement the actual filter logic. In order to do so you need to know the following:
– The import parameter DataInput contains the object type (e.g. “441 – Business Partner Template”) as well as a list of object UUIDs which have been changed within a save cycle
– The return parameter is structurally equivalent. The object type needs to be handed over from the import parameter, the list of object UUIDs filtered to only contain the object UUIDs which shall be replicated based on certain conditions.

The following is an example to only replicate accounts with an A-rating, i.e. to filter out all non-customer business partner types (such as competitors) as well as all non-A customers:

Add your SAP Business ByDesign scripting language implementation for:
Enhancement Option: CheckBusinessObjectInstanceProcessIntegrationRelevance
Operation: CHECK

Script file signature
Parameter: InputData of type BusinessObjectInstanceProcessIntegrationRelevance
Returns: BusinessObjectInstanceProcessIntegrationRelevance

– To use code completion, press CTRL+J.
import AP.Common.Global;
import AP.FO.BusinessPartner.Global;

var result : BusinessObjectInstanceProcessIntegrationRelevance;

result.ObjectTypeCode = InputData.ObjectTypeCode;

foreach (var bupaUUID in InputData.UUID) {

var customerRoot = Customer.Retrieve(bupaUUID);
// only replicate customers
if (customerRoot.IsSet()) {
// only replicate A-customers
if (customerRoot.ABCClassifications.IsSet()) {
if (customerRoot.ABCClassifications.CustomerABCClassificationCode.content == “A”) {

return result;

Please note:

For the enhancement spot mentioned above, SAP predelivers 2 implementations which are executed in addition to any potential custom implementations:
– Block prospects (ERP Integration): Prospects are blocked in case the customer has set the corresponding option in business configuration
– Block marketing leads: As marketing leads are business partners as well, they are blocked from being repicated by this standard implementation

In general, the enhancement implementations are always called for specific communication scenarios defined as filter parameters. The implementations are cumulative, that means all implementations i.e. filters for the same scenario add up and implement an even stricter filter than all previous implementations.


It is important to know that the filter BADI only gets called for instances which have not been sent out of C4C before. Instances which have been sent out of C4C already before will always be sent in the future, there is no way to block them anymore.

You must be Logged on to comment or reply to a post.
  • Hi,


    Can we Stop Replication out for certain System based on logic?

    We have two main system connected to C4,

    1. SMC – Marketing Cloud which should have both Prospect , Customer.
    2. ERP- Stop replicating Account with some logic.\



  • Hi Dhruvin,

    in general receiver system determination can be changed by implementing a different BADI called “RecipientSystemDeterminationbyBusinessObject”. Here you can code which system a specific object instance shall be sent to…

    For your specific case however, since ERP integration is done via a different webservice compared to Marketing integration, you can implement the above described filter BADI “CheckBusinessObjectInstanceProcessIntegrationRelevance” just for the ERP scenario (step 3.) and not for Marketing.

    Regards, Marcus

  • Hi,

    according to the documentation in the SDK, marketing attributes cannot be filtered out by such a BAdI (see screenshot):

    Is there another possibility within the C4 Sales Cloud?

    Of course it could be filtered out on the middleware (CPI), but it’s not our preferred solution.

    Best regards


    Marcus Echter 

    • Hi Paul,

      Marketing Attributes can be filtered out via the receiver determination BADI “RecipientSystemDeterminationbyBusinessObject”. The parameters indicating the scenarios are “1978 – Business Attribute Assignment” and “1979 – Business Attribute Set”. Simply set the receiver system to a dummy one which does not exist.

      Regards, Marcus