Message mapping help

Hi,
I am doing graphical message mapping.
Source structure looks like
<BAC>
<IXYZ>
<DEF>
<PQR>
All are 0.. 1.
Target field is item which is also 0.. unbounded.
If ABC is not blank, assign to target  field item[0] as 1st occurance.
If DEF is not blank, assign the same to item[1] field as 2nd occurance and so on.
Can this be done using message mapping without udf or java? If not, pls let me know other ways.
Thanks
anand

Hi,
<ABC> -> lenth Function (TEXT)-> Greate Then -> 0 (using the IF Condition)
  <ABC> -> CopyValue(docuble click and give the index 0) -> to Target
<DEF> -> lenth Function (TEXT)-> Greate Then -> 0 (using the IF Condition)
  <DEF> -> CopyValue(docuble click and give the index 1) -> to Target
Regards,
Venu.

Similar Messages

  • Message Mapping Help XMLDocument with in XML

    I am trying to pass on some XMLDocument with in XML
    Example
    <Header>
    <Detail><Text1>Text</Text1><Text2>Text</Text2></Detail>
    </Header>
    Message mapping giving error at present. My Message Type has only the following
    <Header>
    <Detail>
    I am trying to include <Text1>Text</Text1><Text2>Text</Text2> with in Detail section. Not sure how to handle this with Message Map. Please explain if there is any possibility to achieve something like this

    Hi,
    You can directly use CDATA in message mapping and can solve this.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Else you can use xsl mapping as mentioned in this thread:
    Re: CDATA in xml file
    You can also try java mapping as mentioned here:
    XML inside a field in XI
    If you can give complete source payload, source message type and target message type then somebody here can help you out.
    Regards,
    ---Satish

  • Message mapping help needed

    I am trying to map target based on a condition. Meaning I want to map E1EDKA2(1..99999) of DESAD01 Idoc to ShipTo(0..1) node if E1EDKA2-PARVW = WE.
    I tried all the variations with creatIf and formatByExample but I couldn't able to get it working.
    Here is the target XML structure
    <Delivery>
       <Header>
           <ShipmentNumber>1234</ShipmentNumber>
           <BOLNumber>ABDC</BOLNumber>
           <ShipTo>
                <Name>XYZ</Name>
           </ShipTo>
           <SoldTo>
                <Name>XYZ</Name>
           </SoldTo>
       </Header>
       <LineItems>
        </LineItems>
    </Delivery> 
    Thanks
    Suman

    Hi Sarvesh,
    I don't know what is the significance of checking 1 = 1. Anyway I could able to resolve the issue by my self. Thank you very much for taking time to help me.
    /ns0:MT_XML_Delivery/Delivery/Header/ShipmentNumber=/DESADV01/IDOC/E1EDK07/VBELN
    /ns0:MT_XML_Delivery/Delivery/Header/BOLNumber=/DESADV01/IDOC/E1EDK07/BOLNR
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo=createIf(stringEquals(/DESADV01/IDOC/*E1EDK08*/E1EDKA2/PARVW, const(value=WE)))
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo/Name=replaceString(/DESADV01/IDOC/E1EDK08/E1EDKA2/PARVW, /DESADV01/IDOC/E1EDK08/E1EDKA2/PARVW, /DESADV01/IDOC/E1EDK08/E1EDKA2/NAME1)
    /ns0:MT_XML_Delivery/Delivery/Header/ShipTo/AccountNumber=/DESADV01/IDOC/E1EDK08/E1EDKA2/PARTN
    XI/PI is really strange. It needs to have that PRVW in the first field mapping, even though it is not being used. I just replaced PARVW with the NAME1 and mapped to name. For the ShipTo, I set E1EDK08 (next higher level structure) as the context.
    I think it will take time for me to learn this, as I come from webMethods and XSLT background.
    Thanks
    Suman

  • Regarding Message Mapping

    Hi All,
    The problem is I have created 2 Message Mappings and Two Message Interfaces
    Two Messages Mappings and Message Interfaces are activated successfully, my question is which Message Mapping will execute among them(Message Mapping). If it Executes latest one Message Mapping ok, if I want to Execute Old one how can I execute that. I dont know whether we can create more than one Message Mapping, if it is possible here then can I Execute any one among all these Message Mapping help me in this problem.
    Thanks & Regards,
    Ashok.

    hi,
    in your scenarios your mappings
    are executed on the basis of the <b>interface mappings</b>
    one interface mapping can have a few message mappings
    that will all be executed :
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    you always use interface mappings (in directory)
    so you need to check how which message mappings
    are included in your interface mapping
    to find out which will be used in your scenarios
    Regards,
    michal

  • A little help needed in message mapping

    a little help needed in message mapping
    I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality
    let us say we have the segment seg1 and there is a QUALF in it
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    then we use the vbeln to split the idoc into 2.
    so if we have
    <vbeln> 1 </vbeln>
    and
    <vbeln>2 </vbeln>
    then 2 Idocs should be created like this
    <Idoc>
    <vbeln> 1 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    <Idoc>
    <vbeln> 2 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc
    Thanks.

    UseOneAsMany is the function you need to use.
    It takes three parameters:
    1 --- The node you want to duplicated
    2 --- How many times you want to duplicated
    3 --- The context you want to place for it.
    Regards
    Liang

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

  • Need help on message mapping screen

    Hi folks,
    I am working on file to idoc scenario.   I Imported the IDOC to my scenario. In Messaga Mapping IDOC structure displaying fields as a documention. but i need techincal names of those fields.
    for Example:   In my IDOC 1 field is showing companycode but I want to see that field as a BUKRS.
    How to see the technical names of IDOC fields in Message Mapping.
    Your help is highly apprecia

    Hi,
    I dont think we would be able to see the data element names of the IDOC in XI. Even the imported XSD of Idoc doesnot contain data element name.
    We would be only dealing with the field names/ structure of the IDOC for field message mappings. The field names are internally mapped to the data element names in SAP R3 system.
    To view the internal mapping between field names and data element names of the Idoc fields, you can go to the transaction 'WE30'. Give the basic type of the Idoc and go to the segment editor. You can find the data element names for each field name  there.
    Thank you.
    Regards,
    Subbu

  • MESSAGE MAPPING PROBLEM PLS HELP

    hi forum i have a problem in message mapping...
    i have a file to file scenario...with a BPM..
    the components are:
    1. one outbound async MI:->   MI_OA_fileSender
    2. one abstract async MI:->   MI_AA_fileSender
    the above two has messsage structure as:
    <ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1...1
          <record>  1..unbound
             <batch_num/> 1..1
             <quantity/>  1..1
          </record>
       </recordset>
    </ns0:MT_sourceFile>
    3. one abstract async MI: -> MI_AA_fileDestination
    4. one inbound async MI:-> MI_IA_fileDestination..
    the above two has messsage structure as:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1..unbound
             <rec_number/> 1...1
             <qty/> 1...1
          </record>
       </recordset>
    </ns0:MT_rana3_destinationFile>
    inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1.. unbound
             <rec_number/> 0..1
             <rec_number/> 0..1 //did right click   and "duplicate sub-tree, so it becomes 0...0"
             <qty/>
          </record>
       </recordset>
    </ns0:MT_destinationFile>
    But i dont change the original structure of MT_destinationFile.
    Now in the resultant file in the receiver side i recive two <rec_number> tags....
    but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
    _number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
    Message was edited by:
            sudeep dhar
    Message was edited by:
            sudeep dhar

    >.............SHOULD IT NOT THROW AN ERROR
    Not necessarily.
    See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
    However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
    As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
    Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
    Regards,
    Henrique.

  • How to Alert RFC connection failure via message mapping? Kindly Help!

    Hi Experts,
        I have a JMS - XI - RFC scenario.
    JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
       I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
      The PIP number exists in the PIP content at the interface.
      If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
      Only way I think of triggering alert is in the message mapping via a Java UDF.
      But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
      How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
    Please help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi Gopal,
    what version/sps of XI are u running?
    The easiest way to do what u want inside a UDF is to
    1. use JCo to try estabilish a connection to the remote SAP System
    2. if that fails, use JavaMail to send an email message
    Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
    Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
    I am evaluating a way to do the same with Alert Framework. I will let you know the result!
    Cheers,
    Alex

  • Message mapping logic help

    Hi All
    I have a source structure like this below. It's a big structure actually. I'm just pasting the relevant structure where I need your help.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
        </storage>
    ----</root>
    My requirement is to check the value coming in <Type> and if it is TY, then the target structure will be the exactly the same
    If it is XY, then the target structure will have one more field <celsius> and will look like this below.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
             <celsius>922</celsius>
        </storage>
    ----</root>
    The <storage> complex element with elements can repeat as many times in the source XML. But the values of <Type> will be either TY or XY and I have to create the target structure accordingly. Pls help. I am using graphical message mapping
    thx
    mike

    Hi Michael,
    Please try below mapping
    Regards,
    Krupa

  • Help with Message Mapping - Context Change

    I need help with the following message mapping.  I am filtering by EMP_STAT in the Message Mapping.  I have this working for the ROW structures, but I can get the HEADER/REC_COUNT field to calculate.  I can do just a record count of ROW and get it to work, but I can't get it to work with the filter EMP_STAT = 'REG' added.  I get a context error.  Could someone send me the mapping code.
    Sender XML----
    <RECORD>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>222</EMPLOYEE>
    <EMP_STAT>PT</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>
    Receiver XML----
    <RECORD>
    <HEADER>
    <REC_COUNT>2</REC_COUNT>
    </HEADER>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>

    Hello,
    You can use this mapping
    For REC_COUNT:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> count -> REC_COUNT
                                     EMPLOYEE -> /
    For ROW:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> ROW
                                     EMPLOYEE -> /
    For EMPLOYEE:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> SplitByValue -> EMPLOYEE
                                     EMPLOYEE -> /
    For EMP_STAT:
    Constant: REG -> EMP_STAT
    Hope this helps,
    Mark

  • Message mapping/UDF help..

    Hi experts,
    Can someone let me know whether there is a chance to fulfill the below requirement:
    Input file:
    In the Input CSV file, there is a fixed length field with length 9 char and has leading zeroes (ex: 000000650)
    Output file:
    In the O/p XML file, the corresponding value should be displayed as "6.50" (Have to remove the leading zeroes, right justified and the last two digits should be allocated for decimals)
    Can anyone let me know if we can handle in Message mapping or should we write a UDF? If so can you please provide the code..
    Any help would be highly appreciated !!
    Thnx
    - Ravi

    Hi Ravi,
    UDF:
    Create a function zerosuppress and take the cache as value and take one argument input. Then put the code below:
    //Put this code
    String output = input.replaceFirst("^0+","");
    return output;
    With this function your leading zeros will remove.
    Then map like this:
    source field --> zerosuppress (udf) --> divide by 100 --> target field.
    This should solve your issue.
    Regards,
    ---Satish

  • App Store, Messages, Maps, iBooks not opening since Mavericks Update. Help!

    Installed Mavericks yesterday from Mountain Lion. Everything worked OK then tried to download iPhoto and iMovie update. My laptop power dies accidentally and now App Store, Messages, Maps, iBooks won't even open (Bounce once then nothing). Also running ridiculously slow now!

    Hi,
    Try Rebooting the computer and holding down the CMD and R keys together to access the Recovery process.
    7:27 pm      Sunday; October 27, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Error while opening Message Mapping

    Hi All,
    I have one MM in ESR, IDoc to EDI, it has been developed before, and the interface is working successfully.But when I open this MM in ESR, it given a STOP error with desc as 'For input string: ""'.
    and then there is nothing displayed on Screen under Definition,Test and Functions tab of MM.The Signature tab content is visible properly.
    I am working on PI 7.1.
    Is this issue is because of version comapatibilty or missing object. Please provide your inputs to resolve this issue,
    Thanks,
    Ruchi

    Hi All,
    I have checked with my basis team, but they suggested that the patches can not be installed as this problem is happening with single message mapping.
    When I open this MM, it gives the same STOP error :For input string: "". and when I click on Message Mapping -> Check button, it prompts a message 'Parameter #ParamName# has the invalid value null'.
    Please help me to resolve this.As the mapping itself is not getting loaded, so not getting how to set this parameter value(if it is used in MM).

  • To get exception value in Message Mapping

    Hi folks,
    I would like catch bpm step exception in one message mapping, for example:
    I have create on ccBPM using one block, in block i have createad "ex" exception variable and set ex in all step (send and transformation), i have created one exception branch in block using "ex" exception.
    How can i get "ex" value and pass for one message mapping ?
    In MM how can i get text values from excpetion ocurred in ccBPM ?
    Im am trying using Global Variables but not found any parameter of exceptions.
    Can anybody help me, please?

    hi,
    >>In MM how can i get text values from excpetion ocurred in ccBPM ?
    this is not possible
    Regards,
    Michal Krawczyk

Maybe you are looking for