on 2020 Sep 10 8:59 AM
Hi,
Do you know where to find how to use regex expressions in the attributes-to-sap.xml or attributes-from-sap.xml? I want certain values which has decimal numbers to be converted to whole numbers.
If anyone could help me get started I would appreciate!
Regards, Danny
Hello Danny,
you have to use <REPLACE> tag for it.
take a look into operations guide, chapter 4 ATTRIBUTE TRANSFER BETWEEN THE SAP SYSTEM AND AN APPLICATION (or just search for string <REPLACE> in the document)
there are some examples too.
pattern should be a regexp which is supported by java RE (which is using PCRE syntax)
you can test your regexp using https://regex101.com/ (choose PCRE under "FLAVOR")
With kind regards,
Waldemar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Waldemar,
tried it with this:
I want to eliminate all decimal places in the values
<REPLACE pattern="^\d*" global="false"> <br> <DIR_CLS ..../>
</REPLACE>
But it did not work, any other thoughts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.