#CPI #groovy #script t #customheader #sap #asapcpitraining
How to create a custom header in Groovy Script. How to use it for message based search in SAP CPI ? Check out in this video. Groovyscript code used is as below:
———————————-
Code
———————————
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message)
{
//Body
def body = message.getBody(java.lang.String)
def messagelog = messageLogFactory.getMessageLog(message)
messagelog.addAttachmentAsString(“IncomingMessage”,body,”text/plain”)
messagelog.addCustomHeaderProperty(“productId”,”12345″)
return message;
}
———————————
Like, Subscribe and Share if you learned from this video. Share your feedback and Comment for any other input you need.
LinkedIn – http://www.linkedin.com/in/sap-cpi-training
It is time to Upskill in SAP CPI – https://asapcpitraining.com/top-10-reasons-to-learn-sap-cpi
Courses –
https://asapcpitraining.com/sap-cpi-course
https://asapcpitraining.com/groovy-in-sap-cpi