Mapping an XML structure into one field

Make use of XSLT mapping (available on SDN...just search with CDATA...i think there is a new feature in PI7.1 (Copy XMl to subtree....something like that).
Regards,
Abhishek.

Hi,
Chk this:
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
Re: Conversion of source XML structure to single string using PI 7.1
Thanks
Amit

Similar Messages

  • Mapping complete input XML structure into one field on target

    Hi,
    I have a scenario where I need to map the complete input XML structure as it is, into one field on target side. so can we achieve this in Graphical Mapping? If yes, please share your valuable info.
    Regards,
    Shiva.

    Hello,
    this is the java map code.just compile it and made a .zip file import it and use it Interface Mapping.
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;

  • XML into one field

    Hi , we have a scenario where we have to move entire source structure into one of the fields of the target structure.
    Example:
    Source:
    item1
    description
    store
    storedescription
    price
    batch
    Target:
    item1
    store
    xmlstring
    we would like to do following mappings:
    1. item1 in source to item1 in target
    2. store in source to store in target
    3. entire source structure in XML format into xmlstring in target
    we reffered following blog , but couldnt map to our requirement.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    XML to single element: Attn: Henrique
    Thanks,
    Rajesh

    HI
    I think you need to write UDF for this. there is library from apache called XML Serializer. Below is the sample file how you achieve that using that. Use that code in your UDF.
    http://www.informit.com/articles/article.asp?p=31349&seqNum=3&rl=1
    Even just concatenate into one field in the target during mapping and the send the data . this could also achive your requirments. no need to go for Java mapping
    thanks
    Swarup
    Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM
    Edited by: Swarup Sawant on Feb 15, 2008 11:42 AM

  • Source xml is in one field

    Hi all,
    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1.
    Thanks Janos

    How to do the mapping since all source xml is in one field. I am on PI 71 ehp1
    Is your source structure something like:
    <SRC>
    <Filed1><Name>SAP</Name><Location>Germany</Location></Field>
    </SRC>
    i.e. an XML in one node and now you want to separate it into the relevant message structure in XI?
    If yes then follow the De-serialization logic as mentioned by Udo in this thread:
    Re: Changing XML message into a string
    Regards,
    Abhishek.

  • How to change  XML  Structure from one form to another form using OO ABAP.

    Hi Experts,
    In my Scenario, i need to do ABAP Mapping in order to change Incoming structure from one form to another.
    My Input to ABAP Mapping (OO ABAP Program)would be :
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
         <D>..........</D>
         <E>..........</E>
         <F>..........</F>
    OO ABAP Program need to read this input and change the XML Structure into below form:
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
          <X>
                <D>..........</D>
                <E>..........</E>
          <F>...............<F>
    Please provide inputs (sample Code) to solve this issue.
    Thanks,
    Kish.
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:51 PM
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:52 PM

    Hi,
    Please provide sample code or Material for converting XML Structure from one form to another using OO ABAP and
    Steps for ABAP MAPPING.
    Thanks,
    Kish.

  • How to merge many XML files into one?

    Hi: I got a small project to combine many XML files into one and convert the combined XML file in Excel using AppleScript. My XML files look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
    </Metadataobject>
    and like this...
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
    </Metadataobject>
    I get many XML files like this. And I want them to be combined and shown like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <job id="1">
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
        </job>
        <job id="1">
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
        </job>
    </Metadataobject>
    And finally the combined XML file converts in Excel sheet with column headings "Job ID", "From", "Job Name" and so on...
    Or there is another best way to get the same result...
    Thanks

    That is just an intermediary state to get to the excel version. Actually I get many small XML files (as shown above) from client and I want them all combined in an excel sheet with common column headings... like this...
    from
    jobname
      pages
    priority
    timezone
    year
    month
    day
    hour
    id
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    1
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    2
    Thanks for your response.

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

  • BI for NW04S: Concatenating multiple chars into one field in BI query

    Hi,
      We have BI for NW04S. We have a requirement of concatenating multiple characteristics into one field in the BI report. This single field should have the usual drill down and other olap functionalities that a single characteristic usually enjoy in a BI report.
      In BI for NW04 (Not the S) this probably can be done using the table interface in WAD. However in BI7 WAD functionality are through Java.
      Also can this be done using Query designer alone.
      Can anybody help?
      Thanks

    Hi,
      Can you please elaborate on your Query designer option. You can always have a variable and in the user exit can write code, but what is not clear that
    1> How will you acheive the contatenation done for every row of the report in the BEX user exit variable( since it's called during the beginning of the query execution and not for all rows of the report
    2> How do you transfer the char variable into a char field in the report.
    Please elaborate .
    Thanks

  • Multiple Checkbox Values Into One Field

    Hopefully someone can help me with this issue I'm having.
    I'm trying to save the values of multiple selected checkboxes into one field separated by commas through ADDT's Insert Transaction code. I can do this easily with DW's standard insert record wizard by using the PHP implode() function but I haven't been able to figure it out with ADDT's code.
    <form>
    <input type="checkbox" value="1" name="program[]" /> Program One
    <input type="checkbox" value="2" name="program[]" /> Program Two
    <input type="checkbox" value="3" name="program[]" /> Program Three
    <input type="checkbox" value="4" name="program[]" /> Program Four
    </form>
    THIS IS ADDT'S CODING
    $ins_quoteManager->addColumn("programs", "STRING_TYPE",  "POST", "programs");
    THIS WORKS VIA DREAMWEAVER'S INSERT RECORD WIZARD
    Original: GetSQLValueString($_POST['programs'], "text"),
    Modified: GetSQLValueString(implode(',',$_POST['programs']), "text"),
    Anyone know how to modify the ADDT code with the implode function to get this to work?

    Have you tried ADDT´s "comma-separated checkboxes" form control, which will also store the values into a field of your choice (and of course retrieve them from there on update record - pages) ? The only possible drawback might be, that the checkboxes can´t be defined statically, means that the array of value/label - pairs will be retrieved from another table by establishing an additional recordset.
    Cheers,
    Günter

  • Putting 7 table fields into one field with line breakes included!

    Hi People
    I Need to assamble 7 fields from a view, into one field with some line brakes in Reports, how do I do that???
    E.g :
    Field names : Name, Collection1, StreetName, StreetNo, ExtraCity, ZipCode, City
    Should be put into one field called address and be displayed like this
    Name
    Collection1
    StreetName StreetNo
    ExtraCity
    ZipCode City
    I hope someone can help me *S
    /Stig :-)

    The following should give you some idea. It might depend if you run your report on Windows or Unix.
    select
    Name        || decode(Name, null, null, chr(13)||chr(10))||
    Collection1 || decode(Collection1, null, null, chr(13)||chr(10))||
    StreetName  || decode(StreetName, null, null, ' '||StreetNo||chr(13)||chr(10))||
    ExtraCity   || decode(ExtraCity, null, null, chr(13)||chr(10))||
    ZipCode     || decode(ZipCode, null, null, ' '||City )
    from MyView

  • XML Unbounded values into one field - Message Mapping

    Dear All,
    I am trying to convert an unbounded multifield XML structure to a 0.1 field so that the maltiple values are mapped into a single fields in semi-colon seperated fasion.
    The source:
    <MT_dates>
       <date>05-10-2011</date>
       <date>10-11-2011</date>
       <date>10-12-2011</date>
       <date>10-13-2011</date>
    </MT_dates>
    date field is 0.. unbounded
    target
    <MT_dates>
       <dates>05,10,2011;10,11,2011;10,12,2011;10,13,2011</date>
    </MT_dates>
    dates field is 0 .. 1
    can anybody please help?
    Regards,
    Haik

    chk this:
    input will be : var1
    execution type All values of a context
    int a = var1.length;
    String b="";
    for(int i=0;i<a;i++)
    b =b +var1<i> + ";";
    int c=b.length();
    String output =b.substring(0,c-1) 
    result.addValue(output);
    date-UDF--dates

  • Problems with mapping after bundling messages into one XML-file

    Hi all,
    Case 1: one DebMas IDoc ==> XI ==> one XML-file : no problems with mapping.
    Case 2: several DebMas IDoc's ==> XI ==> one XML-file : problems with mapping.
    Explanation:
    Incoming DebMas IDoc's:
    Businesspartner 1 : no Customer Master Partner Functions (E1KNVPM).
    Businesspartner 2 : Customer Master Partner Functions (E1KNVPM).
    Businesspartner 3 : Customer Master Partner Functions (E1KNVPM).
    Businesspartner 4 : Customer Master Partner Functions (E1KNVPM).
    After bundling into one XML-file:
    Businesspartner 1 : no Customer Master Partner Functions (E1KNVPM).
    Businesspartner 2 : no Customer Master Partner Functions (E1KNVPM) !!!!
    Businesspartner 3 : Customer Master Partner Functions of Bp 2 (E1KNVPM) !!!!.
    Businesspartner 4 : Customer Master Partner Functions of Bp 3 (E1KNVPM) !!!!.
    All the payloads of the IDoc's are correct.
    In the message mapping we use a Container for the Partner Functions (shown as below)
    Is this a serious bug in the mapping of SAP XI ?
    Does anyone knows how to solve this serious problem.
    E1KNVVM -
    > Partner_Container
    E1KNVPM -
    > Partner
       PARVW -
    > ParnerRole
       KUNN2   -
    > PartnerNumber
    Regards,
    Theo Pijlman

    Hi,
    Example:
    Input idoc has field F1 with occurence 0..unbnd
    My input values for field F1 is
    1
    none
    2
    3
    Say, I have a mapping, F1---->TargetF1
    In the target only 3 TargetF1s will be created for the values 1,2,3 and nothing will be created for the field F1 with no value.
    To overcome this, use collapse contexts.
    F1->collapsecontexts>TargetF1
    This way, the TargetF1 fields created will have the following values:
    1
    blank
    2
    3
    Collapse contexts makes sure that a target is created, even if there is a context change specified at the source.
    Hope this is clear.
    Regards,
    Smitha.

  • Question: map the whole source message into one field in the target.

    Hi Friends,
    Is there a way to populate the whole source message into one of the fields in the target message?
    I am trying to do this in message mapping. Guide if this could be done in any other way or is there a way to do it in message mapping.
    Waiting for your valuable guidance,
    Regards,
    Lakshmi

    Hi Friends,
    I tried to convert the source message into a string using XSLT mapping. It was successful, however i need to have the source message in XML format and not in any other format. This is because, I am mapping the source XML into a field in a WSDL. The webservice requires the entire source message be inside a field called "Request" in the WSDL (it is like XML inside another XML).
    Is there any way to do this? Please suggest.. (Im not good at java programming... may be i dont know)

  • Total XML structure into single table field

    Hello All,
          I want to send total XML structure(including Tags and Data) into single field in a Table.
    Ex: <MaterialDetails>
           <MaterialNumber>00111</MaterialNumber>
           <MaterialQuantity>200</MaterialQuantity>
         </MaterialDetails>
    Plz Can anyone tell me How to do this indetail?
    Thanks
    San

    Generate this entire string in a UDF and assign it to the respective element.
    VJ

  • ..how do you group fields together in xml into one field? (sql:- address_line1||', '||address_line2||', '|| )

    afternoon Gurus.
    I take it by the errror messages produced I'm not able to do this..
    select ....
    address_line1||', '|| address_line2||', '|| address_line3||', '|| city|| Supplier_Address
    from...
    ..in my XML Publisher xsl Data Template file..
    Caused by: org.xml.sax.SAXParseException: <Line 13, Column 20>: XML-20201: (Fatal Error) Expected name instead of |.
    So how can I acheive putting several fields into one like you can in SQL?
    THanksForLooking..
    Al

    Untested, but try the following:
    SELECT DISTINCT
           fnd.CREATION_DATE
          ,fnd.user_name
          ,fnd.start_date
          ,per2.last_updated_by
          ,per2.last_update_date
          ,per2.employee_number
          ,per2.EMAIL_ADDRESS
          ,per2.full_name
          ,fnd.LAST_LOGON_DATE
    FROM fnd_user fnd
    where fnd.End_Date is null
    left outer join per_people_f per2 on (     fnd.employee_id              = per2.person_id
                                           and SUBSTR(per2.LAST_NAME, 2, 6) not like 'some characters'
                                           and per2.EMAIL_ADDRESS           LIKE '%priddle%' )
    ORDER BY 2 ASC;Investigate multiple outer joins using the LEFT OUTER JOIN syntax
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/queries006.htm#SQLRF52354

Maybe you are looking for