cancel
Showing results for 
Search instead for 
Did you mean: 

Are there any variant of is_data_dependent() function SAP Information Steward tool?

former_member188628
Participant
0 Kudos

Hi All

     I am newbie in the world of  Sap Info_Steward (Data Governance). I was trying to check if the complete data across individual rows of the  Column_Name called  -"Company_Name" is contained in the respective web address of the companies irrespective of the case sensitivity:-

Following is a part of the sample data:-

Below is the rule i used:-

BEGIN

Return is_data_dependent([$CompName], [$Web]);

 

END

where both [$CompName], [$Web] are input parameters;however its not giving valid test results

The Test is even displaying 'Pass' for those words which are not present in the input columns (in either CompName ,Web) like :- blog, Zoomanjee. Apart from this its showing Pass for all those input which are partial (not fully present) like if "Chanay, Jeffrey A Esq" is present completely in the web , and  I provide an input of  "Chanay" alone, its showing "Pass"(as the requirement i need to check whether the full text(words) are present in the web address.

Can the dependency function be further modified or  enhanced? And the Quality dimension i chose was initially "Confirmity", later on changed to "Accuracy" but that has changed anything!!

Please provide a solution to this

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

begin RETURN replace_substr($Web, $CompName, '', 1, 1)!=$Web; end

former_member188628
Participant
0 Kudos

Hi Dirk

   Thanks a lot for the quicker response. However, the code is failing all the tests. The comparison can be understood logically:-

Company Name         Web

Benton, John B Jr       http://www.bentonjohnbjr.com/


all the components of the name :Benton, John , bjr are present in the web address, i am getting an idea of using trim() function, and there involves case senstitivity as well. Certain names are present in the web address as combination of small and capital letter words.


Thank You

Regards

former_member187605
Active Contributor
0 Kudos

Yes, I am sorry, I see, now.

You can easily get rid of the commas and spaces with replace_substr and then convert to lowercase:

begin

RETURN replace_substr(lower(replace_substr(replace_substr($Web,' ','',1,null),',','',1,null)),$CompName,'',1,1)!=$Web;

end

But that's no solution for names with numeric characters.

You can include 10 extra replace_substr calls, one for each digit.

Or, if you can prepare your data in DS, write a custom function to do so. I can post the DS code if you like.

former_member188628
Participant
0 Kudos

Hi Dirk

     Wow this was so cool ,thanks a lot. I gotta to try this. But i have a question. Where could refer little complex examples using the above functions, lookups, when i referred the user guides, it has the description and overviews of the functions and other topics, however the examples are not so complex.Could you guide me with that.

Let me check the code and inform youThe DataServices code would be very useful as well

Thank you

Regards

former_member187605
Active Contributor
0 Kudos

This is the DS custom function, $STR is the input parameter, all other are local variables:

$OUT = '';

$L = length( $STR);

$I = 1;

while ($I <= $L)

  begin

  $C = substr($STR,$I,1);

  if ($C >= 'a' and $C <= 'z' or $C >= 'A' and $C <= 'Z') $OUT =$OUT || lower($C);

  $I = $I + 1;

  end

return ($OUT);

The only place that has more complex examples is here on SCN, I think. Use the search functionality. Or Google.

Alternatively, you could hire an experienced IS consultant to give you a headstart .

former_member188628
Participant
0 Kudos

Hi Dirk

  Thanks a lot. Scn is a great and cool source of help with all SAP mentors and experienced consultants ready to give a helping hand most of the times. I am amazed. I  express my sincere thanks to you and all others for helping out a newbie to such an extent.I am assiting the senior people as a part of lengthy projects and getting exposed to multiple tools. And all of them are just Wow..So cant help exploring little about these tools.

Thanks

Regards

former_member188628
Participant
0 Kudos

Hi Dirk

     I tried the function with minor changes and the results were working fine, the test were successful.Below are the test results:-

However my confusion over the data dependency-is_data_dependent() function still remains the same , can't understand why is_dependent lookup is not working! or am I missing something!

former_member187605
Active Contributor
0 Kudos

It's a totally different concept. Friom the documentation, SAP Information Steward User Guide, section 2.15.3.4 Functions:

is_data_dependent:

Indicates True when the value of the primary column determines the value of the dependent column. For example, if “X” is the primary column and “Y” is the dependent column, then “X --> Y” or “X determines Y”.

Also, one value of the primary column has only one value in the dependent column throughout the data set. In other words, if one value in the primary column has more than one value in the dependent column, it is not data dependent.

There can be multiple columns listed in the function for both the primary and dependent columns.

The results (True or False) passes or fails all records in the data set.

An example: X = CountryCode, Y=CountryName

If for all records where X ='NL', Y contains 'the Netherlands', then result is true.

If for some records with X='NL', Y contains 'the Netherlands', and for some others Y contains 'Holland' then result is false.

former_member188628
Participant
0 Kudos

Hi Dirk

Thanks a lot for the guidance.To keep you informed, the lookup IsDataDependent is working fine

Regards

Moumita

Answers (0)