Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Format a string according to a Pattern in SAP DataServices

$
0
0

Hi ,

I have the following requirement.

 

 

I have a lookup table as follows:

 

Source FormatFix Format
9999XXX9-99-9XXX
9999X9-9-99X
9XXXX-X9X-XXXXX

 

I need to convert the source data coming in according to the Fix Format.

 

I am able to match in the Source format with the Source format Column till now,the next step would be Convert it into the Fix Format and I need to do it dynamically.

 

E.g. If the Source data is 9876C is conveted to 9-8-76C

and 1ASDFG-Z is converted to 1A-SDFGZ

 

We can do substr() for each pattern but I need some logic that the process is automated and  I do not have to hardcode substr for each and every pattern.

 

Do let me if you have some Idea.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>