Complex Message Mapping for a Lookup in PI  7.1

Hi
I am having difficulty with a complex mapping in PI that I was wondering if someone could help me with.
The issue is that I am doing a Stock Lookup where you enter an item code and retrun an xml with all the stock for Warehouses, Local regions and Other regions.
The problem is with the Other Regions. I have done a mapping that produces a new Other Regions node for each store returned...
<?xml version="1.0" encoding="UTF-8"?>
<StockLookupResponse><Header><SessionID>Constant</SessionID></Header>
<OtherRegions><Region>Dunedin</Region><Stores><Branch>5115</Branch><Description>222 Waterloo Road</Description><StockLevel><AllocatedStock>2</AllocatedStock></StockLevel></Stores></OtherRegions>
<OtherRegions><Region>Dunedin</Region><Stores><Branch>5117</Branch><Description>1 Waterloo Road Dunedin</Description><StockLevel><AllocatedStock>26</AllocatedStock</StockLevel></Stores></OtherRegions>
<OtherRegions><Region>Christchurch</Region><Stores><Branch>5222</Branch><StockLevel><AllocatedStock>27</AllocatedStock></StockLevel></Stores></OtherRegions>
</StockLookupResponse>
What I need to do is create a single OtherRegions node for each region and then show the stores within this region like this
<?xml version="1.0" encoding="UTF-8"?>
<StockLookupResponse><Header><SessionID>Constant</SessionID></Header>
<OtherRegions><Region>Dunedin</Region>
<Stores><Branch>5115</Branch><Description>222 Waterloo Road Dunedin</Description><StockLevel><AllocatedStock>2</AllocatedStock></StockLevel></Stores>
<Stores><Branch>5117</Branch><Description>1 Waterloo Road Dunedin</Description><StockLevel><AllocatedStock>26</AllocatedStock</StockLevel></Stores>
</OtherRegions>
<OtherRegions><Region>Christchurch</Region><Stores><Branch>5222</Branch><StockLevel><AllocatedStock>27</AllocatedStock></StockLevel></Stores></OtherRegions>
</StockLookupResponse>
I have successfully created the OtherRegions node for each region but I only ever get one store return for each region. No matter what I do I cannot seem to get the full list of stores.
The sample XML coming in is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:StockLookup_JDBC_response xmlns:ns0="urn:bridgestone:bpcs:logistics">
   <StoredProceedureSelect_response>
      <response_1>
         <row>
            <ITEM_CODE>484855A</ITEM_CODE>
            <RECORD_TYPE>O</RECORD_TYPE>
            <REGION_CODE>2</REGION_CODE>           
            <STORE_ID>5115</STORE_ID>           
            <LOCATION_CODE/>           
            <ON_HAND>555</ON_HAND>           
         </row>
         <row>
            <ITEM_CODE>484855A</ITEM_CODE>
            <RECORD_TYPE>O</RECORD_TYPE>
            <REGION_CODE>2</REGION_CODE>
            <STORE_ID>5117</STORE_ID>
            <WHS_FLAG>0</WHS_FLAG>
            <ON_HAND>6</ON_HAND>
         </row>
         <row>
            <ITEM_CODE>484855A</ITEM_CODE>
            <RECORD_TYPE>O</RECORD_TYPE>
            <REGION_CODE>6</REGION_CODE>
            <STORE_ID>5222</STORE_ID>
            <LOCATION_CODE/>
            <ON_HAND>2</ON_HAND>
         </row>        
      </response_1>
   </StoredProceedureSelect_response>
</ns0:StockLookup_JDBC_response>
To get the Other regions to work I passed on the record type and region code into a UDF:
public void createOtherRegion(String[] recordType, String[] regionCode, ResultList result, Container container) throws StreamTransformationException{
String prevRegionCode = new String("");
for (int i = 0; i < recordType.length; i++)
     if (!recordType<i>.equals("O"))
         result.addValue(false);
     else
          if (prevRegionCode.equals(""))
               result.addValue(true);
               prevRegionCode = new String (regionCode<i>);
               else if (prevRegionCode.equals(regionCode<i>))
                    result.addValue(false);
               else
                    result.addValue(true);
                    prevRegionCode = new String (regionCode<i>);
This successfully create a new Other region and displays a single store within the region. Unfortunately by trying to map the STORE_ID to the Stores node (1.. unbounded)  only one store is ever returned.
I have tried changing the context but it will only retrun one store.
Haas anyone else come across a similar problem? Any help appreciated.

This problem was resolved by using sort and sortByKey in order to preserve the context. UDF was not helpful in the end.
I am closing this thread.

Similar Messages

  • Error while testing in message mapping for JDBC lookup

    The error is as follows.
    Exception during processing the payload.Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         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: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         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)

    I'll give you the query.Can you please check my code.Code is as follows.
    //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    //Build the Query String
    Query = "Select role from login where username  = " + username + " and password = " + password + "" ;
    try{
    //Determine a channel as created in the configuration
    channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
    //  Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    // Execute the Query and get the values in the resultSet.
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();)
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("role"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • Is there pre-configured message mapping for SRM Content?

    Hi,
    My requirement is to do a message mapping between the SRM Message "Purchase Order Request" and the R/3 Idoc Orders01. Is there a preconfigured message mapping in SRM content or will I have to do it?
    I see the generated proxy class from the outbound message interfacePurchaseOrderRequest_Out which will carry the message to XI and my requirement is to map it to the Interface ORDRSP.Orders01 Please let me know if there is a pre-configured message mapping for this ? or is the message mapping between the message "Purchase Order Request" and the R/3 IDOC ORDERS01 to be done by the developer himself?

    HI,
    There are mappings available in the predelivered SRM content from SAP.
    Did you import  the SRM content into the repository? If so , you can find this.
    www.service.sap.com/ibc -> Integrated Business Content for mySAP SRM->
    Hope this helps,
    Rgds,
    Moorthy
    Message was edited by:
            Krishna Moorthy P

  • Failed in Message Mapping for Sender SOAP Adapter

    I am using a synchronous Sender SOAP adapter for sending SOAP messages using HTTP security protocol. I am trying to send SOAP messages to XI and then to RFC-R/3. And Responses back from RFC to XI and then to SOAP. I am getting an error for failed in message mapping in SXMB_MONI for converting SOAP messages to RFC. When I debug it in Message Mapping in Integration Repository, it works fine.
    Any help is appreciated.
    Thanks in advance!
    Mrudula

    Hi,
    try to do a full cache refresh
    regards,
    Jakub

  • Exception in Message mapping for JDBC - XI- file

    Hi,
    In the above scenario, Sender JDBC adapter has processed the message but when i checked the processed XML messages, its giving an error message with details
    <i>During the application mapping
    com/sap/xi/tf/_MM_XXXX_a
    com.sap.aii.utilxi.misc.api.BaseRuntimeException
    was thrown: RuntimeException in Message-Mapping
    transformatio~</i>
    how to make the source structure so that it gets correctly populated with the result set of sender JDBC adapter? Are there any constraints while making the Data type for the source structure?
    Regards,
    Nitin Aggarwal.

    Hi,
    The problem is solved...
    Actually, the runtime system was not able to map the result set generated by the Sender JDBC adapter to the source structure of message mapping. This was because the result set has a particular structure and its like
        <resultset>
          <row>
            <column1>value1</column1>
            <column2>value2<column2>
           </row>
        </resultset>
    To map this kind of structure to the source structure, a  <b>row</b> element should always be there below the root node and the structure fields should be placed as sub elements to row. One more thing the root node of the source structure should be same as the document name specified in the sender JDBC adapter config.
    Anyways, Thanks to all for the valuable efforts.
    Regards,
    Nitin.

  • Message mapping for checking hyphens (-) in material number

    Hi All,
    I have an interface in PI 7.1 for product change and product create coming from ORACLE to SAP
    Now, the reqmt is to take the ORACLE product which could have hyphens or without hyphens
    In SAP, the product can have upto 40 characters and if something without hyphens come in, then it adds leading zeros while creating and while changing, SAP expects a product with leading zeros
    So, how do I handle this? How do I check in message mapping, the product with hyphens or without and write a condition to it.
    Here is my idea
    Take the product, use a message mapping function to check for products without hyphens and if YES, add leading zeros upto 40 characters
    Can anyone let me know how this could be achieved using message mapping function
    I am sure this kind of reqmt especially leading zeros for products is very common in PI interface circle
    So, please let me know the details
    Thx
    mike

    Hi Mike,
                  your requirement can be solved without UDF too
    inputfield ---------------->
                                                 indexOf() ------------>  
    Constant(-)---------->                                                  less---->if ----->target field                                                                               
    constant(0)---------->
    inputfield  and contant (hyphen) are inputs to standard text function indexOf. Output of IndexOF and constant(zero) are inputs to standard arithmetic function less. Out put of less goes to boolean function if. The IF has two inputs then and else .
    For then part write this logic
    inputfield----> formatNumber()---->then
    in standard arithmetic function Formatnumber  specify number format with 40 zeroes, leave decimal separetor blank.
    Now for the else part of "IF" write this
    inputfield----->else
    Finally
    output of "IF" goes to target field
    IF------>target
    Regards
    Anupam

  • XI Message Mapping for ORDER03

    Hello,
    We are in the process of mapping ORDERS03 to xCBL (supplier needed this in the format).
    We need to map IDTNR (ORDERS03\E1EDP01\E1EDP19) to vendor material if the QUALF (ORDERS03\E1EDP01\E1EDP19) value is 002.
    Also, we need to map IDTNR (ORDERS03\E1EDP01\E1EDP19) to buyer material if the QUALF (ORDERS03\E1EDP01\E1EDP19) value is 001.
    How can I achieve this? Please help.

    Hi Ppeter,
    ACtually I did something very similar in the message mapping and it depends also upon the exact structure and cardinality of your target nodes/elements.
    So I give just one exmaple but your case might need a variant upon this :
    So one option is that you only create the output node if the input node is available :
    1)Position yourself in the targetmessage on the PARENT node of the vendor material element :
    -add the QUALF
    -add a constant '002'
    -Use the standard StringCompare Function
    -link the output to the node function 'CreateIf'
    -link the createif to the target element ( = parent of vendor material )
    2) Position yourself on the vendor material : link directly with the IDTNR
    If the parent node contains other elements that need to be there independent of the vendor material, you can't use this of course. Then you can use a boolean function 'ifwithoutelse' instead of the 'createif' : if the qualf is 002 you link the IDTNR to the 'then' part of the ifwithoutelse and the output to the vendor material node
    In any case, you might need to change the context  from the QUALF ( right click / context ) to get the desired results
    rgds
    Dirk

  • Message Mapping for multiple item levels

    Hi,
    My query is regarding message mapping
    Example of source data structure & Target data structure
    Source data Structure
    <item>
          --<no>1</no>
          --<address/>
          --<ITEMS>
            ----<item>
              ------<Name>a</Name>
            ----<item>
              ------<Name>b</Name>
    <item>
          --<no>2</no>
          --<address/>
          --<ITEMS>
            ----<item>
              ------<Name>c</Name>
            ----<item>
              ------<Name>d</Name>
    Expected  Target data structure
    <Item>
      -- <no>1</no>
      -- <name>a</name>
    <Item>
      -- <no>1</no>
      -- <name>b</name>
    <Item>
      -- <no>2</no>
      -- <name>c</name>
    <Item>
      -- <no>2</no>
      -- <name>d</name>
    How I can map the '<no>' field to target '<no>' field to repeat value until to second sub item level occurance complete ?
    Thank you
    Sateesh

    Hi Sateesh,
    Please see the solution below.
    The are 2 contect changes you need to do on field level. Right click and go to context and select your context you need.
    Context on ITEMS - Should be on Root Structure(In my mapping it is MT_Multiple_Item_Level_Source)
    Context on Name - Should be on Item (The first Item Tag)
    Good Luck.
    Regards,
    Jannus Botha

  • Executing a message mapping for each instance of a sub-message

    Hi,
    I have a message struct like the following.
    MT_TEST (1..1)
             |----
    >IDOC (1..Unbounded)
    There is a field in each instance of Idoc, depending on its value, I need to perform receiver determination.
    The target for each IDOC instance will be different for each value of the field.
    How do I write a XPath expression to achieve this?
    Also, is there any other method of achieving the same goal?
    Cheers,
    Earlence

    Hmmm.. so idoc is at source side..... Ok so multiple idocs are coming in one bundle BUT you cannot just divide the payload based on some conditions in Receiver Determination.
    In your mapping you can map the source date to different targets but that is different thing.
    Note: You can either send the whole payload to one receiver or nothing. You cannot send a part of the payload to 2 different receivers.
    So it means it doesn't seems to be possible.
    Regards,
    Sarvesh

  • Key Mapping for Flat lookup tables

    Hi,
    How do we decide if we need to make Key Mapping "Yes" for flat look-up tables?
    Can anyone plz explain with an eg on where to make key mapping yes or no for Flat Tables.
    Thanks,
    Ketan

    Hi,
    Can anyone plz explain with an eg on where to make key mapping yes or no for Flat Tables.
    1. A remote system’s objects are mapped to master data objects within MDM using key mapping. A key mapping maintains the relationship between the remote system’s identifier (or key) for an object and the corresponding master data object in MDM.
    2. in the data manger based upon some strategy, you found that 4 records are duplicate, and then you merged into single record.
    the merged record is having 4 records inside it with respective remote keys.
    if you want to edit those records, key mapping should be enabled for that particular table.
    3. while harmonizing the records to the respective client systems, you can use edit key mapping functionality for merged records.
    if you enabled key mapping functionality in the console for the particular table, then only you can aceess EDIT KEY MAPPINGS functionality in data manager & syndicator.
    hope this may help you,
    Regards,
    Srinivas

  • Context handling in message mapping  for an IDoc to File Scenario

    Hi,
    Can somebody help me with this issue. I have an Idoc to file scenario. heres my idoc structure. Its a custom Idoc
    Header (1..1)
    Detail (0..Unbounded)
             DependentDetail (0...Unbounded)              Note: This dependentdetail is a subelement of Detail
    Trailer(1...1)
    I  created my target structrure the same way as the Idoc structure.
    My output is a simple text file. I need the output in this format
    Header
    Detail1
       Dependentdetail1
       DependentDetail2
       DependentDetail3
    Detail2
       DependentDetail1
       Dependentdetail2
    Detail3
    Detail4
    Trailer
    Since the Detail and Dependent Detail records are unbounded .
    But right now i m getting my output like this:
    Header
    Detail1
    Detail2
    Detail3
    Detail4
    Trailer
    But the DependentDetail record in not showing up in the output file. I didnot do any context change in my mapping. So do I need to do any context handling??...If so can somebody explain me with this.
    Thanks,
    Adam
    Edited by: hymanroth on Apr 29, 2011 11:11 PM

    Thanks Kenneth foryour quick reply,
    Yes, I see the payload for Dependent detail in SXMB_MONI. So as you said earlier there's a problem with my content conversion.
    my content conversion is as follows:
    Header.fieldNames                             
    Header.fieldFixedLengths                
    Header.endSeparator                        
    Detail.fieldNames                               
    Detail.fieldFixedLengths                    
    Detail.endSeparator
    DependentDetail.fieldNames
    DependentDetail.fieldFixedLengths                   
    DependentDetail.endSeparator
    Trailer.fieldNames                             
    Trailer.fieldFixedLengths                
    Trailer.endSeparator  
    So As I told  earlier. With the above content conversion. I am not able to get the Dependent detail record in my output file. So If there is a change in my content conversion can u check it and tell me where I went wrong.
    Thanks,
    Harsh
    Edited by: hymanroth on May 2, 2011 7:03 PM

  • Complex Message Mapping

    Hi all,
    I need to map an item node that can apper severl times (in IDOC) to one row in the target MT,
    every 3 items i need to map to one row in the taget - one item after the other in the tagert (concatenat 3 items)
    my Itam row in the target looks like this:
    some fileds, item1item2item3, some fileds
    some fileds, item4item5item6, some fileds
    and so on........
    Thanks,
    Naama

    You can achieve this by using UDF i guess. Like pass the queue of Items as a parameter to function.
    Then try this
    int j=1;
    String b = null;
    for ( i=0;i<a.length;i++)
    if(j<=3)
    b = b+a<i>;
    j=j+1;
    else if (J>3)
    b = b+"~";
    j=1;
    result.addValue(" " );
    Then split the b using ~, store it in an array . then retrieve this array value, save it in global container variables / global variables then map it to ur target .
    I am sure you need to modify this code. Just the idea

  • Fault Message Mapping for SOAP Scenario

    Hi ,
    I have configured a Proxy to SOAP synchronous scenario. The scenario is working fine. Now I need to map the fault message and display the message in SAP in case of any errors. I have used the standard Fault message. But I dont have any message from the WSDL which I can map to the standard fault message. Is it that we need to tell the wenservice team to modify the WSDL to include the fault message or is there any other way out to acheive the same.
    Thanks
    Amit

    >>> Is it that we need to tell the wenservice team to modify the WSDL to include the fault message or is there any other way out to acheive the same?
    Fault message is to provide meaningful message to the other end if there is a validation error or business exceptions or so...
    a) You are importing WSDL of the third party and using it in soap receiver target side.
    b) Normally it is best practice to create a WSDL which contains request, response and fault message. if your wsdl has fault message type declared then you can map the wsdl fault message with your proxy side fault message(which you can create). Please note you rely on the third party wsdl. Third party WSDL must have application logic coded to support fault message in case of application error occurs. Example if there is a validation that does not go through then their application logic must populate data in the fault message of wsdl. Then only if we map the wsdl fault msg to our proxy fault msg, we get meaningful fault details.
    If your target WSDL does not support fault mesg, it is not going to be helpful at all.

  • Hierarchical structure message mapping in PI

    Hello All,
    I have a source and target structure in graphical message mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <Material_MT>
       <row>    0..unbounded
          <MATERIAL_ID>1234</MATERIAL_ID>
          <DEL_FLAG>
         </row>
      <row>    0..unbounded
          <MATERIAL_ID>1234</MATERIAL_ID>
          <DEL_FLAG>Y</DEL_FLAG>
         </row>
      <row>  
          <MATERIAL_ID>4567</MATERIAL_ID>
          <DEL_FLAG>N</DEL_FLAG>
         </row>
    <row>  
          <MATERIAL_ID>1234</MATERIAL_ID>   
          <DEL_FLAG>N</DEL_FLAG>
         </row>
    </Material_MT
    Materials can repeat in the source structure but their flags could be different
    Target structure
    <Mat>  1..1
    <Mat_update> 0..unbounded
       <Matid>
               <Matreg>
                     <Matcomplete/>
                     <tuple>
                          <id/>
                      </tuple>    
               </Matreg>
         </Matid>
         <recordind>
                <id>
          </recordind>
    </Mat_update>
    Now, the requirement is
    1) For each <MATERIAL_ID>  in the source, map its corresponding flag <DEL_FLAG> value <Matcomplete/ field in the target ,
    2) For each  <MATERIAL_ID> in the source, take its corresponding value and make a soap  lookup call in mdm to get tuple ids (mutiple value per material possible) and map each to <id> (under <tuple>)
    3) For each <MATERIAL_ID> in the source, take its corresponding value and make a soap lookup call in mdm to get <recordind> (single value per material) and map to <id> under <recordind>
    Now, I have done soap lookup for 2)  and getting multiple tupleIDs for a single material
    For 3) also, I am doing a lookup and getting a single ID back 
    Both 2)   and 3) are achieved using  udf soap lookup  - 2) will return a resultlist and 3 a single string value
    My main question is how to do message mapping for achieving step1, 2 and 3. Pls help...its needed badly
    Thanks
    mike

    Hi Mike,
    Below is the logic as per my understanding.
    1- Direct mapping from DEL_FLAG> value <Matcomplete/ field in the target
    2- After lookup Map multiple Tuple Id's to Tuble node.
    3-After lookup Map  recordind to Id .
    If you want it in detail let me know the sample output structure with values.
    Regards,
    Sudha

Maybe you are looking for

  • Move song from ipad to my pc

    I purchased a song on my i pad while i was out and now I can not get it on my pc so that I can ad it to my library. please help me.

  • Over a Month of waiting... still no resolution dat...

    Well after an initial activation date of 20th March and many hours spent on hold I still have no broadband. I have a £15 phone bill from my initial chase, and since finally getting my phone connected earlier this month, I still have no broadband whic

  • Clusterware Installation - Clock Skew and Packages Issue?

    Hi, Can someone share how to resolve installation issues in Clusterware10.2, rac1 - VM Centos4.7, 512 RAM rac2 - VM Centos4.7, 512 RAM Both VMs are located on Windows XP physical box. 1. error while copying directory /u01/crs/oracle/product/10.2.0/cr

  • Installing SQLDeveloper with Oracle Database Express Edition 11g Release 2

    Hello, I have a problem with sqldeveloper in connecting to the database with the following message: *"java.lang.unsatisfiedlinkerror oracle.jdbc.driver.t2cconnection.t2csetsessiontimezone"* I can connect to the database via SQL / SQLPLUS. I cannot se

  • RMI Unmarshaling Error

    I got a problem with runing RMI application.Sometimes it works well, but when I made some changes to Impl class, it sometimes shows : Exception in thread "main" java.rmi.ServerException: Server RemoteException; nes ted exception is: java.rmi.Unmarsha