on 06-17-2016 2:28 PM
Hi!
I need to concatenate some element and special character "Line feed" (the same as \n in Java).
Is it possible to put this symbol as an entering value to Concat function using "Constant" in graphical mapping?
I mean entering symbols somehow using their ordinal numbers, 10 (or 0A) in this particular case.
I use SAP PI 7.4 single stack.
Best regards,
Andrey Petin
Hi Andrey!
Did you try to do it with java code in UDF?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First ask yourself or tell us why do you need to do it?
Some times the right place to add it is in the receiver adapter as a module parameter.
What exactly is your scenario and what is your requirement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nimrod.
It is an IDoc to Message Type mapping.
We have to concatenate some lines from different IDoc segments and use separator depending on some value.
I mean, we have to use space delimiter if a value "*" comes and a line feed (break) delimiter if a value "/" comes.
So I use Fixed Values function for this case, and "*" is mapped to space, and "/" has to be mapped to character number 10.
Hi Marc.
IDoc definition and filling is developed by other team, I can not change anything there.
As for now, I wrote an UDF which converts char number to the char itself (Fix Values function converts "*" to 32, "/" to 10, and my UDF returns char with the corresponding number).
I just want to know whether I may use something like, maybe, &10 or &32 in Fix Values of Constant elements to define character with this number.
It is now like this.
IDoc gives me segments with data:
<E1BPE1MLTXRT SEGMENT="1">
...
<TEXT_LINE>Text1</TEXT_LINE>
...
</E1BPE1MLTXRT>
<E1BPE1MLTXRT SEGMENT="1">
...
<FORMAT_COL>/</FORMAT_COL>
<TEXT_LINE>Text2</TEXT_LINE>
...
</E1BPE1MLTXRT>
<E1BPE1MLTXRT SEGMENT="1">
...
<FORMAT_COL>*</FORMAT_COL>
<TEXT_LINE>Text3</TEXT_LINE>
...
</E1BPE1MLTXRT>
The final string has to be:
Text1<break>Text2<space>Text3
I use this mapping:
FixValues here transforms "*" to 32 and "/" to 10.
After that my UDF "getCharByNumber" transforms char code to char itself.
After all (not shown here) all strings are concatenated into one final string by another UDF.
I think I could omit the getCharByNumber step if it was possible to put the symbol itself in FixValues (<10> or &10 or :10 or whatever).
Hello Andrey,
What exactly is the special code to be appended?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.