cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new line character in SAP CPI Content Modifier

0 Kudos
4,421

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

View Entire Topic
gsmohanbabu
Explorer

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;

}