on 07-24-2017 4:28 PM
Hello,
what would be the recommended option to retrieve a messageID in a custom function (groovy)?
Is there any documentation on standard methods that can be used in groovy script to achieve this?
Thank you for your help!
Hello Florian,
Below code will work for you.
import com.sap.it.api.mapping.*;
//Add MappingContext as an additional argument to read or set Headers and properties.
def String customFunc(String input_date,MappingContext context){
//Read property Value and store it in String
String propVal = context.getProperty(SAP_MessageProcessingLogID);
propVal_Str = propVal.toString();
return propVal_Str;
}
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
have you tried
String messageId = message.getPropoerty("SAP_MessageProcessingLogID")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, thank you for your reply. Just tried but get the following error message:
The root message is: Exception:[com.sap.aii.mappingtool.tf7.rt.BehaviorInvocationException: groovy.lang.MissingPropertyException: No such property: message for class: Script2] in class com.sap.aii.mappingtool.tf7.ScriptHandler method getMessageID
Any idea what is causing this error?
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.