Skip to Content
Technical Articles

Filtering of cluster table through include program from SLT

Objective:Filtering of cluster table through include program from SLT

 

Requirement:  Replicating KONV cluster table with filters through SLT.

It was not possible to create filters for replication on a Cluster table. It states “Filters for the replication process are not supported for index-like tables and cluster tables.” in the LTRS Application help.

However, in DMIS 2011 SP17/DMIS 2018 SP02 you are able to create a filter for Replication on Cluster Tables. Please see note 2815513 – Release Information SLT – DMIS 2011 SP17

 

This is implemented in version SLT – 2018 SP01. In this version filter selection is available only for initial load only but not for real time replication option as shown below,

 

 

 

To validate this option below are steps,

 

Step 1:

Go to LTRS transaction à Performance options à Add table

 

Step 2:  To check the options available for non-cluster table (transparent table), add any standard table for example VBAK,

 

Step 3: Go to filter options tab.

we can observe that we have option to filter the table for initial load and replication process, Filter initial load only and also Filter replication process only.

Whereas when we add cluster table, then we will only get filters for initial load only but not for replication process as below,

 

So, to overcome this issue we are going to create an include program and add the required fields which will be filtering and restricting the data for real replication process.

 

Step 1: Go to LTRS transaction à Rule Assignment à Right click and add table KONV, then it will display under rule assignment folder,

 

Step 2:  Please select KONV table

  • Go to the rule option at top
  • Select Event Based rule and continue

Event related rule – we can work with all fields of structure.

Now select the BOR- Begin of Record option à This means the routine will trigger before the   replication.

BOR is common option to filter on entire structure from source system.

Sender structure   : <wa_s_(tab_name)>-<filed>    | <wa_s_konv>-kapp1

Receiver structure: <wa_r_(tab_name)>-<fields>   | <wa_r_konv>-kapp1

 

Step 4:

After selecting another tab will pop up as – “Details of rule for begin of record”. In this under Include Name we need to update our include program name.

Step 5:

Insert Include program under Include name as show below,

Step 6:

Once we include program and save the rule then, the Include program will show-up in the Implementation under “Rule overview”,

 

Step 7:

Change the status to “Released” and save it.

Step 8:

Go to transaction LTRC and replicate the table KONV by clicking the “Data provisioning option, You will get multiple options to replication, in our scenario we need to select “start replication” option and Execute

 

Step 9:

Check the status of data load replication in Load statistics,

 

Creating Include program:

Step 1:

Go to SE38 transaction –> create the include program

 

 

Include Program for your reference:  In this program there is include and exclude to filter the data

***&———————————————————————*
***& Include ZSLT_UPDATE_WITH_FILTER
***&———————————————————————*
***” Event BEGIN OF RECORD code:

IF ( <wa_s_konv>-kappl EQ ‘DB’ AND
( <wa_s_konv>-kschl <> ‘ZK01’ AND <wa_s_konv>-kschl <> ‘ZORA’ AND  <wa_s_konv>-kschl <> ‘ZPC1’ AND  <wa_s_konv>-kschl <> ‘ZPCA’ AND
<wa_s_konv>-kschl <> ‘ZPDH’ AND <wa_s_konv>-kschl <> ‘ZPDT’ AND <wa_s_konv>-kschl <> ‘ZPHD’ AND <wa_s_konv>-kschl <> ‘ZPOS’ AND
<wa_s_konv>-kschl <> ‘ZPL1’ AND <wa_s_konv>-kschl <> ‘ZPL2’ AND <wa_s_konv>-kschl <> ‘ZPL3’ AND <wa_s_konv>-kschl <> ‘ZPMA’ AND
<wa_s_konv>-kschl <> ‘ZPMH’ AND <wa_s_konv>-kschl <> ‘ZPMP’ AND  <wa_s_konv>-kschl <> ‘ZPUM’) ).

 

<wa_r_konv> = <wa_s_konv>.

ELSE.

SKIP_RECORD.

ENDIF.

 

Any queries please post on the comments. I will be able to help.

 

Regards,

Shyam.

 

 

 

 

 

 

 

 

 

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.