Monday, 6 April 2020

Standard Character encoding change in SAP CPI

Standard Character encoding change like UTF-8 or different ISO standard formats.

Groovy script:

import com.sap.gateway.ip.core.customdev.util.Message

import java.nio.charset.StandardCharsets

def Message processData(Message message) {

def body = message.getBody(java.lang.String)

message.setBody(body.getBytes(StandardCharsets.ISO_8859_1))

return message

}



No comments:

Post a Comment