Runtime value mapping

hey ,
The requirement is like  a record is being accessed from the database through a JDBC adapter into XI.In the record there are different fields concatenated as a string and these fields are to be mapped to the target side i.e Idoc which can be done by extracting the fields according to the length using substring function.Now, some src fields say   "code" "sign" "cause "
are having some combination of values and these combinations are deciding the value of other fields Mv_TYP  MV_REAS COSTCENTER  GM_CODE MVT_ IND
in the Idoc .i.e runtime value of these three fields is deciding the value of other fields in the Idoc.
e.g
Source                   
Description  Sign  Cause Code
1PO/STO            +   1     none
2rvrs PO/STO   -   1     none
3returngoods   +   1     none
4RevrsRtrnGoods     -  1     none
5RvrsScrap     +  1     none
6Qty2Qlty     -  6     none
Corresponding target
Mv_TYP  MV_REAS COSTCENTER  GM_CODE MVT_ IND
101     none               01     B
102     none               01     B
202     1072     511100          03
201     1072     511100          03
552                    03
322     none               06
How to do the value mapping so as to have the runtime value of src in the target fields in the Idoc

Hi Indu !
If your mapping values are fixed, and a few, you can put them manually in the Integration Repository, using the standard FixValues function within graphical mapping.
Otherwise, you can use the ValueMapping standard function of graphical mapping to access Value Mapping Groups (loaded by hand or dynamically) in Integration Directory.
If this kind of value mapping doesn't fit your requirements, you can call an RFC or JDBC query via an UDF to query an external data source to map src values to target values.
Regards,
Matias.
ps: please award points if helpful.

Similar Messages

  • Value Mapping Replication Inbound Structure

    Hi All,
    I am using Value Mapping Replication to upload Value Mapping Table in runtime cache, to do this first i create value mapping manually in ID with source and target.
    Source:Agency : ValCustomerNo_B
    Schema : ValB
    Value : xxx
    Target:Agency : ValCustomerNo_J
    Schema : ValJ
    Value : yyy
    Now try to upload 1800 record in the same value mapping table through Value Mapping Replication. Inbound structure looks like this.
    <?xml version="1.0"?>
    <ns1:ValueMappingReplication>
         <Item>
              <Operation>Insert</Operation>
              <GroupID>f16372c043bd11dea79f001558c985eb</GroupID>
              <Context> http://sap.com/xi/XI</Context>
              <Identifier scheme=" ValB" agency="ValCustomerNo_B">3DASDIG</Identifier>
         </Item>
         <Item>
              <Operation>Insert</Operation>
              <GroupID>f16372c043bd11dea79f001558c985eb</GroupID>
              <Context>http://sap.com/xi/XI</Context>
              <Identifier scheme="ValJ" agency="ValCustomerNo_J">1960452622</Identifier>
         </Item>
         <Item>
              <Operation> Insert </Operation>
              <GroupID>f16372c043bd11dea79f001558c985eb</GroupID>
              <Context>http://sap.com/xi/XI</Context>
              <Identifier scheme=" ValB " agency="ValCustomerNo_B">4CAHRJTN</Identifier>
         </Item>
         <Item>
              <Operation>Insert</Operation>
              <GroupID>f16372c043bd11dea79f001558c985eb</GroupID>
              <Context>http://sap.com/xi/XI</Context>
              <Identifier scheme="ValJ" agency=" ValCustomerNo_J">1960457894</Identifier>
         </Item>
    I do not know is this xml structure is correct for XI adapter to create correct rows in value mapping table or not?
    At runtime value mapping function in graphical mapping, for manually create record in Value mapping table is coming correctly where in case VM replication record it always map to one arbitrary number.
    Even when I look into runtime cache notification, manually created record comes in pair like..
    Agency : ValCustomerNo_B | Schema : ValB | Value : xxx | Group ID | Context
    Agency : ValCustomerNo_J  | Schema : ValJ  | Value : yyy | Group ID | Context
    Where as record for VM Replication comes in sequence first all ValB and then ValJ, they are not in pair
    Agency : ValCustomerNo_B | Schema : ValB | Value : xxx | Group ID | Context
    Agency : ValCustomerNo_B | Schema : ValB | Value : ppp | Group ID | Context
    u2026u2026.
    Agency : ValCustomerNo_J  | Schema : ValJ  | Value : yyy | Group ID | Context
    Agency : ValCustomerNo_J  | Schema : ValJ  | Value : aaa | Group ID | Context
    I suspect inbound xml structure is not correct for VM replication.
    With Regards
    Sunil
    Edited by: Sunil Pandey on May 18, 2009 7:40 PM

    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5  that should clear a lot of doubts

  • Value Mapping replication GUID Logic

    HI,
    We are doing Value Mapping replication from ECC table entries to Pi Runtime Value Mapping cache.
    We are generating the Group ID required for Value Mapping from ECC.
    Here we are confused with the logic for GUID Generation.
    At first I thought the driving factors are -- if there is already an entry for the same Source Agency, Source Scheme, Target Agency, Target Scheme and Target Value then it should go in the same group id, else a new gr id needs to be generated.
    However it looks like that is incorrect.
    Can somebody help us on what should be the logic for generating group id for Value mapping replication.
    We have the scenario where the same source Agency, Scheme ,Value maps to multiple target Schemes... and it is not working if we have different Group ids...
    Thanks,
    Himadri

    > We have the scenario where the same source Agency, Scheme ,Value maps to multiple target Schemes... and it is not working if we have different Group ids...
    If you want to have multiple targets, then you have create pairs with unique GUID
    like this:
    A - 1 GUID X
    A - 2 GUID Y
    A - 3 GUID Z
    The standard value mapping function does not work, when you have multiple targets. It will not return an entry.
    You have to create a UDF for this purpose. You need to identify which target do you want to select from different values.
    An UDF could look like this extract:
    IFIdentifier source = XIVMFactory.newIdentifier(source_context,source_agency,source_scheme);
    IFIdentifier target = XIVMFactory.newIdentifier(target_context,target_agency,target_scheme);
    IFRequest request = XIVMFactory.newRequest(source,target,sourceValue);
    try{
      IFResponse response = XIVMService.executeMapping(request);
      if (response.countTargetValues() > 0){
        String[] targetValues = response.getTargetValues();
    // take first value of result
         return targetValues[0];
    This example is taken from PI 7.1
    Edited by: Stefan Grube on Oct 22, 2010 9:32 AM

  • Accessing values during runtime in value mapping

    Hi all,
    We have a specific requirement , where in we have a set of fields coming from the source system. All the fields have values expect few. The few which don't have values are reserved for future use, and for each source field there is a corresponding target value and we need map them.
    We have used value mapping here, but it doesn't work for fields which don't have values.
    We have thought of  accessing the fields which do not have values, dynamically or at runtime by connecting the database of the source system.
    Is it possible to do this, if yes, please provide with your inputs and alternatives.
    thanks,
    younus

    Go through this:
    http://help.sap.com/saphelp_nw70/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    <b>To implement Value Mapping, following activities have to be performed:</b>
    <b>1.</b> Register Java Proxies. This is one time activity for each installation. Following URL has to be called for registering asynchronous replication scenario:
    http://<Server>:<Port>/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication
    <b>2.</b> Application Programming: ABAP program has to be written to perform following tasks:
    <b>a.</b> Read Value Mapping data from table.
    <b>b.</b> Call Outbound Proxy to push the data into a message to Integration Server.
    <b>3.</b> Configuration of Replication scenario in Integration Directory.
    Regards,
    Sarvesh

  • Accessing values in Value Mapping from JDBC database during runtime.

    Hi all,
    I have a query here.
    Actually we have to populate the value mapping from a JDBC database, I've gone through the blogs but all of them expalin the value mapping replication process where in SAP tables are the source and it includes ABAP programming, where as my source system is a JDBC database.
    Please provide me with the detailed steps to be carried out in IR and ID to accomplish this task.
    Thanks once again.
    Younus

    Hi Younus,
    search the blogs with "lookup". I guess you will find you solution.
    Regards Mario

  • How to read Group ID from Value Mapping Context in Cache Monitoring ?

    Hi friends,
        In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
        Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU....  For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code)  which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
        So, in essence, how to read the GUID from value mapping context.
        Friends, Kindly help me to do this.
    Thanks in advance.
    Jegatheeswaran P.

    Did you get the way to read group id?

  • Value Mapping in PI 7.1

    Hi All,
    Please tell me about value mapping.I have never worked on value mapping earlier.Please give me the steps to do value mapping.
    Thanks in advance.

    Hi Shweta
    Please see me answers below,
    1.Can we do the value mapping in Graphical Mapping?Is there any standard function available for that?If so what is it?
    Your question is not clear but I will answer both ways.
    If you are talking about create Value Mapping from the Integration Directory. Answer is yes. You can create value mapping groups there.
    If you are talking about using Value Mapping in the graphical tool. Answer is yes. You will only see results in runtime (up to PI 7.0). In PI 7.1 you can see results during development time, after some configurations.
    2.Do we need to maintain any value mapping table in ID?If so then where and how to create it?Where actually do we need to mention it?
    You can do it either in ID or you can upload your values into Cache via Value Mapping Replication. (Let's say in a massive way).
    In ID just create a new Value Mapping Group. That will create the values in Cache.
    In IR, in your mapping, use a ValueMapping object (found under Convertion Functions) and fill it in with the values used to create the object in the ID.
    I also have a document step by step for Value Mapping Replication if you want to.
    Good Luck.
    Luismier.
    Thanks in advance.

  • Value Mapping  and Lookups

    Hi all,
    I know something about Value Mapping.
    And I heard that the Lookups (DB and RFC) are types of Value Mapping.
    I am confused how value mapping is related to lookups.
    Request you all to provide me some information regd.this.
    Thank you.
    Regards
    Krishna.

    Hi,
    All the links above are quite useful in understanding Value Mapping and RFC lookups.
    Both solutions could be used for getting values from R3 tables at runtime. However, there's difference in way both operate.
    RFC lookup is performed at runtime, since it is executed from the UDF in message mapping. Thus at runtime, call is made to R3 table and value is fetched.
    In value mapping replication, Value Mapping program is run from SAP R3 and values from table are updated in XI Runtime Cache. Thus at runtime, while performing message mapping, call to R3 system is not made. Values are available in XI cache.
    Thus, it is quite obvious that Value Mapping is more performace efficient since it doesn't make a call to SAP R3 system for each incoming message. If the table data does not change very frequently(since for every change value mapping scenario has to be run for update of XI cache), and it is not very large, then it is a good option as compared to RFC lookup.
    However, in cases where either data is frequently changing in table or the volume of data is too large, RFC lookup should be prefered choice.
    Hope it would be helpful.
    Thanks,
    Bhavish
    Kindly award points if comments are useful

  • Fixed Values and Value Mapping

    Hi Experts,
         I hav a doubt regarding these to funnctions in Messege mapping. In both teh functions , we can change a value coming from Load to some thing else.
    Like
    A=1
    B=2
    C=8.
    The difference i hav noted is the in case of fixed values, we can assign the valsues in the messege mapping itself, and in case  of value mapping it is assigned in the value mapping table  in integartion directory, and thsi can be seen through  Runtime Workbench in Cache Monitering. . Apart from that there seems to be no big significat difference in the application .
    Pls correct me , if I ma missing out something.
    Pls tell me if both hav the same functionality, why were these 2 functions made , any 1 of them, preferably Value Mappimg Function could hav been enough.
    Regards,
    Arnab.

    Hi
    Fixed value mapping is Message mapping Specific
    But Value mapping allows u to create a Schema and group .
    Value mapping functionality will be well understood in large integration where many mapping programs using same conversions.
    Maintain advantage is maintance is easy with value mapping because if any chnages in value , just ID change is enogh no need to go mapping but this is not with fixed value
    For instance if u r using Fixed value in 50 mapping programs u need to change in all
    But if u r using Value mapping just one ID
    Which one u prefer
    all based upon u r landscape for mapping
    Srini

  • Value Mapping Replication Vs RFC Lookup API Usage Pros and Cons

    Hi Ananth,
       Looking at the options you have, Value Mapping Replication might be a better option, because, by going the second route, you are just trying to simulate how a Value mapping replication works in reality.
    But, when the VMR framework is readily available, why do we need to simulate it by using Java code?
    Moreover, the java code approach will be triggered as many times and the number of messages that are triggered VS the number of times the VMR tables in the Java Runtime gets updated only when there is an entry that is added/modified in the SAP side (Which i feel is less frequent than the frequency of the messages being sent through XI).
    Regards,
    Ravi Kanth Talagana

    Hi,
    There are more issues you need to consider here:
    1) Is this static data or will it change often (the lookup data);
    2) Wether it is a good approach to keep it in middle system? if so who takes the ownership of managing it i.e. update, delete etc from time to time
    3) The tables don't seem small to me for value mapping
    I am not a big expert but i am off the opinion going RFC way as it will keep loose-coupling in place.
    However your issue for not using graphical RFC is not true though, you can pass all your line items as a single object which means only making ONE single call to ECC and then get the return the same way. Think along the lines of internal table as an object
    regards,

  • No value mapping in Integration Directory, but they are in the cache

    Hi,
    I recently got acquainted with the fabulous world of value mappings in PI. Until now, FixValues did the trick for me, but now I have to modify the errors in someone else's work.
    I read this article:
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5&overridelayout=true
    and a bunch of other help.sap.com stuff and I still don't get a very specific thing in our system. When I check the cache from the runtime workbench, the values, agencies and what have you are all ok. However, when I go to Integration Directory, disregarding the fact that I don't have any values on the search helps for Agency and Scheme, which is quite weird, when I put the correct Agencies and Schemes, I don't get any value displayed, just blanks.
    Why does this happen? Is it something wrong in the PI configuration or something that I don't see any value mapping there, altough they are in the cache?
    Thanks in advance and best regards,
    George

    Hi ,
    1. Create Value Mapping directly in ID (this cannot be seen in RWB, it can be only seen in ID)  
        *Just a corection we can see the value mappings created in Integration directory in RWB in cache monitoring.*
    Just follow these steps to refresh your cache. you will no longer be able to see deleted Val mappings and newly created entries will also shown immediately.
    1) Go to integration builder -- > Administration  --> click on Runtime tab --> cache overview
    You will find 2 things over there :
    Value Mapping Group Cache
    Value Mapping Value Cache
    Refresh both of them. I hope it will work as it always work for me :).
    Thanks
    Inder

  • Accessing Party identifiers using value mapping

    Hello
    Does anyone know if it is possible to access identifiers defined under a party using a value mapping (in my case from an xslt mapping calling a java function, but it doesn't really matter I guess).
    For party ADVDENV_US I have the following identifiers:
    http://sap.com/xi/XI    XIParty    ADVDENV_US
    INTERNAL                 GLN       1806367142
    At runtime I have value 1806367142 and I would like to retreive the value ADVDENV_US in order to perform dynamic receiver determination... would that work?
    Thanks
    Greg
    Edited by: Grégory VIAL on May 19, 2008 8:06 AM

    Grégory,
    If you wish to use identifier during the java mapping then check in below mention value mapping java docs.
    https://help.sap.com/javadocs/NW04S/current/pi/index.html
    Gaurav Jain

  • Accessing ID Value Mapping table in XSLT

    Hi Experts,
    In the XSLT mapping,I would like to access my value mapping table which i defined in ID .The purpose of ID value mapping here is, the table entries will be changing in future and i don want to use fix values, XML table  which is defined in runtime.
    I have gone through the blog
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    which explians design value mapping table in XSLT.
    Is there any way to access Configuration Value Mapping table in XSLT? If yes, can you explain how should i achieve it ?

    Hi,
    you can use the xivmService to call ID val map tables.
    Use tha java function executeMapping, Its a standard SAP api.
    Declare the Service in XSLT at start
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vm="com.sap.aii.mapping.value.api.XIVMService" version="1.0"> 
    Call the val mapping table using below template wherever required.
    <xsl:template name="ValueMapping">
    <xsl:param name="SenderParam"/>
    <xsl:value-of select="vm:executeMapping( 'SenderType', 'SenderTypeSchema', $SenderParam, 'receiverType', ReceiverTypeSchema')"/>
    </xsl:template>
    Call template like :
    <xsl:call-template name="ValueMapping">
    <xsl:with-param name="SenderParam">
    try it and let me know if you have any doubt.
    regards
    Inder
    Edited by: Kulwinder Grewal on Aug 12, 2009 11:36 PM

  • Value mapping replication - java cache

    i used value mapping replication and successfully loaded values to the java cache (i can see the in the cache monitoring but not in  the configuration).
    when i try to use a scenario with value mapping using the agencies and schemes which i loaded, the mapping doesn't work and i receive the same value that was entered.
    what could be the problem?
    P.S
    i used the same groupid for each pair of source and target value when i loaded them. is that the right way?

    Tomer,
    what is the context that u used. Did you give the correct context in mapping as in Runtime Cache.
    Regards,
    Sudharshan N A

  • How to achieve transport of value mapping replication cache table values ?

    During the migration of our interface from XI3.0 to PI 7.11,
    I need to transport the value mapping replication cache table values present in cache monitoring of runtime workbench in
    XI 3.0 PRD  to PI 7.11 DEV .
    Please let me know the ways to acheive this so that I can have the same values present in PI 7.11 Value Mapping Cache table as maintained in XI 3.0.
    Please point me into correct direction.
    Regards
    PS

    Click on "Tools" option, select "Export Configuration Objects" -> "Individual Objects" -> Choose the "Value Mapping Group" type, and then select the value mappings you want to transport.

Maybe you are looking for

  • How can we increase the maximum number of records which we export from UME

    Hi All,          Is there any way to increase the maximum number of records which we can export from the UME. Please give your valuable suggestions as soon as possible. Thanks in Advance Regards, Ramalakshmi.S

  • Adobe Bridge Missing

    Hello all, I have Master Collection and up till recently had Adobe Bridge installed. I say up till recently because It's been on my machine for a while now, then a few days ago I installed Premier Pro to my system and now bridge is MIA. I can see in

  • MM module,Purchase order

    HI experts, I can call 'BAPI_PO_GETITEMS' to get all items in a PO#. Now I have some question. 1. I can get vendor number (HEADERS-VENDOR). how to get vendor name? 2. I get some articlenum in that PO#. Now I want to get UPC/pack/size of every article

  • Recapturing footage outputted through Adobe

    Back in the day, when I used to export 24p widescreen footage off of CS3 through firewire (export to tape) onto a mini dv tape, it played fine and still does.  But for some reason it won't let me recapture it without playing back scrambled or sometim

  • AD Login Freezes

    I'm hoping this question gets better results than a previous thread I was looking into. We have an iMac running OS X 10.7.3, 3.1 GHz Intel i3, and are having an issue with one specific AD account getting logged into it.  Every other AD account we've