Skip to Content
0

HCP-IS Dynamic Value Mapping

Feb 22, 2017 at 10:45 AM

193

avatar image

Hi Everyone,

I wanted to check if it is possible to create a value mapping in HCP-IS where the Source Agency and Target Agency are identified at runtime rather than having to manually enter these at design time? I know this is possible in PI/PO but I cant get it to work in HCP-IS.

In my graphical mapping, I have tried using the standard Value Mapping function, from the drop down boxes, I tried setting the Source Agency as SenderParty and Target Agency as ReceiverParty. Also, in my iFlow, I have named my Sender endpoint the same as my Source Agency and Receiver endpoint the same as my Target Agency (as defined in the my value mapping). However this didn't seem to work.

Am I missing something here?

Thanks,

Krishneel

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
VishnuPrasath Dhayanithi
Feb 24, 2017 at 04:39 AM
0

In HCI message mapping, with standard "valuemap" function currently it is not possible to perform dynamic value mapping. However you could create a new custom groovy script function (in message mapping or in iflow script) and use value mapping API (refer documentation guide) to perform the same. Roughly the script function would like the one below.

import com.sap.it.api.ITApiFactory;

import com.sap.it.api.ITApi;

import com.sap.it.api.mapping.ValueMappingApi;

def String dynamicValueMap(String sAgency, String sSchema, String tAgency, String tSchema, String key){

def service = ITApiFactory.getApi(ValueMappingApi.class, null);

if( service != null) {

return service.getMappedValue(sAgency, sSchema, key, tAgency, tSchema);

}

return null;

}

Hope it helps :-)

Vishnu Prasath

Share
10 |10000 characters needed characters left characters exceeded
Krishneel Goundar Feb 24, 2017 at 10:10 AM
0

Thanks Vishnu, the code you gave worked fine :)

At runtime (in a groovy script) is it also possible to get the names of the Sender and Receiver endpoints?

Share
10 |10000 characters needed characters left characters exceeded