2020 Jul 31 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)"/>
2020 Aug 04 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.
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.
2020 Jul 31 2:36 PM
You may call an ABAP method -> ABAP documentation ST - tt:call-method, Call Static Methods.
2020 Aug 02 4:00 PM
2020 Aug 02 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?
2020 Aug 02 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.
2020 Aug 04 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.
2020 Aug 04 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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |