07-31-2020 1:05 PM
Can we split string by index or by regex in simple transformation during deserialization?
For example if we have XML tag <CAR> and want to split it's value by semicolon
<CAR>TYPE:LIMOUSINE; VENDOR:DODGE; VELOCITY:150; ENGINE:V8</CAR>
into internal table
type vendor velocity engine
limousine dodge 150 V8
I didn't find anything about this in tt:value help. Can we do this by means of ST, something like in XSLT?
<xsl:value-ofselect="substring(concat(., ''), 1, 1)"/>
08-04-2020 7:19 PM
You may call an ABAP method -> ABAP documentation ST - tt:call-method, Call Static Methods.
I tried tt:call-method and it worked for me. Of course, you can do whatever you want in the method, including the use of regular expressions.
07-31-2020 2:36 PM
You may call an ABAP method -> ABAP documentation ST - tt:call-method, Call Static Methods.
08-02-2020 4:00 PM
08-02-2020 4:04 PM
I suppose it will be impossible to run CL_ABAP_REGEX or CL_ABAP_MATCHER via tt:call. Did you try it?
08-02-2020 10:07 PM
If you say that it's not a "built-in function", then there's almost no built-in function at all in Simple Transformations.
I don't understand why you say it is "impossible to run [a method] via tt:call", can you explain?
I tried tt:call-method and it worked for me.
08-04-2020 6:01 PM
Agreed, Sandra. The wording "built-in function" is misleading here, there is no btf in ST. Okay, thanks for suggestion, I will try to run CL_ABAP_MATCHER in ST. You can post this as answer.
08-04-2020 7:19 PM
You may call an ABAP method -> ABAP documentation ST - tt:call-method, Call Static Methods.
I tried tt:call-method and it worked for me. Of course, you can do whatever you want in the method, including the use of regular expressions.