Hi Experts,
As we have the option to get/read the values of header and properties in the Message Mapping using Groovy Scripting, as mentioned in this BLOG
Is there any option, using which we can create/set the headers and properties in Message Mapping in Cloud Integration?
Regards,
Aayush Aggarwal
Request clarification before answering.
Hi Aayush :
1. Open your mapping and click on create:

2. Add the below sample code :
import com.sap.it.api.mapping.*;
def String customFunc1(String P1,String P2,MappingContext context) {
String value1 = context.setHeader("Myheader",P1);
String value2 = context.setProperty("MyProperty",P2);
return "";
}
3. Add the newly created script in the mapping editor and assign the source/target field.

4. Result

Thanks,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It worked. Thanks.
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.