Mapping parts of a simple message array

Hi,
Suppose i have the flowing MT:
Root: 1..1
  Item: 1..Unbound
    Row: 1..1
Which contain the following message:
<Root>
  <Item>
    <Row>My flat file header...</Row>
  </Item>
  <Item>
    <Row>My flatfeet row 1...</Row>
  </Item>
  <Item>
    <Row>My flatfeet row 2...</Row>
  </Item>
  <Item>
    <Row>My flatfile trailer...</Row>
  </Item>
</Root>
And i want to map it to the following MT:
Root: 1..1
  Header: 1..1
    Row: 1..1
  Body: 1..Unbound
    Row: 1..1
  Trailer: 1..1
    Row: 1..1
So the result will look as folows:
<Root>
  <Header>
    <Row>My flatfile header...</Row>
  </Header>
  <Body>
    <Row>My flatfile row 1...</Row>
  </Body>
  <Body>
    <Row>My flatfile row 2...</Row>
  </Body>
  <Trailer>
    <Row>My flatfile trailer...</Row>
  </Trailer>
</Root>
What is the most simple way to do this?

Hi Chila,
By doing the last thing you said "...map the item to body" i get a mapping error.
<i>Cannot produce target element <b>/p2:ExchangeFile_MT/Record/Body[2]/Row</b>. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</i>
What i' did exactly is:
Created UDF with the option of queue and input are Row
Maped <b>Empty Constant to Heder</b>
Mapped Item/Row to Header/Row like this:
<b>Row - removecontext -- UDF-- Header: 1..1.-Row: 1..1</b> here UDF
result.addValue(row(0));
Maped <b>Item to Body</b>
Mapped Item/Row to Body/Row like this:
<b>row - removecontext -- UDF -- Body: 1..Unbound.-Row: 1..1</b> here UDF
for (int i=1;i<row.length-1;i++){
result.addValue(row(i));
Maped <b>Empty Constant to Trailer</b>
Mapped Item/Row to Trailer/Row like this:
row - removecontext -- UDF--Trailer: 1..1-Row: 1..1 here UDF
result.addValue(row(row.length-1));
If this is not what you ment please let me know.
Regards,
Yigal

Similar Messages

  • I am trying to stop encryption in fire vault, but I keep getting the message, The target disk isn't eligible for reversion because it wasn't created by conversion or it is not part of a simple setup of exactly one logical and one physical volume.¨

    I am trying to cease encryption in fire vault, Mac os x lion 10.7 4
    I keep getting the message,
    ¨The target disk isn’t eligible for reversion because it wasn’t created by conversion or it is not part of a simple setup of exactly one logical and one physical volume.¨
    Please can someone advise the way to disable?
    Thank you.

    Are you using Boot Camp? See this discussion at MacRumors.
    Clinton

  • Mapping part

    Hi,
    problem in maping.
    i mapped all elements.i could not mapped one element.
    Deletionflag value mapped with decription.
    hear we used valumapping.
    The requirement is     If delete flag is on à u201Cstatus = Inactiveu201D else u201Cstatus = activeu201D.
    i mapped as the requirement but while i do testing in mapping...have to get the inavtive.. but i could not get inactive.
    have to change any thing in mapping part.
    Thans and regards,
    Kesava.

    Hi,
    I have just checked and it will for sure work the following way:
    1. Use "if" function of Boolean group.
    2. Use your source field (delete flag) passed to "exists" function from Node Functions as the left-side value of your "if".
    3. Use a constant "Inactive" as the top-side value.
    4. Use a constant "Active" as the bottom-side value.
    5. Map the "if" function result to your result field.
    6. Save and activate to test, or test in your message mapping directly.
    Hope this helps,
    Greg

  • How to prevent java mapping from reloading before each message?

    Hi!!!
    I've written a simple java mapping (XI 2.0): "Content Enricher" transformation
    (source system doesn't send some key information required by target system).
    It works fine.
    Then I wanted to put some parametrization data into the database.
    I added some code to load this data only once into my data structures in the memory.
    I also works fine.
    But the problem is that SAP XI uses MappingLoader/MappingResolver
    to load jar file during transformation of every message.
    In a such situation I lose all data and my code has to connect
    to the database again (what is not good because of performance).
    The question is:
    how to configure SAP XI/where to put my code
    to achieve a such behaviour: only once my code would load
    parametrization from db and then "normal" java mapping could
    use it during messages transformation without impact
    on the performance?
    Regards,
    Andrzej Filusz

    Hi!!!
    Thanks for your answer, but I'm afraid that your solution: singleton pattern doesn't solve my problem.
    When XI reload my java mapping classes, all loaded and kept data are lost. Singleton pattern can't prevent it.
    I asked SAP about this problem: in XI 3.0 the classes will only be reloaded when a cache refresh has really taken place. But they won't implement this improved behaviour in XI 2.0.
    Regards,
    Andrzej Filusz

  • How to XI error message will mapped to the SOAP faul message-SOAP(Axis)

    Hi,
      Receiver end I am using SOAP (Axis) adapter and I am getting the system error and I am not getting the payload in SXMB_MONI.
    What ever the error message how do MAP as a SOAP Fault message in SXMB_MONI.
    I found the Solution from OSS note 1039369 but did not explain where to set what parameter and what modules...
    SOAP Fault code
    If parameter Category is XIAdaptger, Area SOAP, Code FAULT
    In this case, parameters P1 and P2 may be set to the fault namespace and fault name. If these parameters are set, the SOAP fault code is set to namespace P1 and name P2. Otherwise, it is set as in other cases.
    For all other cases
    In this case, the SOAP fault code is set to namespace "http://sap.com/xi/XI/Message/30" and name category.area.code, where category, area, code represent the XI error category, area, and code values, respectively.
    SOAP detail
    If parameter ApplicationFault is set
    The SOAP detail child is set to the XI application payload. If, however, the payload extraction mode is set to Envelope, the application payload is taken as the SOAP envelope and the SOAP detail content is set to its body content. Similarly, if the extraction mode is set to Body, the application payload is taken as the SOAP body and the SOAP detail content is set to its content.
    Otherwise
    No SOAP detail content is set in this case.
    Examples
      XI error element
    <sap:Error ...>
      <sap:Category>XIAdapterFramework</sap:Category>
      <sap:Code area="MESSAGE">GENERAL</sap:Code>
      <sap:AdditionalText>Failed to determine a receiver agreement for the given message.</sap:AdditionalText>
    </sap:Error>
    SOAP fault element
    <soapenv:Fault>
      <faultcode xmlns:ns1="http://sap.com/xi/XI/Message/30">ns1:XIAdapterFramework.MESSAGE.GENERAL</faultcode>
      <faultstring>Failed to determine a receiver agreement for the given message.</faultstring>
      <detail/>
    </soapenv:Fault>
    Help appriciated
    Regards,
    Venu.
    Edited by: Venugopalarao Immadisetty on Sep 24, 2009 3:39 PM

    Using Receiver SOAP Axis adapter and I am getting the below exception
    XI error element
    <sap:Error ...>
    <sap:Category>XIAdapterFramework</sap:Category>
    <sap:Code area="MESSAGE">GENERAL</sap:Code>
    <sap:AdditionalText>Failed to determine a receiver agreement for the given message.</sap:AdditionalText>
    </sap:Error>
    and above exception how do I convert as a SOAP Fault message..
    SOAP fault element
    <soapenv:Fault>
    <faultcode xmlns:ns1="http://sap.com/xi/XI/Message/30">ns1:XIAdapterFramework.MESSAGE.GENERAL</faultcode>
    <faultstring>Failed to determine a receiver agreement for the given message.</faultstring>
    <detail/>
    </soapenv:Fault>
    Any idea what modules need to add in Receiver SOAP Axis adapter.

  • Error while trying a simple message bean

    I got an error while trying the simple message bean from "Developing Enterprise Applications Using the j2ee platform" tutorial (lesson 4).
    The following is the error after I clicked on submit button in bonus html:
    javax.servlet.ServletException: Could not initialize due to javax.security.auth.login.FailedLoginException: Password Incorrect
         at bonus.controllers.BonusCalculationServlet.init(BonusCalculationServlet.java:81)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
         at java.lang.Thread.run(Thread.java:479)
    Does anybody know what cause this error? and how to solve it. Any help is very much appreciated.
    Thanks in advance
    Hans

    I have the exact same problem.
    I can't find a username/password setup for JMS.
    Is the example broken?

  • N:1 Mapping and Matching Lines of Message 1 to Message 2

    Hi Everyone,
    I have an n:1 mapping and I need to match up the lines of message 1 to the lines of message 2 to map the target.  For example:
    Source 1
    Key1 = A, Key2 = A, Key3 = A, Field1 = Red
    Key1 = A, Key2 = B, Key3 = B, Field1 = Blue
    Source 2
    Key1 = A, Key2 = A, Key3 = A, Field1 = Wagon
    Key1 = A, Key2 = B, Key3 = B, Field1 = Sky
    Target:
    Key1 = A, Key2 = A, Key3 = A, Field1 = Red Wagon
    Key1 = A, Key2 = B, Key3 = B, Field1 = Blue Sky
    I think that this is possible in a user defined function that basically loops over the Source 2 for each value in Source 1, and I even think I saw a solution to this common problem posted before, but I have searched and can not find it.  Any help is greatly appreciated!
    Thanks
    Peter

    Hi Peter,
    From the example that you have given, mapping between the two source messages has been
    done only for the fields("Field1"). Infact, you are combining the values of the fields
    in the both the source messages-to show in the target message.
    I think this can be done by creating one source message type which stores both the source
    messages (n:1) and then you can map both the field1s of the source messages to field1 of target
    message <b>by using the concat function</b>.
    Hope this was helpful.
    Regards
    Sushumna

  • I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sending data to Message borker.(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to save file in SAP fold

    I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sends data to Message borker(thru JMS channel).(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to create file with same data what ever send to Message broker and put the file in SAP folder without touching mapping. Is it possible? Please advise with the steps. We are using the ICO for this senario. Quick response is appriciated.

    Hi Pratik,
         http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42?quicklink=index&overridelayout=true
    This link might help.
    regards
    Anupam

  • Copy and paste - can't copy parts of a SMS message

     I'm getting really frustrated with the copy part of copy/paste within a SMS. In the SMS - If I tap on any number or word = nothing happens (if nothing is underlined), If I tap on a number underlined = I get the option to phone or skype?? If I double click = nothing happens, If I do a long press I the options to:COPY MESSAGE TEXTFORWARD MESSAGECOPY MESSAGE TO SIM CARDDELETE MESSAGEVIEW MESSAGE DE TAILSADD STAR  If I want to copy some text (e.g. phone number, address, anything else) but not the whole SMS I cannot find a way to do it. Anyone else having this problem with SMS messages? Sometimes you need to extract info from the SMS to paste into an entry box on a website for example or to add to contacts etc. Can anyone help?  

    Hi and welcome to the community! Since you're new please be sure that you have checked out our Discussion guidelines.
    Unfortunately, it's not possible to copy parts of a text message in the pre installed messaging application. But if you press a number, you can open it with the phone application and copy the number from the dialer. And if you want to copy an URL, you can open the page and copy it from the URL-field.
    If you want parts from a text message, my best suggestion would be to copy the text into a notepad or similar and edit the text. Thereby, you can copy it with the text you want included.

  • How do I create a simple message board (forum)

    I am a BC new-bee. How do I create a simple message board (forum) in BC to use on a Muse site since no widget is available there.

    No worries,
    The simple way should be that:
    open your forum page in Muse
    under "object" > "insert HTML" > paste "{module_forum,a,}"
    click ok
    move the textbox to the right position
    now publish this page to your bc site
    if you have any forums set up in the admin of your site (http://yourdomain.com/admin) it should show you the title of the forum.
    if there are no forums set up, you will need to create a forum in bc (Modules > Forums)
    Try this and let me know how it turned out.
    [ advertising removed by admin ]

  • I put together and sent 10 pictures from my granddaughter's birthday party. Is there a way of sending them with a link recipients can click on, rather than having all the pictures download as part of the email message?

    I put together and sent 10 pictures from my granddaughter's birthday party. Is there a way of sending them with a link recipients can click on, rather than having all the pictures download as part of the email message?

    Hello userlarry, do you have Mobile Me? You could use that. Or you could compress them, you would still need to send them in an email, but it would help with size limitations of emails.
    To compress them, put them in a folder and right click on the folder. You should see a Compress option. Then just drag the .zip file into your mail.
    Regards,
    Graham

  • How can i send simple message from PC-to-another device

    How can i send simple message from PC-to-another device
    just simple message (like command String) not SMS or Data File.
    I have a computer with bluetooth and the oter side is Embeded Blue
    Thanks.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Mapping of Return code to Message class

    Hi all,
    My function module exports a return code in the variable l_ldaprc, there is a message class called ldaprc which has the text corresponding to the return code. Within my program i want to map this return code to the appropriate text in the message class so that i can display the text.
    Can someone help me with the syntax ?
    Awaiz

    Hi all,
      I was able to do the mapping using the following syntax.
    message id l_msgid type l_mtype number l_msgnum into l_rcmsg.
    where
    l_msgid type sy-msgid valus 'LDAPRC'
    l_msgnum mapped to l_ldaprc.
    Thank u all !

  • Synchronous message mapping - access to originating request message?

    Say you have a synchronous message - like a SOAP web service request - and you map it to an RFC call, is there any way for the message mapping from the RFC response message to the SOAP response message to access fields from the original SOAP request message?  Or even just a temporary storage area that I could store values from the originating request message?

    Hi Jonathon!
    First of all, why not access the original soap request message inside the RFC..you will be receiving this data in your RFC...is the RFC is standard, maybe you can make a wrapper with a Z RFC of your own to store the original data and use it later to build the RFC response.
    Another idea: you could call a RFC via JCO inside a UDF in mapping.. this RFC could write  some data in XI business system during the request mapping and another call to a "reading" RFC could read that data in the response mapping.
    Other idea: use BPM, you can use containers to store the request SOAP message, call synchronously the RFC and then use a transform step (mapping) to use the original request SOAP message and the RFC response message to "merge"/build the response for the SOAP.
    Regards,
    Matias.
    PD: please give points if useful.

  • Mapping Runtime failing for all messages

    Hi Experts,
    We are facing an issue with our mapping runtime in the integration engine. Any message going through the integration engine is giving a mapping error as shown below (for example):
    LinkageError during appliction Java mapping com/sap/xi/tf/_MessageAcknowledgement_to_Order_Responce_ERP_Async_In_ Thrown: java.lang.NoClassDefFoundError: com/sap/aii/utilxi/threadutil/ThreadUtil_map
    LinkageError during appliction Java mapping com/sap/xi/tf/_MM_Jdbc_test_ Thrown: java.lang.NoClassDefFoundError: com/sap/aii/utilxi/threadutil/ThreadUtil_map
    The complete trace of the error is attached here.
    The interfaces were working and messages were flowing normally. As part of our SAP HCM to SuccessFactors implementation, we configured 3 interfaces and even this was working fine. To solve a specific issue during implementation, we applied the following SAP notes:
    1869807 - SFSFI: PI Content Correction for HTTP Cookie Handling
    Pre-requisite for above note - 1838921 - Multiple cookies in HTTP Header
    After this, messages of all the interface in this system are failing with the above issue (LinkageError).
    Please guide us in resolving this issue.
    Thanks & Regards
    Sudheer

    Hi All,
    In addition to the above, if mapping is tested within ESR there is no issue. The problem is happening only during runtime.
    BTW, When we applied the note 1838921 we upgraded the Adapter Framework from SP09 to SP12.
    Could this be an issue?
    Regards,
    Sudheer

Maybe you are looking for

  • I have question on Oracle 9i space management.

    When I create a table. Table A field1 INTEGER field2 Date field3 Double field4 VARCHAR2(30) field5 Number(8). The question is, when field3 and field5 is NULL/Blank. Does Oracle allocated the space for the record even when field3 and field5 is blank o

  • Run a Crystal Report published on BW from SAP NetWeaver Portal without BOE

    Hi all, We need to create a report using Crystal Reports, save it to BW, publish it to SAP NetWeaver Portal, and run it from SAP NetWeaver Portal. We do not want to use BOE here. Currently, we are able to save the report on BW. With Xcelsius, we have

  • Windows 7 RC on mid-2007 MBP

    As a part-time Vista Bootcamp user, I was happy to have the opportunity for updating to 7. In preparation, I unpartitioned, then repartitioned, using the Boot Camp Assistant. Using the 32-bit Win 7 build 7100 (RC), I installed Windows with no issue.

  • How do I add just a portion of a song to iMovie?

    How do I add just a portion of a song to iMovie?

  • Service Master Upload way

    Can anyone tell me what is the way to upload service master?? I have created simple LSMW for the upload but it works in foreground only.In background it gives an exception error