Value Mappings and Mapping lookups?

Hi Experts,
I've came across a thread on SDN which is mention below.
value mapping
can anyone explain me what is value mapping and fix mappings and why we need them and wht is mapping lookups?
plz refer some weblogs which can explains in detail about  value mappings, fixed mappings and mapping lookups?
pts will b rewarded
thanks
Faisal

Hi,
Hope this information is useful to you..
Value Mapping Blogs.
/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
/people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
Mapping look up API
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/mapping%20lookups:%20RFC%20API.pdf
what is lookups
Lookups are used to identify / request the data from mapping , i mean interupting the process and looking for data which was stored in some where and get that data and comback to process and continue with that data.
why we can use for lookups.
We will use these type of lookups in Message mapping for refering DB Lookup for data base which is not SAP, RFC lookups for SAP data
Look up tables
In the error handling topic we have seen the different validations which need to be performed on file.
This can be done through Lookup.
Some use cases:
• Look up employee information.
• Lookup for raising an alert.
The purpose of the lookup may be:
• To perform application-level validation of the data, before sending it to the backend.
• To populate fields of the XML document with some additional data found in the backend application.
There are two ways in which we can do lookup:
• Call lookup method from GUI mapping.
• Call lookup method from XSLT mapping.
Some useful blogs...
/people/shabarish.vijayakumar/blog/2006/02/13/unable-to-open-iresrid-xipipi-71-updated-for-pi-71-support
Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Thanks,
Satya..
Reward points if it is useful..

Similar Messages

  • RFC lookup with context values importing and exporting

    Hi,
    Input parameters for my RFC Lookup:
             one simple field: Occurrence 1
             one table type: Occurrence N
    I am getting table values from RFC Lookup
    and I need to repeat all values in the target structure.
    I am not able to capture the all values in the mapping: Help needed.
    Ramesh

    Hi Ramesh,
    If you want to use the first output to be repeated in all your mapping, try using the UseOneAsMany tool in the Message Mapping.
    HTH
    Regards,
    Juan

  • Graphical message mapping examples for JDBC and RFC lookup

    hi, can any body provide me graphical message mapping examples for the "JDBC Lookup" function and "RFC Lookup" function?
    I'm now studying the graphical message mapping and want to try those 2 functions. thank you.
    I expect the examples to be simple enoung, not need to set up much.

    >
    Madhu_1980 wrote:
    > can u check this link:
    >
    > PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426  
    >
    > it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    May be I'm too foolish to follow those links, I got issues of each links.
    What I really want is an example from step0
    Swarup:
    Refer the Lookup document - Easy Lookup in Process Integration 7.1
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457
    The first step is "Create an RFC Enabled Function Module for look up", but where can I create the function module? Should I use ESB, IB? or use transaction 'SE11' ?
    Kulkarni:
    Very good links for RFC lookup with 7.0/3.0
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231&overridelayout=true
    At page6 "PI Development/Configuration", it saies "You are on the design maintenance screen in the Integration Builder.Expand the subnodes for the software component version for which you want to import interfaces".
    What is "design maintenance screen" ? My IB version is: Service Pack:08 Release:NW07_08_REL.
    When I open IB, it display a screen titled with "Configuration: Intergation Builder", I did not find "software component version" node on the left tree.
    Madhu_1980 :
    it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    The Prerequisites state:
    The JDBC channel to be used for the lookup must be configured and activated in the Integration Directory.
    The definition of the table used for the lookup must already be imported into the ES Repository as an external definition
    But I don't know how to create a JDBC channel and define the table.

  • Mapping Item value Default and incrementing it

    Hi all
    I am new to sap XI, i am doing  a file to idoc scenario,
    how to map default value( for eg 0001) to an item field and keep on incrementing it by the occurence of no items in my file structure?
    Full points are guaranteed .
    Regards
    Bhasker.

    Hi,
    Any default value can be mapped by using the constants in the graphical mapping.
    Is your requirement is to count the no of occurance of a field i.e. item and map it to the target field..?
    If so use this mapping..
    items(Source) -
    remove contexts(node function) -
    count (Statistic function) -
    item field(target)
    Thanks
    SaNv...
    Edited by: Sãnthosh Kûmãr  V on Jul 30, 2008 10:25 AM

  • Parse comma separated value and map with other table to get Name and change it back to comma separate.

    Hi,
    I have one existing view(with around 15 fields), in which I have to add few more fields from table called PI.
    Now these fields have values like (55C4444F-D83B-4F96-A011-367A3755BA6C , F52388E2-485B-49DF-8534-FDF46D23F59E , 722432E1-F063-4CBD-B83D-1B97836E82953) 3 values comma separated.(Sometimes only one value and sometimes 4 or 5 or 7-8 depend on user has entered
    on web page)
    Also I have another table called PHA and this tables has 2 fields Values and Name so I have to map this two tables based on VALUES fields and get Name from this PHA table and show in view and that also Comma separated.
    So basically I have to Parse the PI table's Values field 1st, map it with PHA table to get Name and then Make it comma separated in that existing view.
    To make fields comma separate I used below query,
    (SELECT DISTINCT SUBSTRING
                SELECT ','+ PI.[Name]  AS [text()]
                FROM [DB].[dbo].[Table] PHA1
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
                WHERE PHA1.PId =PHA2.PId and PHA1.CId = PHA2.CId
                ORDER BY PHA1.PId
                For XML PATH ('')
            ), 2, 1000) 
    FROM [DB].[dbo].[Table] PHA2
    Inner Join [cSharpSite_profiles].[dbo].[PetAllergies] PA
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
    ) [Name]
    Vicky

    Wait, this sounds wrong. You have a view where you group values into a comma-separated list. While that surely will make some purists cringe, I can see that it makes sense from a presentation perspective.
    But if you want to use these concatenated values as atomic values again, you should go back to the base tables and them from there. Building views on views may sometimes be a good idea, but if you are too keen on reuse you can cause a performance disaster.
    So do it right from the beginning.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Mapping Lookup and performance?

    Hi all,
    I'm thinking about using mapping lookup (JDBC)
    Does anyone have experience with the performance of this metod?
    would it be better to use the BPM?
    Thanks
    Thomas Nørmark

    hi,
    DB lookup in mapping will always be more efficient
    then the BPM but the questions are :
    - how will you see handle the errors in this?
    - you will not be able to see this query (in message monitoring - as you do in case of BPM
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Picking values from an http URL and mapping them to a SOAP receiver

    Hi
    I have a case, where I need to pick the two values "customernumber" and "pod" from this URL from a HTTP sender adapter https://xxxxx.xxxx.dk/ServiceName/valider?customernumber=&pod= 
    and place them in a SOAP request in a SOAP receiver adapter.
    What is the best way of doing this?
    BR
    MIkael

    Hi,
    Please go through SAP Help Doc LInk:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm
    Set flag ASMA, Apply URL Parametes in ID.
    Give Parameter 1 as customer (names as in URL)
            Parameter 2 as pod
    Access the values in UDF through configuration key. For Eg: if Parameter 1 then the value can be accessed through field URLParamOne.
    I never tried this before but I beleive it should work or throw aome light to you.
    Regards,
    Vineetha.

  • How to map lookup main table field in another main table using MDM 7.1?

    We created a new SAP MDM 7.1 repository with multiple main tables.  The first main table is called ProductMaster table which contains Products information.  The ProductCode is the primary key and the only display field for the table during data loading process. The second main table is ProductByRegion table which has a main table lookup field ProductCode and a RegionId field.  These two fields (ProductCode and RegionId) combine as the PK for this main table.  Both main tables have key mapping enabled. 
    I was able to load ProductMaster table using Import Manager.  But Iu2019m having trouble to load data into ProductByRegion table using MDM Import Manager.  Although I have met all the 5 requirements below (excerpted from MDM Import Manager Reference Guide P.222), the ProductCode wonu2019t show up on the destination value pane.  If I mapped all productCode to NULL field, ProductCode wonu2019t load.  If I u2018Addu2019 all ProductCode to Destination Value pane, the Import Manager added duplicated rows to Product Master table while only loading 1 record to ProductByRegion table.  I canu2019t get ProductCode show up in Matching Destination Field list.  When I checked ProductMaster records in MDM Data Manager, I right-clicked on one of records, chose Edit Key Mappings, it didnu2019t show anything.  However, if I right-clicked on one of those duplicated rows, Edit Key Mapping shows remote system and key correctly.
    Where did I do wrong?  How can I fix the problem?
    Thank you for help in advance.
    From: SAP MDM Import Manager Reference Guide:
    Mapping to Main Table Lookup Destination Fields
    Import Manager handles main table lookup fields (Lookup [Main])
    differently than other MDM lookup fields. Specifically, Import Manager
    does not display the complete set of display field values of the records
    of the underlying lookup table. Instead, the values it displays for a main
    table lookup field are limited by both the key mappings for the lookup
    table and the values in the source file.
    Also, Import Manager does not automatically display the values of a
    Lookup [Main] destination field in the Destination Values grid when you
    select the field in the Destination Fields grid. Instead, for a main table
    lookup field value to appear in the Destination Values grid, all of the
    following conditions must be met:
    u2022 The lookup table must have key mapping enabled
    u2022 The lookup field must be mapped to a source field
    u2022 The source field must contain key values for the lookup table
    u2022 The destination value must have a key on the current remote system
    u2022 The destination valueu2019s key must match a source field value
    NOTE ►► The current remote system is the remote system that was
    selected in Import Manageru2019s Connect to Source dialog (see
    u201CConnecting to a Remote Systemu201D on page 416 for more information).
    Vicky

    Hi Michael,
    Thank you very much for your response.  I'm new to SAP MDM, I need some clarification and help regarding your solution. 
    I did use two maps to load ProductMaster and ProductByRegion separately.  Here were my steps:
    1. create main table ProductMaster with key mapping enabled at the table level and set ProductCode as unique and writable once (primary key).
    2. create a map to load ProductMaster record from a staging table located an oracle database.  But Key mapping didn't show anything when I looked at them using Data Manager.
    3. create main table ProductByRegion with a lookup field looking at ProductMaster table.  This field and RegionId combines as a unique field for ProductByRegion table. 
    4. create a map to load ProductByRegion table.  But ProductCode records only shows on the source pane not destination pane and can't be mapped properly.
    My questions:
    1. How can I "Ensure that you add key mapping info for all ProductMaster records" besides enabling Key Mapping on the table level?
    2. How can I define a concatenation of ProductCode and RegionId as a REMOTE KEY"?
    Thanks a lot for your help!
    Vicky

  • XSLT and Java lookup cache

    Hi,
    I´m trying the "Easy RFC lookup from XSLT mappings using a Java helper class" article and I getting a weird problem.
    The result of the RFC lookup called inside the java class is maintained in a kind of cache and  I always get the same results independent of the parameters I use in the following calls.
    Just after calling a Complete Cache Refresh (SXI_CACHE) I got a new result to the lookup.
    If I call in the Interface Mapping Test option it runs fine. However, when I call it from my scenario (SOAP Adapter Sender) the first result of the lookup will be returned until a forced cache refresh.
    Any ideas?
    Thank you,
    Fabiano.

    Hello Fabiano,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • How to modify an EXTERNAL_TABLE and MAPPING using OMBplus

    I need to implement a QA--> Production migration technique using OMB+ scripting. We are using source safe for keeping the MDL files.
    As we have insufficient resources both environments are in the same database as different schemas. Configuration is as below;
    Source Schema: DWPROD_TST (test) and DWPROD (production)
    Target Schema: DWEXTRACT_TST (test) and DWEXTRACT (production)
    Source Flat File Module: DWEXTRACT_TST_INPUT (test) and DWEXTRACT_INPUT (production)
    Target Flat File Module: DWEXTRACT_TST_OUTPUT (test) and DWEXTRACT_OUTPUT (production)
    All schemas have their own locations and modules defined. Once a mapping is create in TST environment developers should check in the individual
    mdl files for the object they used for development. From is point the strategy I have follow is like below as I haven't seen a similar scenario before.
    I rename the mdl extensiton .zip. I unzip the file. I take the mdx file extracted and make a text based search/replace for all the test environment modules, locations... etc
    replacing them with production environment names. Then I run the OMB+ script below in order to import and deploy this object. This technique works for table and flat file object
    with slightly different OMB+ scripts. But I can not make it work for external tables and mappings and the reason that I can guess is the Configuration information of the Data File used
    as source for external table and target for the mapping I have developed. I can import the MDX successfully but cant deploy it. When i rigt click the mapping or the external file in OWB GUI
    and click on CONFIGURATION I can see that:
    For the MAPPING : Flat File Operator/(OperatorName)/Target Data File Location is still pointing to TEST environment even tough I have replaced all the TEST environment information with PRODUCTION.
    For the EXTERNAL_TABLE : Data File/(OperatorName)/Data File Location is still pointing to TEST environment even tough I have replaced all the TEST environment information with PRODUCTION.
    Is there any way to modify these LOCATION information for a MAPPING and an EXTERNAL TABLE OMB+. I read though all OWB+ scripting Reference but it sucks or I am so dumb.
    Or if you have an alternative solution for my problem I will be more then happy to read it.
    OMB+ Script for EXTERNAL_TABLE
    OMBCONNECT DWPROD/DWPROD@cakir:1521:orcl USE REPOSITORY 'OWBDB_SYS'
    OMBIMPORT MDL_FILE 'C:\\tfs\\stage\\externaltables\\XTRCT_XTRNL_INPUT_FILE\\XTRCT_XTRNL_INPUT_FILE.mdx' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'C:\\tfs\\stage\\externaltables\\XTRCT_XTRNL_INPUT_FILE\\XTRCT_XTRNL_INPUT_FILE.log'
    OMBCC 'MY_PROJECT'
    OMBCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWEXTRACT_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' ADD REFERENCE LOCATION 'XTRCT_DWEXTRACT_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWEXTRACT_LOC')
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWEXTRACT_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBCC 'XTRCT_DWEXTRACT'
    OMBALTER EXTERNAL_TABLE 'XTRCT_XTRNL_INPUT_FILE' SET REFERENCE DEFAULT_LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'TABLE_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE EXTERNAL_TABLE 'XTRCT_XTRNL_INPUT_FILE'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBCOMMIT
    OMBDISCONNECT
    OMB+ Script for the mapping
    OMBCONNECT DWPROD/DWPROD@cakir:1521:orcl USE REPOSITORY 'OWBDB_SYS'
    OMBIMPORT MDL_FILE 'C:\\tfs\\stage\\mappings\\XTRCT_PROTOTYPE_XTRCTFILE_000\\XTRCT_PROTOTYPE_XTRCTFILE_000.mdx' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'C:\\tfs\\stage\\mappings\\XTRCT_PROTOTYPE_XTRCTFILE_000\\XTRCT_PROTOTYPE_XTRCTFILE_000.log'
    OMBCC 'MY_PROJECT'
    OMBCONNECT CONTROL_CENTER
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWEXTRACT_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' ADD REFERENCE LOCATION 'XTRCT_DWEXTRACT_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWEXTRACT_LOC')
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWPROD_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' ADD REFERENCE LOCATION 'XTRCT_DWPROD_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWPROD_LOC')
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWEXTRACT_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWPROD_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_OUTPUT'
    OMBCOMMIT
    OMBCC 'XTRCT_DWEXTRACT'
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING 'XTRCT_PROTOTYPE_XTRCTFILE_000'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
    OMBCOMMIT
    OMBDISCONNECT
    Kind Regards,
    Emrah
    Edited by: cakire82 on Jul 29, 2009 12:57 PM

    If it helps, this is a chunk from a script I have which turned off the parallel loading hint on all targets in a given mapping which was required after we discovered that ANSI cross joins and parallel query do NOT work very well in Oracle 10.
    You can see that I OMBRETREIVE all table operators and then use a foreach loop to cycle through them.
    log_msg LOG  "Altering: $mapName"
    set tablist [OMBRETRIEVE MAPPING '$mapName' GET TABLE OPERATORS ]
    foreach tgt_tble $tablist {
        if [catch { set retstr [ OMBALTER MAPPING '$mapName' MODIFY OPERATOR    '$tgt_tble' SET PROPERTIES (LOADING_HINT) VALUES ('NOPARALLEL ("$mapName")')] } errmsg] {
            log_msg ERROR "Unable to set hint for table $tgt_tble of mapping $mapName "
            log_msg ERROR "$errmsg"
        } else {
            set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING '$mapName' ]
            if [omb_error $print] {
                 log_msg ERROR "Unable to create Deployment plan for '$mapName'"
            } else {
                  set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
                  if [omb_error $print] {
                      log_msg ERROR "Error on execute of Deployment plan for '$mapName'"
            OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
            OMBCOMMIT
    }Ignore the exec_omb function as this is just a wrapper I built for OMB+ commands.
    As to passing parameters, look into argc and argv:
    if { $argc > 0 } {
         set i 1
         foreach arg $argv {
              puts "argument $i is $arg"
              incr i
      } else {
         puts "no command line argument passed"
      }You can also write interactive scripts if you prefer too. From earlier in the script above which turned off the parallel hint:
    puts ""
    puts -nonewline "Which mapping do you want to set to NOPARALLEL? "
    set mapName [gets stdin]I've even done loops to allow the user to perform the operation on multiple mappings, and to use pattern matching to determine which mappings to alter:
    set doLoop "1"
    while { [string match "1" $doLoop] } {
        puts -nonewline "What mapping to reconfigure (use name of generated plsql package)? "
        flush stdout
        set mapName [ string toupper [gets stdin] ]
        puts -nonewline "What value do you want to set as the maximum allowed errors? "
        flush stdout
        set eValue [gets stdin]
        set mapList [OMBLIST MAPPINGS '.*$mapName.*']
        if { [llength $mapList] == 0 } {
           log_msg ERROR "No mappings matching search string $mapName"
        } else {
            foreach mName $mapList {
                 puts -nonewline "Update mapping $mName (y/n)? "
                 flush stdout
                 set doThisUpdate [string toupper [gets stdin]]
                if { [string match "Y" $doThisUpdate ] } {
                    if [catch { set retstr [ OMBALTER MAPPING '$mName' SET PROPERTIES (MAXIMUM_NUMBER_OF_ERRORS) VALUES ( '$eValue')] } errmsg] {
                        log_msg ERROR "Unable to modify max errors on Mapping $mName"
                        log_msg ERROR "$errmsg"
                    } else {
                        set print [ exec_omb OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING '$mName' ]
                        if [omb_error $print] {
                            log_msg ERROR "Unable to create Deployment plan for '$mName'"
                        } else {
                            set print [ exec_omb OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ]
                            if [omb_error $print] {
                                log_msg ERROR "Error on execute of Deployment plan for '$mName'"
                        exec_omb OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
                        exec_omb OMBCOMMIT
                } else {
                    log_msg LOG "Skipping update to mapping $mName"
        puts -nonewline "Do Another? (y/n) "
        flush stdout
        set doAnother [gets stdin]
        if { [string match "Y" [string toupper $doAnother] ] } {
            log_msg LOG "User requests more updates"
        } else {
            set doLoop "0"
    }Anyway - there is lots that you can do to parameterize script or make them interactive. Just spend a bit of time working through a couple of TCL tutorials and you'll be well on your way.
    +(Note: script chunks have been edited for clarity of the main point I wanted to illustrate and may contain missmatched braces or other syntax problems.)+

  • How to use Value Mappings for simple translations?

    Hello,
    I want to use Value Mappings for simple translations in mappings, e.g. from IDoc to Inhouse structures.
    For example unit of quantity:
    IDOC    -->    INHOUSE
    PCE               P
    ABC               A
    How can I use Value Mapping for this? What should be used as Agency, what should be used for Scheme? What about groups? I tried the following: I created a new Value Mapping in Integration Directory:
    - Source Agency: DELVRY05
    - Source Scheme: MENEE (IDoc field name)
    - Target Acency: INHOUSE_DESADV (Name of structure)
    - Target scheme: UNIT (Name of field)
    Then, in the table, I added several lines for translating PCE to P and ABC to A and so on. But I have to define a group name for each line. I used INHOUSE. But than I get one INHOUSE group for each line.
    This seems very complicated for simple translations from A to B. I don't want to use FixValue in Message mappings.
    Any help appreciated.
    Thanks,
    Christoph

    Hello,
    @pavan kumar: Thanks, but I know all Blogs about Value Mappings. That does not help me. And I refer to PI 7.1.
    Lets get it very simple: I want to have exactly the same functionality of "FixValues" as ValueMappings. In 7.1, I need to define a Group for every row / line in the conversion table (e.g. for units of measurement conversion between IDoc and FlatFile). That does not make sense for me, as the Group is always the same, e.g. "Unit of measurement". So I will get dozens of same groups called "Unit of measurement".
    I don't really understand the concept of Groups. Maybe this is just not appropiate for my intenses? Maybe the Group has to be defined as one specific value of Unit of measurement, e.g. "pieces"?
    CHRISTOPH

  • How to populate the main table and the lookup's at the same time

    Hi ,
       What I have with me is the XML files which contain the data from the material master and the excel sheet which talks about the mapping . it basically tells me which field of the main table maps to which field of which segment in the IDOC and also the name of the table and the field in the R3 system .
    I wish to use this info to populate the data in the material repository .
    - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    - Can I use the standard maps available for import in the business content of material repository in MDM ?
    - If the answer to the second question is NO then I think i can create the maps and save them for future use .
    Regards
    Deepak Singh

    Hi, Deepak
    >>> - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    I don't think you can populate both main table and all fields of lookup tables at the same time, i.e. using same map. You can consider 2 options to upload all information you have:
    1) If your XML file contains data you would like to upload to lookup tables, you can upload it to MDM lookup tables with several maps using same XML and choosing different sections of that XML corresponding to different MDM lookup tables.
    2) Also you can upload main table simultaneously with lookup table entries (using same map), but in this case new lookup table entries will only contain display field values that you mapped. To do this you should use 'Add' value mapping functionality for fields that you mapped to lookup tables.
    >>>- Can I use the standard maps available for import in the business content of material repository in MDM ?
    1) In case you have material master repository delivered by SAP and you use XML files which structure corresponds to SAP predelivered XSD schemas then you can use these maps undoubtedly.
    2) If your repository is based on SAP predelivered, but you changed it ,you should adjust these maps due to differences in repository structure and  XML files structure.
    3) If you created your repository from scratch you should consider option of making your own import maps.
    Regards,
    Vadim Kalabin

  • Transporting Value mappings

    Hi,
    We are using the Value Mapping replication functionality to maintain Value Mappings in a PI 7.1 system.
    How do we transport the values we maintain from Dev to QA and beyond? Will these be visible to transport in the Integration Directory, or should we look at transporting the source data (and then re-replicating in PI)?
    Cheers
    Manish

    > What we are struggling with is... do we transport the data across to the other environments, or do we manually re-enter and replicate in each environment? Transport of a table will probably work with an initial load, but what about delta changes that occur to the data? They are trickier to manage.
    You have to transport the ABAP report and Ztables if any. We do not trasport the data accross other environments. Once you transport the report just run it, the data will automatically come itno run time workbech under cache monitoring.
    >It would be so much easier if the Integration Directory allowed transport from one PI environment to the next for data maintained via the replication mechanism.
    >
    You can transport from ID only when you are using the value mapping group.
    > However, there is an even broader issue here... as a post-go-live policy, do we ask the business users to maintain the data in Dev and transport them across the landscape, or do we allow them to maintain values directly in production?
    The data in Dev & Production is never same so you will not transport it from Dev to PRD, so end user should maintain the correct data into production system.
    Regards,
    Sarvesh

  • Mapping Lookup for Update/Insert

    Hi XI guru,
    We're using the Mapping-Lookup-feature for select-statements - it works very fine.
    If we use an insert- or update-statement instead, we get an exception.
    String Query1 = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet1 = null;
    // Build the Query String
    Query1 ="Update ZID Set MESSAGE_ID = MESSAGE_ID + 1 where ID = '" + a[0] + "'";
    try{
    //Determine a channel, as created in the Configuration
    channel = LookupService.getChannel("Oracle_DB","JDBC_Insert");
    //Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    //Execute Query and get the values in resultset
    resultSet1 = accessor.execute(Query1);
    for(Iterator rows = resultSet2.getRows();rows.hasNext();){
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("MESSAGE_ID"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());
    Exception during processing the payload.Problem when calling an adapter by using communication channel JDBC_Insert (Party: , Service: Oracle_DB, Object ID: 6e9e567c233733929c2d8f31c1bbbba9) XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement
    &apos;.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JDBC_Insert (Party: , Service: Oracle_DB, Object ID: 6e9e567c233733929c2d8f31c1bbbba9) XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement
    &apos;.
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:131)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Root Cause:
    com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: &apos;Error processing request in sax parser: Error when executing statement for table/stored proc. &apos;table&apos; (structure &apos;statement&apos;): java.sql.SQLException: ORA-00900: invalid SQL statement
    &apos;.
         at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)
         at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:123)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Could you please help to let me know what should I do to fix it?Thank you

    the purpose to do this update is, we want to get a interface depended sequense number, every message should have a unique message id, then use JDBC receiver adapter to insert this message to several DB tables, Legacy application program will use these message id to join these tables to get data.
    for example: SAP send sales order data to Legacy system, every Sales Order Create and Modification will trigger a message to Leagcy system, Legacy system use Staging table to receive these messages, one table for SO Header,one for Item,one for schedule line for each item. So when Legacy program cannot use SO number as key to join these table, because every change will create a message. That's why we want to maintain a unique message id for every message.
    Do you have any other solution to realize this requirement? thank you very much for your help.

  • How to avoid hardcoding in RFC Lookup and JDBC Lookup during transport...

    Hi All,
      We have RFC and JDBC Lookups in some of our scenarios(JDBC to RFC synch)....Now problem is during transport of design objects, we have to change the business system and channel name manually in UDF in target environment....as it wont change although we define the target group in SLD.....we want to avoid this hardcoding.....one idea is we can use a business service inspite of business system and assign the comm channel to it.....this business service will be generic for all environment(dev,qua and prod)...and hence we dnt hav to hardcode....pls let me knw how to achieve or its possible or not....
    waiting for ur inputs....
    Regds,
    Pinangshuk.

    Hi,
    For RFC lookup you might be doing hardcoding for Business system and RFC channel name.
    Options are
    1) Create value mapping for Business system. So you can maintain it in Directory part.
    2) Keep the RFC channel name same for all system (Development, Quality, Production)
        The details of channel can be changed in the Directory part of the respective system

Maybe you are looking for

  • Printing from Outlook causes PDF attachment to minimize

    I have Acrobat Pro 9 installed on a Windows XP workstation.  I have to print PDFs from attachments in Outlook 2003.  Everytime I print, the PDF minimizes.  As I do this many times a day, the process of then going back to the PDF to close it is very f

  • Starting workflow from where ?

    hi, is it possible to start a workflow 'behind' a transaction code ? i want to have a menu-entry in user-menu in ERP where the user can click on a self-written workflow. but how can i give them the possibility to enter this workflow ? reg, Martin

  • Screen content image is too big. I can see very little of the screen content.I cannot enter my passcode.

    iPhone 4s. 64GB. Recently installed iOS 8. The problem happened suddenly upon booting the phone. The screen content image is expanded way beyond the size of the screen. Therefore almost nothing is visible. It is possible to move different parts of th

  • I erased my HP OFICEJET printer from my account

    I need help figuring out how to add my printer to my account on my eprintcenter account again..i am not sure how i erased it. i can not figure out how to add it again or print out a new printer code.

  • SSMS hanging and no exception out

    Hi, we installed SQL 2005 Cluster with Active/Passive, all went smooth. Later we tried to connect the database through SSMS but failed to connect from one site and able to connect from other site. It's not failing, when click connect its tryring to c