on 2022 Apr 12 9:19 AM
Hi There,
I have seen alot of examples of using the (com.sap.it.api.mapping.ValueMappingApi) class in groovy script, however I would like to be able to call a value mapping from javascript in an Integration flow in CPI.
Has anyone been able to do this and can perhaps share an example?
Request clarification before answering.
Hi Jaques,
this script has worked for me:
importClass(com.sap.gateway.ip.core.customdev.util.Message);
importClass(com.sap.it.api.ITApiFactory);
function processData(message) {
var sourceValue = message.getBody(java.lang.String);
var valueMapService = ITApiFactory.getService(com.sap.it.api.mapping.ValueMappingApi, null);
var targetValue = valueMapService.getMappedValue("sourceAgency", "sourceIdentifier", sourceValue,
"targetAgency", "targetIdentifier");
message.setBody(targetValue);
return message;
}
BR, Benjamin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jacques,
I have not tried it but class and methods will remain same for accessing value mapping API. Only code syntax will differ.
Please refer to link.
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.