cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert entries in Value Mapping Table at runtime using ValueMapping API ?

jegathees_waran
Active Participant
0 Kudos

Hi Friends

I try to find options how to insert entries in Value Mapping Table in Integration Directory using UDF. (If I use the SAP Standard ValueMappingReplication message type (from BASIS SWCV), I need to create a separate Message Mapping and Operation Mapping)

Reason is that from Main mapping, when I get "the value not found or null " from Value Mapping table (using ValueMapping Standard Function in Mapping) for the given key, in that case only I need to insert new entries in Value Mapping Table at run time.

Value Mapping API class

https://help.sap.com/doc/2f39047ed6b141cb83658041d2d4e029/7.5.12/en-US/PI/com/sap/aii/mapping/value/...

The standard class XIVMService has methods executeMapping. But, those methods to retrieve value for the given key from Value Mapping table. I could not find any methods to insert entry in Value Mapping table.

Could you please clarify ?

Thank you.

Regards,

Jegatheeswaran P.

Accepted Solutions (0)

Answers (3)

Answers (3)

jegathees_waran
Active Participant
0 Kudos

Hi Jens

Thank you for reply. I will check the possibility. If it is complex , then I will use RFC lookup to achieve this requirement. Thank you.

jegathees_waran
Active Participant
0 Kudos

Hi Jens

Thank you for your reply.

The blog in first point talks about SOAP Lookup. Here I can use Value Mapping API Class for lookup. This is not a problem.

The blog in second point talks about replicating records from ECC to PI Cache Monitor. This we already did and it works.

My requirement is similar as explained in 2nd blog but not from ECC table. Within Mapping itself, I need to execute DeleteContext Operation and then Insert Records into Value Mapping Table. (Same approach as explained in 2nd blog).

If you have any idea or any other way to achieve this, pl. tell me.

Thank you.

JaySchwendemann
Active Contributor
0 Kudos

Hi Jegatheeswaran,

maybe you want to convert this to a comment (if possible). See my comment to my answer for further details

JaySchwendemann
Active Contributor
0 Kudos

Never tried this, so take with grain of salt, but I'd roughly follow this approach.

Im assuming that you don't need the actual result being inserted at the very execution of the value mapping api but want to make sure that subsequent calls hit the newly created value mapping record

  1. Call a lookup service within your UDF --> https://blogs.sap.com/2013/08/07/how-to-soap-lookup/
  2. Have this lookup service be a value mapping replication service --> https://blogs.sap.com/2009/04/03/value-mapping-replication-scenario/

Cheers

Jens

JaySchwendemann
Active Contributor
0 Kudos

Hmm, I think (hope) my statements might be still valid, also the first blog

  1. You are within a mapping and withing an UDF
  2. You need to make changes to the Value Mapping Replication
  3. There's no API for Inserting or Deleting or Updating, only for Querying
  4. You will therefore need to use the Service (not the API) for Value Mapping Replication
  5. You call that service with a SOAP Lookup within your UDF according to your requirement (this is ugly cause you need to create a Soap Envelope by hand, but I haven't said this is a really beautiful solution 🙂 )
  6. You will probably not be able to directly query the changes you did with that lookup within the same mapping instance / UDF

Makes sense?

Cheers

Jens