Value mapping with 1000 fields?

Hi
We are having 1000 fields and trying to map using value mapping,
How to map these 1000 fields automatically without entering manuvally using value mapping?
thanq
krishna

HI krishna,
I would prepare a csv with key values and upload them in "imported archive".
Now in message mapping create UDF and read the imported archiv:
try {
     InputStream fstream = this.getClass().getClassLoader().getResourceAsStream(fileName);
     DataInputStream in = new DataInputStream(fstream);
     BufferedReader br = new BufferedReader(new InputStreamReader(in));
     String strLine;
     // Read File Line By Line
     while ((strLine = br.readLine()) != null) {
          String ValueLeft = strLine.substring(0, strLine.indexOf(";"));
          if (WertLinks.equals(key)) {
               return (strLine.substring(strLine.indexOf(";")+1, strLine.length()));
          }//if
     }// while
     // Close the input stream
     in.close();
     return "no Value found; check CSV : " + key;
} catch (Exception e) {// Catch exception if any
     return "Error: " + e.getMessage();
The import-paremeters for UDF are:
- key
- fileName
Regards Mario
Edited by: Mario Müller on Apr 24, 2008 8:27 AM

Similar Messages

  • Domain Value Mapping with Text file

    Hai,
    I have done the Domain value mapping with the xml file to xml file and it is working fine.
    But in the case of Text file to Text file it is not working i.e. If the citiname is the
    first field it is domain value mapping and working fine.
    INPUT:
    Erode, Mahes, 22
    Coimbatore, Veera, 22
    OUTPUT:
    ED, Mahes, 22
    CBE, Veera, 22
    But if I change the Citiname to the second column it is not working the problem is
    it is not working for subsequent columns.
    INPUT:
    Mahes, Erode, 22
    Veera, Coimbatore, 22
    OUTPUT:
    Mahes,, 22
    Veera,, 22
    The input Text files are delimited by "comma" and optionally enclosed by "space".
    Does anyone have attained the DVM in the Text file successfully.
    Please help me.

    Thank you for the reply Abhi
    Text to Text means instead of giving the input file as XML file i am giving the input as a simple .txt file and I also want the output in the .txt format.
    For the text file only it is not working fine in the xml file to xml file it is working fine.
    For your another query I am not providing the correct parameters for "lookup-dvm"
    I am giving the xsl file
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="TextInput1.wsdl"/>
    <rootElement name="Root-Element" namespace="http://TargetNamespace.com/TextInput1"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="TextOutput1.wsdl"/>
    <rootElement name="Root-Element" namespace="http://TargetNamespace.com/TextInput1"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [TUE JUL 15 15:31:55 IST 2008]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:imp1="http://TargetNamespace.com/TextInput1"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/TextInput1/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/TextOutput1/"
    exclude-result-prefixes="xsl plt pc ns0 jca imp1 tns hdr ns1 bpws ehdr hwf xp20 xref ora ids orcl">
    <xsl:template match="/">
    <imp1:Root-Element>
    <xsl:for-each select="/imp1:Root-Element/imp1:Leaf-Element">
    <imp1:Leaf-Element>
    <imp1:C1>
    <xsl:value-of select="imp1:C1"/>
    </imp1:C1>
    <imp1:C2>
    <xsl:value-of select='orcl:lookup-dvm("Citinames","Long",imp1:C2,"Short","")'/>
    </imp1:C2>
    <imp1:C3>
    <xsl:value-of select="imp1:C3"/>
    </imp1:C3>
    </imp1:Leaf-Element>
    </xsl:for-each>
    </imp1:Root-Element>
    </xsl:template>
    </xsl:stylesheet>
    Here I am checking the DVM function for the Second column and it is not working and I have given their Inputs and Outputs in my first message .
    I have another question as you told both import and export of the DVM is always in the XML format only so I have a doubt whether the lookup-dvm will be working for xml files only and not for text files.
    But in my case in text file it is working for the first column but not in the subsequent columns.
    Thanks.

  • Value mapping with BPM

    Hi Experts
    How to do value mapping with BPM.
    I tried searching for blogs in SDN but i didnt get any solution
    Regards
    Sowmya

    Hi,
    Your question is not very clear. Let me know how you want to use Value mapping?
    You can implement value mapping in two ways..
    1. Value Mapping Replecation Method, in which we create ABAP program (outbound proxy) in R3 which selects data from R3 tables and sends into XI, and which get stored in XI JAVA Cache untill you run the ABAP program next time which is very rare. This kind of method is best when you have large amount of R3 data.
    2. If you have some data which is used just to varify the conditions at run time then in that case we go for Value Mapping creation in Integration Directiory. Below mentiond blog will give an idea how to use Value mapping in ID.
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    Value Mapping is used in Graphical Mapping which gives the value at run time only, so you cannot test it in TEST Tab of message mapping.
    So as per you question, BPM can come into picture later on after you maintain the value mapping in ID and do the corresponding mapping in IR.
    Regards,
    Sarvesh

  • Value mapping with 100's of values then what to do.?

    Hello Experts,
       VALUE MAPPING is fine with 10 - 30 values that we can achieve by manual entry, but what to do if the values are about 100 - 200.?
      Kindly help me in this regard.
    Thanks in advance.

    I had this issue before. I entered 3-4 values and then exported the map as .mte. Edited the .mte file to populate the rest of the values & then re-imported it...
    XI: Mapping Tool Exports
    /people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
    Regards,
    Siva Maranani

  • Value mapping with some return values

    Hi Experts,
        I  am facing value mapping problem.
    My requirment was My source elemnet having 4 value mapping(Key and Values)  and also if not passing that 4 keys also it will  display same thing in my reciver.
        Can Anybody please suggest me how can i handle this situvation.
    (01 02
      02 03
    04  05
    06   08)
    this are the value mapping  .out of this if iam passing any like(00  it will goes to dn field).This is my requirment.Can u please let me know  how can i handle tthis.

    Hi,
    For you Requirement Please use  USE key option.
    In graphical mapping when you will select valuemapping function then you can see the
    "Behaviour if lookup fails " option
    Double click on the value mapping function to see this options.
    There 3 options for lookup fails:
    1)USE KEY
    2)throw Exception
    3)Use default value
    you can select use key for your requirement.
    If you pass 00 as input to value mapping and it unable to find any value in value mapping for 00.
    then it will pass 00 to the targhet without any conversion(in case of use key option)
    If you pass 01 then it wiill do value mapping and send 02 to target.

  • XML Mapping with B1 Field

    Hi Expert,
    can anybody know how to identify / map the xml document with b1 field. I did not found any link / documentation on this.
    Thanks,
    Tushar

    Hi Tushar
    You will need to be more specific. Do you want an XML layout to use for importing or exporting SAP Business One objects? Maybe give us details of the specific object. Most DI API objects have a write to XML which will give you the layout for that object. You can also refer to the REFDI.CHM file under the SDK Help folder.
    Kind regards
    Peter Juby

  • Mapping with source fields

    We are having characteristics keyfigures in SAP BW.We have to identify these fields in R/3 i.e. source fields and source tables.But we are unable to match some keyfigures and characteristics in R/3.What approach we have do.Mean if we are unable to find some characteristics and keyfigures in R/3 what we have to do and how to we mapping?what extraction we have to take?what approach we have to do

    Hi Sam and Ramesh,
    These reports are coming to Portal via Bw only.
    And we dont have access other client (X client) BW systems and they are not giving design document also.They are giving only R/3 sytem copy and we are able to see reports in web based portal.Based on Portal reports we identified Characteristics and Keyfigures.And some characteristics and keyfigures we are mapped with R/3 source fields and Source tables.And these are not standard reports and all are custom report.And there is no use of businee content.Based on these information we have to develop reports from scratch mean from starting i.e. identifying KFs and char's and mapping fields with R/3 here I have doubt we are unable to map some fields with R/3 what we have to do?what approach we have to take.How we identify datasource.what extractor method we have to follow.
    Please give ur suggestions.What we have to approach

  • Explian value mapping with a scenario.

    Hello Guru's,
         I have seen the material which defines VALUE MAPPING and VALUE MAPPING GROUP. But i am not able to implement in the scenario. ( please don't  ask which secnario )
         Can any one please give me the scenario which uses VALUE MAPPING  and VALUE MAPPING GROUPS.
    Thanks in advance.

    Hi,
    Refer this [How to Perform Value Mapping u2013 A Walkthrough|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5].
    Thanks,
    SaNv...

  • How to change list of values associated with a field using Personalization?

    Hi,
    We are using the standard Oracle TeleSales ASTCDDTL.fmb form 12.0.6 version. In that form, a field called "Type of School" is associate with the look up "HZ_TYPE_OF_SCHOOL". Now we need to customize the field to list down our list of countries (list of countries through a query of value set). Is there any way in Form Personalization we can achieve this? i.e changing the already associated look up type to a query or a custom value set?
    Appreciate your help on this!
    Thanks!
    Nithya

    959061 wrote:
    Hi,
    We are using the standard Oracle TeleSales ASTCDDTL.fmb form 12.0.6 version. In that form, a field called "Type of School" is associate with the look up "HZ_TYPE_OF_SCHOOL". Now we need to customize the field to list down our list of countries (list of countries through a query of value set). Is there any way in Form Personalization we can achieve this? i.e changing the already associated look up type to a query or a custom value set?
    Appreciate your help on this!
    Thanks!
    NithyaPlease see old threads -- https://forums.oracle.com/forums/search.jspa?threadID=&q=LOV+AND+Personalization&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Drill Across fields mapping with calculate field

    I create a calculation field in one view, then when config drill across, i set the calculation field to mapping to a Parameter of target view
    Save report
    Then, i open the report in view mode, click the view which config drill across, it get JavaScript error in DrillAcrossModifierManager.js line 272, Object required

    Hi,
    I'm using BAM 11.1.1.4, and I have a report wich calls another report through DrillAcross.
    Both reports have no calculated fields and I am receiving the same error message:
    Mensagem: object required
    Linha: 273
    Caractere: 5
    Código: 0
    URI: http://server:9001/OracleBAM/13846/reportserver/scripts/drilling/drillacross/DrillAcrossModifierManager.js
    Any idea about the cause of this error?
    Thanks.
    Luciano Gomes

  • ABAP Mapping with Value Mapping

    Hi folks,
    Anyone knows if it is possible to query a value mapping table inside an ABAP mapping?
    Thanks in advance,
    Ricardo.

    Hi Bhavesh,
    Thanks for your prompt answer.
    I’m already using the Value Mapping with Master data Replication on several graphical mappings. Unfortunately, some changes happened for one mapping program, the complexity increased and the graphical mapping doesn’t fulfill these new requirements. So, I thought to use ABAP mapping, because is a language that I know well.
    I understood your concern; we are talking about two levels, ABAP and Java stack. It will be needed a call from ABAP stack to Java Stack, but maybe there is an API for that? But, about system performance, I guess Value Mapping its better then RFC lookup, right?
    My mapping problem is: I need to generate two nodes (not a field) every time the code “MODI” (modification) comes in a source field. Inside these two nodes, I have to fill a field, into first node, with an old id and for the second node with the new id.
    I can’t found any standard function to fulfill this requirement. Maybe this is easy with UDF, but I’m not filling comfortable with Java and I don’t know how to do it. If you know, please let me know.
    Thanks in advance.
    Regards,
    Ricardo.

  • Problem in value mapping in POSDM configuration!

    Hi Experts,
                              I am sending data from POS to POSDM. I hav used standard name spaces like GM store Connectivity, BI and Store Connectivity 2.0. I hav also done settings in ID . Made a File adapter and RFC adapter and RD, ID, SA and RA settings.
    Data from Sourse: GMTLogTransaction_out is going to the RFC :/POSDW/CREATE_TRANSACTIONS_EXT  .
    So I hope users can Understand I hav used standard mapping.
    Now the issue is in the source structure a perticular field called TENDER ID is mapped with Target Field :Tender Code.
    But there is a value mapping in between.
    The name of the source Agency is IXREtailPOSLogRetailTransactionTenderID  and schema is IXRetailPOSLogRetailTransactionTenderIDSchema  and 
    The name of the Target  Agency is POSDWTENDERTYPECODE  and schema is POSDWTENDERTYPECODESCHEMA.
        And the Value mapping Context is : http://sap.com/xi/XI.
    The problem is I can see this , but I cant assign any value as it is in disabled mode in Messege mapping.
    Again In the ID I cannot see this Value mapping , which I expected to see and maniputale.
       experts, please tell me hw to I use this  manipulate / incert some values so taht the input when 01 becomes 3101 at output.
    If any doubts/ querioes, pls revert back.Please note , I am using all standard components in IR.
    Regards,
    Arnab .

    Hi Arnab / Abhijith,
    I am also going to work on the similar kind of requirement which u guys  have worked.
    Pos( third Party)->PI>POSDM-->IS-Retail ( Inbound)
    IS-Retail-> PI->POS( third Party) ( Outbound)
    Appreciate if you could help me with some clarifications..
    1) What transactions we can update to POSDM..?
    2) Does we need to POST all POS transactions first to POS DM and then IS-Retail ( Inbound).?
    If that is the case, once transactions posted in POSDM, does we need to do any settings to post idocs automatically to Retail system .. (OR) do we need to develop interface again from POSDM>PI>IS-Retail.( please clarify).
    Please suggest .. is it feasable to post only Non aggregated data directly to POSDM and Aggregated Sales ,FI , GRNs to directly to ECC.( Based on client requirement ).
    Awaiting for your suggestions.. Please suggest the best appraoch
    Thanks & Regards,
    Suman

  • XSLT call Value Mapping

    Hi Folks,
    please, i need a step by step Solution for calling Value Mapping with XSLT Mapping Program.
    best regards Michael

    XSLT call Value Mapping
      Maintain the value mapping using the option available in the Integration directory. The following values should be entered for maintaining the value mapping. In the XSLT Mapping use the Java function “Valuemappingaccessor”  to read the values from the table.
    Class ValueMappingAccessor
              This class is used read the Value mapping stored in the Integration server (Java Cache). Class has a method getValueMapping. The Class is imported into the SWC Eyyy_xxxx under namespace “http://xxx.ash.com/COMMON/Common”
    Method public static String getValueMapping(String srcContext, String dstContext, String srcAgency, String srcSchema, String dstAgency, String dstSchema, String key, Map inputParam, String throwException)
    Paramters     Description
    srcContext     Source context in the Integration server (Java Cache) under which, the value is stored.
    For example, if the source values are stored using standard Value mapping table in the ID, then use source context as http://sap.com/xi/XI
    dstContext     Destination context in the Integration server (Java Cache) under which the value is stored
    For example, if the source values are stored using standard Value mapping table in the ID, then Target context as http://sap.com/xi/XI
    srcAgency     Source Agency,  a unique identifying value,  value to be used is not yet decided.
    srcSchema     Source Schema, For example this can be source field name
    key     Source field value, that is required to determine the target, In the figure 1 shown below, We need to send ‘IN’ to get ‘India’
    dstAgency     Destination Agency, a unique identifying value, value to be used is not yet decided
    dstSchema     Destination Schema, For example this can be target field name
    inputParam     Mapping transformation constants, to write the trace into the header of the message
    throwException     An indicator to throw an exception, if the value is not found in the cache. If the parameter is set to “true” or “TRUE”,   an exception is raised & message fails in the mapping step of the Pipe line.
    Returns the value, that is stored in the Value mapping context for the given parameters
    If the value mapping is maintained using Integration Directory value mapping, then we need to call the value mapping function as follows
    If  it has to be called using XSLT Mapping., then the sample code shows how to use the java class the java class “ValueMappingAccessor”.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.ashok.com/idoctofile/employee" xmlns:ValueMap="java:com.xxx.yyy.ValueMappingAccessor">
        <xsl:param name="CountryCode">
            <xsl:value-of select="ns0:MT_EMPDETAILS/Country"/>
        </xsl:param>
        <xsl:param name="inputparam"/>
        <xsl:template match="/">
            <ns0:MT_EMPADDRESS xmlns:ns0="http://www.ashok.com/idoctofile/employee">
                <EmployeeNo>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/>
                </EmployeeNo>
                <FirstName>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/FirstName"/>
                </FirstName>
                <LastName>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/LastName"/>
                </LastName>
                <Address1>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/AddressLine1"/>
                </Address1>
                <Address2>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/AddressLine2"/>
                </Address2>
                <City>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/City"/>
                </City>
                <State>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/State"/>
                </State>
                <Country>
                    <xsl:if test="function-available('ValueMap:getValueMapping')">
                        <xsl:value-of select="ValueMap:getValueMapping('http://sap.com/XI/xi', 'http://sap.com/XI/xi', 'Canonical','Country', 'KCRS', 'Country', $CountryCode, $inputparam, 'TRUE')"/>
                    </xsl:if>
                </Country>
                <ZipCode>
                    <xsl:value-of select="ns0:MT_EMPDETAILS/Zipcode"/>
                </ZipCode>
            </ns0:MT_EMPADDRESS>
        </xsl:template>
    </xsl:stylesheet>
    If the values are maintained using Value mapping replication technique
    Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 9:43 AM
    Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 9:44 AM
    Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 10:06 AM

  • Value mapping in file

    Hello,
    I've a interface RFC to File (.txt).
    The name file is dynamic. In message mapping we have a target field only for file name (i haven't can mapiing with other fields because all target fields are mapping with source fields).
    My problem is file name appears in content of file and i don't want this.
    What can i do?
    Thanks very much.

    Hi dear,
    Use the Dynamic config. method because I also faced this prob in variable substitution method.
    Use the UDF in mapping as shown here.
    public String Set_Output_File_Name(String var_Filename, String var_Directory, Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key, var_Filename);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");   
    conf.put(key1, var_Directory);
    return  "TRUE";
    Here var_Filename = Pass Filename from the source field
    var_Directory = Pass Directory name from the source field
    In Mapping:-
    output of this UDF is to mapped with one of the Target field say(TEMP) with occurce 0..1.
    since this UDF always return TRUE in the output so use the Graphical function 'equalsS' which compares the output of this UDF with  some value like '1234'. and then use the IF--without Else Graphical function and then map with the TEMP so it never be generated in the target message.
    Set the Adapter specific message attribute property for the File receiver adapter.
    Regards
    Jagesh

  • Value mapping in Syndicator

    Hi,
    I would like to syndicate my  source data to 3 remote systems.
    Could you please help me to how to value map for a field to 3  remote systems. like for the same field Phone if remote system ABC then it should P123 if remote system BCD then it should be H456 if remote system CDE then it should be K789.
    Could you please help in this regard.
    Thanks you in advance.
    Kiran.G

    Hi Kiran,
    As per your requirement
    like for the same field Phone if remote system ABC then it should P123 if remote system BCD then it should be H456 if remote system CDE then it should be K789.
    - What ever value you store in the field Phone in MDM  only that values will go to the remote system.So if your MDM data manger has P123 series under the phone field only this value can go to all three remote systems.
    - The purpose of the feature of multiple syndication to multiple remote sytems is in the case of consolidation of master records in case of duplicates.
    - When you merge records coming from 3 diff remote sytems into one record after identifying them as duplicate records
    ie for eg 1 rec is having phone P123 and the other is having A123 both are coming from 2 separate remote sytem as diff rec but in MDM they are identified as duplicate rec then we assign one of the phone number as global phone and this global info is syndicated to both teh systems.
    - For this in MDM syndicator you need to map two fields Remote key and value from source to destination
    - By doing this mapping the Remote system field will have the remote system name and the value will have the local phone number.
    What you want can be achieved using Assignment.
    maintain a field in MDM storing the remote system name and based on that name assign the phone key.
    Hope it helps
    Kindly reward points if found useful
    Thanks
    Simona

Maybe you are looking for