on 07-23-2009 4:40 PM
Hi,
I found a topic that correspond to my requirement :
[Add carriage return in XML file|https://wiki.sdn.sap.com/wiki/display/XI/HowtoappendCarriageReturnintheendofeachtagofxml+file]
But i don't know where created this udf, which input parameter pass?
Thank you for your help.
Hi,
I think you can do this....
Follow my wiki [Java Mapping- Convert the Input xml to String |https://wiki.sdn.sap.com/wiki/display/XI/JavaMapping-ConverttheInputxmlto+String] to convert the xml to string using Java maping then pass this string field as an input to the UDF told in the wiki u were referning. This will insert a carriage reurn.. You can write this XML payload using Receiver channel with simple FCC.
~Sanv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
refer this blog[https://weblogs.sdn.sap.com/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help.
I work on your solution, it practically works. In the result instead to have < i have the character < ; .
Do you know how to solve it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frantzy,
The link does not give enough explanation. What I am assuming is if you have xml string in one field then if you need to add new line after each tag then you can follow that.
If you want a udf where you want to insert a new line use this udf:
Create a Value UDF with one input argument 'a' and name the udf as addnewline. Then add this code:
Imports: java.*;
String lines;
lines = "";
lines = lines.concat(a + '\n' );
return lines;
Then where ever you want a new line just add this udf in your mapping. If you want a new line for 10 fields then you can put in all the 10 fields.
Example:
Source field --> logic --> udf (addnewline) --> target.
So after logic if you have the value as 123 then in the target you will see 123 followed by a carriage return.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.