Skip to Content
Technical Articles
Author's profile photo Anup Ramesh Deshpande

Use Custom Filter Object ( DRFF ) in the S/4 HANA BP Outbound Replication

Introduction: I recently worked on the S/4 HANA Business partner outbound replication setup where one of the requirements was to stop/filter messages based on the Business partner Grouping. The replication of Business partner data to the connected systems can be done by using Data Replication Framework (DRF ).  SAP has also provided standard filter objects and these standard filter objects can be used if you need to filter business partner replication based on the role, company code, etc. But I configured a custom filter object as our requirement was to filter BP replication messages based on a BP Grouping type which is not supported by the standard SAP filter objects. In this blog, I am going to cover how to configure a custom filter object and also enable it for transaction code DRFOUT.

List of available standard Filter objects :


Standard Filter Objects assigned to 986_3

Steps to configure Custom Filter  Objects: 

I have configured Filter Criteria for the BP grouping ( i.e. BU_GROUP)  but this Filter functionality can be used for any other custom filter criteria.

Step 1 Define a new Custom Filter Object.  (Path DRFIMG Tcode –>Define Filter Objects)

TB001 is used to refer to BP Grouping. We need to use the appropriate table name here based on the requirement/Filter Criteria.

Step 2 Assign Custom Filter Object to the “986_3” Outbound Implementation.


Step 3 Maintain Filter Values using DRFF Tcode.

Step 4 Implement “MDG_BS_SUPPLIER_SI” BADI (Method DRF_NODE_FILTER) to read and use values maintained in step 3 above to filter BP replication message. Please refer to “MDG_BS_SUPPLIER_SI_ERP” (Method DRF_NODE_FILTER) standard enhancement implementation which shows an example to read/use the “98602” Filter object.

Enable Custom Filter Object criteria for DRFOUT Tcode :

There is an option to select filter criteria manually as below which overrides DRFF filter values.


If you need to use the Custom Filter object instead of “Manual Replication Filter” criteria then please do not pass “iv_ignore_filter” parameter to the “APPY_FILTER” method which is set as ‘X’ for DRFOUT tcode.


For more information please refer to below SAP Help links :

DRFF Configuration

Data Replication Using Enterprise Service Oriented Architecture (SOA)

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Soumyo Mukherjee
      Soumyo Mukherjee

      This is very helpful.

      Author's profile photo Karthik Kota
      Karthik Kota

      I would rather like to understand why was the BP Grouping configured as a segment filter and not an object filter? I ask this question because BP Group is something that applies to the entire BP object itself in S/4, rather than a specific aspect of it such as a BP Role.

      More specifically, why not use a custom structure and a custom class to include BU_Group and its filtering logic, using the guidance of the standard filter MDG_BP_SFT which contains the MDG_BS_BP_S_DRF_SERVICE_FLT structure and its corresponding class CL_MDG_BS_BP_RPLCTRQ_FLT which then contains the method IF_DRF_FILTER~APPLY_FILTER ??

      Author's profile photo Anup Ramesh Deshpande
      Anup Ramesh Deshpande
      Blog Post Author

      Hi Karthik, Thank you for going through the blog and sharing your feedback.  Here the name says segment filter but you can completely filter/stop the entire BP message. Also, filter functionality is not specific to BP grouping and we can use it for any other criteria as per the custom requirement. The main objective here is to share details about how to use and configure custom filter objects.

      I preferred to use standard functionality instead of custom code(i.e. structure/class). DRFF even allows us to maintain filter values which gives much more flexibility to control the overall process.


      Author's profile photo Karthik Kota
      Karthik Kota

      Hi Anup,

      Thanks for your response. I understand that this approach described in this article could be used to implement a custom segment filter for any filter criteria that is not met by the standard delivered filter attributes. And you have picked BP grouping as an example to illustrate this.

      Still, this approach is not completely standard right? cuz this approach still requires an implementation of the BADI MDG_BS_SUPPLIER_SI and the method DRF_NODE_FILTER.

      In this specific example of BP group custom filter, though implemented thru custom segment filter, it filters the entire object. The reason most likely is because the BP group is an object level attribute, correct ?

      And the rationale behind my previous comment was to bring about a clear understanding on when to implement a custom segment filter vs a custom object filter.

      My understanding of a segment is that, it is a part of the BP that contributes to make up the whole BP (such as a BP role, Sales area, etc) and whereas the object in my view refers to the entire BP object. so I am approaching the custom filters accordingly in line with that understanding, that is, if you need to filter the entire object you use custom object filters and if you need to shave off a part of the information(a segment) of the BP then you use custom Segment filters. Do you concur with my rationale?

      Also, BP grouping is one of the most widely used filter criteria for filtering BP`s. I hope SAP considers including this in their standard delivered filters in the future.

      Thank you,


      Author's profile photo Barnet Molina
      Barnet Molina

      Hi Anup,

      Thanks for your blog, very useful! Here  we need to execute DRFOut to send  only changes for BP-Suppliers created by Ariba (ERP UserID ARIBA_CIG).

      We can create BP-Suppliers on Ariba and use Ariba-ERP Integration to create them in ERP. We can also create BP-Suppliers directly in ERP and do not need to create them in Ariba.
      Only changes in ERP for BP-Suppliers created from Ariba should be sent back to Ariba for update.
      Is there a way to accomplish this using DRFOut options/Filters and to have those options/filters to allow them to run periodically with a job(example: every hour) and send back to Ariba only changes made to BP-Suppliers originally created in Ariba?
      Author's profile photo Anup Ramesh Deshpande
      Anup Ramesh Deshpande
      Blog Post Author

      Could you please review “MDG_BS_SUPPLIER_SI” BADI (Method DRF_NODE_FILTER) once.  I think you can write the custom logic in this method to filter out records by deleting them from the CT_BS_BP_EXTERN table. We can create filter objects as per our requirements and use them to filter out replication records.

      Author's profile photo Markus Lang
      Markus Lang


      is there a way to setup different variants for DRFF Filters for the same outbound implementation?

      I need to setup 2 complete different filter criterias for sending Venords and Customers with outbound implementation 986_3 because they exclude themselfes.

      What i already tried was to setup two replication models with the same outbound implemention 986_3 but SAP Standard Tx DRFIMG does not allow me to do that.

      best regards,


      Author's profile photo Mrinal Kanti Roy
      Mrinal Kanti Roy

      Hi Markus,

      Standard DRF does NOT allow 2 outbound impl with same business object for the same target system.

      With regards,


      Author's profile photo Pranay Agarwal
      Pranay Agarwal

      Hi Anup - this is great, we implemented a custom filter using your approach for field KNVV-AUFSD. We want to filter out a specific sales area for a customer that has 2 sales areas. However, it is filtering out entire BP instead of just the blocked sales area. Any thoughts?



      Customer - ABC exists in below two sales area

      Sales Area - 1000/10/00

      Sales Area - 1000/20/00 -- this sales area is blocked using field KNVV-AUFSD (TVST domain table)


      We want DRF to send values for Customer ABC with Sales Area 1000/10/00 only.