cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Filters in the Initial Load

former_member2987
Active Contributor
0 Kudos

Hi Folks!

When we are doing ABAP initial loads we only want to read in certain roles (Y and Z ) Is there a way to set a range on the filter?  We found out the hard way that Y*-Z* does NOT work, but Y* or Z* will work.  I can certainly adjust the initial load to read one set of roles in one pass and then another set in another pass with append entries to table specified.

Any thoughts on this would be welcome!

Matt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The initial load is split in two. The first step loads everything in tables and the second step reads those tables. You can easily adjust the SQL statement used in the second step any way you want.

former_member2987
Active Contributor
0 Kudos

Sietze,

I like your approach.  It's simple and elegant.  While Peter's regex approach has advantages if there are lots of conditions to be met, I think the SQL approach is more practical for my current use case.  I'll be looking into implementing this soon!

Thanks,

Matt

Answers (2)

Answers (2)

Former Member
0 Kudos

The initial load is split in two. The first step loads everything in tables and the second step reads those tables. You can easily adjust the SQL statement used in the second step any way you want.

Former Member
0 Kudos

Hi Matt

I apply the filter on the 'WriteABAPRolePrivilege' job (or corresponding Java job) and - if you're worried about errors in the log - on the Write xxx assignments job.

I define a global constant 'PRIVILEGE_FITLER' as a regex: ^[YZ].*$

I create a script to run on the entry script on the pass: FilterPrivilege

 

var privUID = Par.get("uniquename");

var pattern = UserFunc.uGetConstant("glb.PRIVILEGE_FILTER");

var privRegEx = new RegExp(pattern);

if(privRegEx.test(privUID))

{

continue;

}

else

{

uSkip(1);

}

return Par;

This will ensure that, while they're all in your temporary table, only the ones you want end up in the ID store.  I use the same process for filtering users I don't want in the system.

Peter

Former Member
0 Kudos

Actually, that 'continue' should be commented out as unnecessary...