cancel
Showing results for 
Search instead for 
Did you mean: 

Comparison operators startsWith, endsWith ?

rdiger_plantiko2
Active Contributor
0 Kudos

Hi,

it would be helpful to have the predefined comparison operators starts with and ends with.

I know that this is only a small thing and could easily be worked around with the CP operator, like this

contains pattern "STRING*"

and

contains pattern "*STRING"

but it would improve the readabilty of the rules to have these operators built-in, in particular if the STRING is not a literal but a variable which has to be manipulated first in a separate, purely technical step.

In my example, I have a string representing the product hierarchy, and the first two digits representing the top level of the hierarchy, called "Bedarfsbereich". The rule has to check whether the actual product hierarchy value fits into this "Bedarfsbereich". Both data objects, product hierarchy and "Bedarfsbereich", are data objects, not constants, in my rule - coming in as import parameters.

I am currently working with a custom formula function to meet this case.

By the way: Would it be possible to define custom comparison operators?

Regards,

Rüdiger

Accepted Solutions (1)

Accepted Solutions (1)

carsten_ziegler
Active Contributor
0 Kudos

Included into the standard as of NW703/731.

Answers (1)

Answers (1)

rdiger_plantiko2
Active Contributor
0 Kudos

I forgot to mention that I am on SAP_BASIS release 702.

So this is answered.