Skip to Content

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

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/api/package-summary.html

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jul 01 at 06:31 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Jul 02 at 02:06 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 03 at 08:57 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.