on 2019 Jan 30 8:03 AM
Hi Experts,
I am trying to populate a list of employee ids in Content Modifier as follows and then writing it to a file on SFTP server,
11111
22222
33333
However, in the output file, it's displayed as,
111112222233333
Could you please help me understand how can we add a new line character in content modifier so that it's added in the file as well and every employee number appears on a new line?
Thanks in advance,
Netrey
Request clarification before answering.
You can handle this via groovy script
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message)
{
def body = message.getBody(java.lang.String) as String;
body = body + "\n" ;
message.setBody(body );
return message;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh,
Thanks for your response. The employee IDs here are not hardcoded text but an expression like ${property.emp_id}
Moreover, I am adding one employee at a time to the file. For example, every execution of iFlow appends an employee id in the same file. Hence, for each employee id to appear on the next line, I tried to add a new line by <enter> key, added '\n', added a space after employee id on a new line. But it seems that content modifier treats these characters as a white space and trims those. I hope the issue is more clear now.
Regards,
Netrey
User | Count |
---|---|
53 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.