Order05 Idoc mapping in SRM XML Structure

Hello All,
I need to map Idoc order05 from ERP system into SAP provided SRM XML Structure.
Anyone has done this sort of mapping before.
Let me know the details as XML has got some 4800 fields and Idoc has some 800 fields and SRM XML seems to be superset of Idoc from ERP.
Regards,Pankaj

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");;

Similar Messages

  • How to map a deep xml structure to flat structure

    Hi, I'm trying to map a deep xml structure to a flat file structure. See this:
    <SalesPoint>
             <header>
                  <idTx></idTx>
                  <opCode></opCode>
             </header>
             <body>
              <DataSet>
                   <codOperacion></codOperacion>
                   <codCanalDeVenta></codCanalDeVenta>
                   <cuitDeposito>
                   <docMinorista>
                   <fechaOperacion>
                   <codCC>
                   <Details>
                         <Dato>
                                        <nroSerieEquipo></nroSerieEquipo>
                            <codNMU></codNMU>
                            <codOrigenEquipo></codOrigenEquipo>
                            <codConcepto></codConcepto>
                             <codSegmento></codSegmento>
                            <motivoSiniestro></motivoSiniestro>
                         </Dato>
                   </Details>
              </DataSet>
             </body>
    </SalesPoint>
    to:
    <SalesPoint>
            <idTx></idTx>
            <opCode></opCode>
         <codOperacion></codOperacion>
         <codCanalDeVenta></codCanalDeVenta>
         <cuitDeposito></cuitDeposito>
         <docMinorista></docMinorista>
         <fechaOperacion></fechaOperacion>
         <codCC></codCC>
            <nroSerieEquipo></nroSerieEquipo>
            <codNMU></codNMU>
         <codOrigenEquipo></codOrigenEquipo>
         <codConcepto></codConcepto>
         <codSegmento></codSegmento>
         <motivoSiniestro></motivoSiniestro>
    </SalesPoint>
    Thanks in advance!!!!

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • 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");;

  • Idoc Order05 Mapping into SRM PO XML Structure

    Hello All,
    I need to map Idoc order05 from ERP system into SAP provided SRM XML Structure.
    Anyone has done this sort of mapping before.
    Let me know the details as XML has got some 4800 fields and Idoc has some 800 fields and SRM XML seems to be superset of Idoc from ERP.
    Regards,Pankaj

    Hi Lynton,
    the source structure is an XML purchase order. There is a business package available in XI for SAP SRM 5.5 SERVER (that's SRM 5), you will have to load this in XI and use the XML purchase order structure in that business package, this is your source message. Mapping is generally done in XI, so you don't have to implement any BADI.
    In SRM customising you have to activate the use of Exchange Infrastructure and make some settings for the use of XI.
    In the vendor master you will have to change the sending method to XI/XML, this will then automatically create the correct output for that vendor. You can look at this using the SXI_MONITOR transaction (or SXMB_MONI) after ordering a PO.
    Regards,
    Robin

  • Difference in XML structure from design time to run time

    Hi,
    My source message type that i have constructed has the following XML structure
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Employee_MT xmlns:ns1="http://accenture.com/RoutingBasedOnContextobjects">
             <Record>
                <Emp_Header>
                   <Key/>
                   <Emp_ID/>
                   <Emp_Name/>
                   <Emp_Location/>
                </Emp_Header>
                <Emp_Weekly_Details>
                   <Key/>
                   <Week_No/>
                   <Week_Hours/>
                   <Week_Wages/>
                </Emp_Weekly_Details>
                <Emp_Summary>
                   <Key/>
                   <Total_Hours/>
                   <Total_Wages/>
                </Emp_Summary>
             </Record>
          </ns1:Employee_MT>
       </ns0:Message1>
    </ns0:Messages>
    Whereas when I test the scenario using a test file based on my file content conversion that I have configured in the sender file adapter the XML for the sender message type that is constructed is as follows
    <?xml version="1.0" encoding="utf-8"?>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
         <Emp_Header>
              <Emp_ID>1000888</Emp_ID>
              <Emp_Name>Alex</Emp_Name>
              <Emp_Location>PDC</Emp_Location>
         </Emp_Header>
         <Emp_Weekly_Details>
              <Week_No>1</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Weekly_Details>
              <Week_No>3</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Summary>
              <Total_Hours>90</Total_Hours>
              <Total_Wages>1800</Total_Wages>
         </Emp_Summary>
    </Record>
    <Record>
         <Emp_Header>
              <Emp_ID>1000880</Emp_ID>
              <Emp_Name>Sam</Emp_Name>
              <Emp_Location>PDC</Emp_Location>
         </Emp_Header>
         <Emp_Weekly_Details>
              <Week_No>1</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Weekly_Details>
              <Week_No>3</Week_No>
              <Week_Hours>45</Week_Hours>
              <Week_Wages>900</Week_Wages>
         </Emp_Weekly_Details>
         <Emp_Summary>
              <Total_Hours>90</Total_Hours>
              <Total_Wages>1800</Total_Wages>
         </Emp_Summary>
    </Record>
    </ns:Employee_MT>
    The actual message mapping has the XML structure as
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Employee_MT xmlns:ns1="http://accenture.com/RoutingBasedOnContextobjects">
             <Record>
            </Record>
          </ns1:Employee_MT>
       </ns0:Message1>
    </ns0:Messages>
    whereas the XML structure that is being constructed by my sender file adapter is
    <?xml version="1.0" encoding="utf-8"?>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
    </Record>
    <Record>
    </Record>
    </ns:Employee_MT>
    Could someone tell me why there is difference in the XML structure that is being generated by my file sender adapter and how can I fix this problem.
    As a result of this when i copy the source payload from SXMB_MONI and put it in the test tab of message mapping the XML is not being well formed.
    Cheers,
    S

    these tag gets added automatically when u use multimapping concepts(by changing the messge type occ)
    copy ur entire source xml (from sxmb_moni) and paste it under the Messages and Message1 tags to test under ESR (test tab):
    something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns:Employee_MT xmlns:ns="http://accenture.com/RoutingBasedOnContextobjects">
    <Record>
    <Emp_Header>
    <Emp_ID>1000888</Emp_ID>
    <Emp_Name>Alex</Emp_Name>
    </Record>
    <Record>
    </Record>
    </ns:Employee_MT>
    </ns0:Message1>
    </ns0:Messages>

  • XSLT Mapping to convert u201C.CSVu201D file into XML Structure.

    Hi All,
    I wanted to know can we use XSLT Mapping to convert u201C.CSVu201D file into XML Structure.
    I am communicating between two XI Systems. First XI system is going to give u201C.CSVu201D file as main document. I need to post IDOC Corresponding to this. So what I want to do is read this u201C.CSVu201D file (Main document in payload) and first convet it into XML and then use second mapping which will convert XML to IDOC.
    I know this is possible with JAVA Mapping but just wanted to confirm can we do this with XSLT mapping as well?
    Regards,
    Gouri

    Hi Amit,
    I know this way it shd work as i am able see other XSLT files. But this particular file is not visible.
    I am copying following code only in sample.xslt file.
    <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:fn="fn"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      version="2.0" exclude-result-prefixes="xs fn">
    <xsl:output indent="yes" encoding="US-ASCII" />
    <xsl:param name="pathToCSV" select="'file:///c:/csv.csv'" />
    <xsl:function name="fn:getTokens" as="xs:string+">
        <xsl:param name="str" as="xs:string" />
        <xsl:analyze-string select="concat($str, ',')" regex='(("["]*")+|[,]*),'>
            <xsl:matching-substring>
            <xsl:sequence select='replace(regex-group(1), "^""|""$|("")""", "$1")' />
            </xsl:matching-substring>
        </xsl:analyze-string>
    </xsl:function>
    <xsl:template match="/" name="main">
        <xsl:choose>
        <xsl:when test="unparsed-text-available($pathToCSV)">
            <xsl:variable name="csv" select="unparsed-text($pathToCSV)" />
            <xsl:variable name="lines" select="tokenize($csv, ' ')" as="xs:string+" />
            <xsl:variable name="elemNames" select="fn:getTokens($lines[1])" as="xs:string+" />
            <root>
            <xsl:for-each select="$lines[position() &gt; 1]">
                <row>
                <xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+" />
                <xsl:for-each select="$elemNames">
                    <xsl:variable name="pos" select="position()" />
                    <elem name="{.}">
                    <xsl:value-of select="$lineItems[$pos]" />
                    </elem>
                </xsl:for-each>
                </row>
            </xsl:for-each>
            </root>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>Cannot locate : </xsl:text><xsl:value-of select="$pathToCSV" />
        </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    Is this correct?
    -Gouri

  • Convert IDOC XML structure to flat file - and now?

    Hi,
    we are working with input message ORDERS05 and want to convert it to flat file.
    So we used the implementation description from "how to convert an IDOC-XML structure to a flat file....".
    Looks like this is a standard procedure described here fitting for all IDOCs.
    We followed the guide, making XI ready for Abap-Mapping, implemented the Abap class like described, added an interface mapping with source ORDERS05 to a mess.type dummy destination, added with type Abap-class the class implemented from the guide and completed the Int.Dir. implementation.
    For comparism purpose we have two systems as receiver, one with a standard flat file with regular graph.mapping in XI, one with the Abap mapping.
    Result:
    Error description in SXMB_MONI:
    Didn´t expect something like that! The IDOC was delivered successfully to the other simple flat file receiver.
    Any idea what we made wrong (we are on SP17) or if there is a standard mistake you can do when following the guide?
    Best regards
    Dirk

    Hi,
    I've got the same problem. He the solution in my case:
    The problem is:
    My IDOC has no element <STDMES>, but the method IF_MAPPING~EXECUTE from the 'HOW-TO Guide' does not check this situation:
    el_element = idocument->find_from_name('STDMES').
    ls_edidc-stdmes = el_element->get_value().
    thows the exception.
    Solution:
    make shure that the field STDMESis set or change the method to:
    el_element = idocument->find_from_name('STDMES').
    if not el_element is initial.
        ls_edidc-stdmes = el_element->get_value().
    endif.
    Best regards
    Dieter

  • Issue with Contract Replication from SRM to MDM  - XML structure

    Hi
    We are having an issue with trnsfering a contract to MDM. We have released the contract for update to MDM in the contract through the distribute to catalog option. An XML is generated in SRM that gets sucessfully passed to PI through Catalogupdatenotification_out. In PI the XML fails in the Interface Determination step. the issue that has been noticed is that the XML that is generated in SRM does not contain product category or product ID which is basically what the condition mapping in PI checks for. The conditions in PI were setup as per SAP.
    But now the XML fails in PI because it does not find a combination for Catalog type code = 03 and product category. Please find the XML structure in SRM and you will see that it does not have a product category even though the contract has one.
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:CatalogTransmission xmlns:n0="http://sap.com/xi/EBP" xmlns:prx="urn:sap.com:proxy:SS1:/1SAI/TASDE808778FFEB81012891:701:2010/10/07">
    - <StandardBusinessDocumentHeader>
      <ID schemeID="0080">56000004100000000220110616202243</ID>
      <CreationDateTime>2011-06-16T20:22:43Z</CreationDateTime>
    - <SenderParty>
      <InternalID schemeID="PartyID" schemeAgencyID="SS1CLNT100">143</InternalID>
      </SenderParty>
      </StandardBusinessDocumentHeader>
    - <Catalog>
      <ID>5600000410</ID>
      <CatalogTypeCode>03</CatalogTypeCode>
    - <NameList>
      <Name>(Copy of Contract 5600000395)</Name>
      </NameList>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>true</CompleteTransmissionIndicator>
    - <ValidityDateTimePeriod>
      <StartDateTime>2011-06-13T12:00:00Z</StartDateTime>
      <EndDateTime>2012-06-12T12:00:00Z</EndDateTime>
      </ValidityDateTimePeriod>
    - <CatalogContent>
    - <ItemList>
    - <Item>
      <ID>1</ID>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>false</CompleteTransmissionIndicator>
    - <PropertyValuationList>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE</PropertyReference>
    - <PropertyValues>
    - <MultipleValue>
      <Index>1</Index>
    - <SimpleValue>
      <AmountSpecification currencyCode="USD">1.0</AmountSpecification>
      </SimpleValue>
      </MultipleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE_BASIS_QUANTITY</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <QuantitySpecification unitCode="EA">1.0</QuantitySpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>CCM/PMNTTRMS</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <NameSpecification>0002</NameSpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
      </PropertyValuationList>
      </Item>
    - <Item>
      <ID>2</ID>
      <ActionCode>04</ActionCode>
      <CompleteTransmissionIndicator>false</CompleteTransmissionIndicator>
    - <PropertyValuationList>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE</PropertyReference>
    - <PropertyValues>
    - <MultipleValue>
      <Index>1</Index>
    - <SimpleValue>
      <AmountSpecification currencyCode="USD">12.0</AmountSpecification>
      </SimpleValue>
      </MultipleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>/CCM/PRICE_BASIS_QUANTITY</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <QuantitySpecification unitCode="EA">1.0</QuantitySpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
    - <PropertyValuation>
      <PropertyReference>CCM/PMNTTRMS</PropertyReference>
    - <PropertyValues>
    - <SimpleValue>
      <NameSpecification>0002</NameSpecification>
      </SimpleValue>
      </PropertyValues>
      </PropertyValuation>
      </PropertyValuationList>
      </Item>
      </ItemList>
      </CatalogContent>
      </Catalog>
      </n0:CatalogTransmission>
    Edited by: vishakhrajeev123 on Jun 20, 2011 6:49 PM

    Dear Krupa,
    Thank you for your quick reply.
    So we should consider the scenario where SRM is the central repository for the contracts, and all the changes done in SRM should be replicated to ERP.
    In this scenario, do you know which steps should be done to allow contract replication from SRM to ERP? I already created a central contract in SRM but there is no message sent to PI.
    Thanks in advance.
    Regards,
    Andreia

  • 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

  • IDOC to PDF and XML via EMail: using InputAttachment interface in mapping

    Hello Together,
    I am working on the following scenario:
    IDOC --> Transformation Nr. 1 IDOC-XML; Transformation Nr.2 XML- PDF --> Email with 2 Attachments XML and PDF.
    Till now Iu2019ve managed "IDOC to Email" with XML-Attachment. Therefore I used MailPackage and SwapBean. Unfortunately I didnu2019t see any possibility to send PDF attachment with MailPackage approach.
    Thatu2019s why I decided to change the scenario in this way to avoid using of MailPackage:
    u2022     first step: IDOC to FTP (2 XML files)
    u2022     second step: FTP (1. file = payload + 2. file= attachment) to Email with one XML-attachment
    It works without MailPackage, but I still need the PDF-attachment. In the moment I am trying to read the XML-attachment,  to transform XML2PDF and to add the second attachment to the message inside of mapping . I use InputAttachment and OutputAttachment interfaces.
    http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/InputAttachments.html
    Unfortunately the reading of the XML-attachment with u201CInputAttachementu201D interface inside of mapping doesnu2019t work. Tracing says: "there is no attachment".
    So my questions are:
    1. Is it possible to work with Input- and OutputAttachement interfaces inside of mapping? Or does it work only inside of adapter module?
    2. If it works inside of mapping, how can I test it in design time?
    If you see any other way to solve my problem, let me know please.
    Thank you a lot, regards Anna

    Question Nr. 1:
    "... Mapping programs are executed in the Java part of SAP NetWeaver AS. Consequently, the mapping runtime transfers the message payload from the ABAP part of the SAP NetWeaver Application Server to the Java part before the mapping program is executed. Since mapping programs do not usually access any MIME attachments in a message, the default setting is for the mapping runtime to transfer the payload only and not the attachments. This applies for both attachments that are removed as part of MTOM optimization in the Web services runtime, as well as for attachments that a sender sends together with a payload by using proxy methods in the XI runtime.
    If you want to access an attachment from a mapping program, it must have been transferred from the ABAP part to the Java part prior to execution. You can configure this in the basic settings of the operation mapping in which you reference the mapping program (select the Read Attachments checkbox)..."

  • XML Structure Conversion using JAVA Mapping

    Hi Experts,
    I am having a requirement in which i want to convert the contents of source xml structure into a string and map it to the target field.
    Source Structure:
    <SRC>
    <Node1>ABCD</Node>
    <Node2>XYZ</Node2>
    <Node3>1234</Node>
    </SRC>
    Target Structure:
    <TRG>
    <Node1>ABCDXYZ</Node1>
    </TRG>
    Both the source and target structures are in xml format only.....just the condition is that I have to use Java mapping to achieve it.
    The contents of Source node Node3 are not to be mapped.
    Since I have very less knowledge of Java it will be very helpful if you provide the complete code to me.
    Thanks,
    Abhishek.

    Hello Udo,
    Thank you for reply. It seems ABAP mapping is easier.
    What do you think about the idea of using Value Mapping for such conversion task? In this case is it obligatory to use Java coding? And how about performance - will it be better than in case of ABAP mapping, can you say?
    Thank you,
    Igor

  • XML structure - mapping one Oracle column to many XML attributes

    Hi,
    I need to insert data into EMP table reading from xml file and this is how the file would look like....
    <?xml version='1.0'?>
    <ROWSET>
    <ROW num="1">
    <EMPLOYEE_ID>7369</EMPLOYEE_ID>
    <LAST_NAME>Smith</LAST_NAME>
    <FIRST_NAME>JOHN</FIRST_NAME>
    <PHONE> 905000123</PHONE>
    <PHONE> 905000456</PHONE>
    <PHONE> 905000789</PHONE> ...... n
    (There could be many phone numbers in the xml file and I need to concatenate all the numbers and insert in the PHONE column of emp table)
    <SALARY>800</SALARY>
    </ROW>
    <!-- additional rows ... -->
    </ROWSET>
    I am new to XML and would to know the set of lines required to read the data from xml and insert into EMP table. All this is for Oracle 10g R2.
    Please let me know solution using XSU if possible.

    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

  • Mapping flat xml file to xml Structure

    Hi all,
    i have to map an xml file, wich is incoming via a RFC call in a flat import field, to a xml-Structure. The xml Structure has the same Structure except that it is not flat but even as a xml-Structure in the Repository. Ist ther a way to make a 1:1 - Mapping?
    Regards Mathias

    Hi,
    This can be done very easily using Java Mapping.
    Parse the flat xml String using Dom4j and directly set this as the target structure.
    eg code:
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException{
    String flatXml = "the flat xml string";
    Document doc = DocumentHelper.parseText(flatXml) ;
    out.write(doc.asXML().getBytes());
    Regards,
    P.Venkat

  • Message Mapping from flat XML to a Record structure

    Hi All,
    We have a scenario in which the input message is a PDF document. we are following below the blog to convert PDF to XML format which uses <b>PDF box utitlity</b>.
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    We are able to convert the PDF doc to a flat XML file.
    Now we have the following queries...
    what are the different ways to map the flat XML to our record structure?
    Do we have any utitlity in PDF box to do that?
    Regards,
    Rakesh.

    Hi Rakesh,
    You have Graphical mapping, Java mapping, ABAP mapping and XSLT mapping. The choice depends on the scenario and what target result you require.
    <b>Message mapping using graphical mapping editor:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    <b>XSLT mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    <b>Java Mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>ABAP mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    As said earlier, graphical mapping is the simplest and quite a few built in options are available with it, explore it and see which is suitable for your scenario.
    Regards,
    Chandra

  • IDOC Mapping Structure

    Dear All,
    We are working on File-PI-IDOC interface in which from file we are creating employee in SAP using IDOC HRMD_A.HRMD_A07.
    I have gone through some blogs on SDN and it suggests that IDOC structure to be filled like as shown below:
    e1plogi
    e1pityp
    e1p0000
    e1pityp
    e1p0001
    e1pityp
    e1p0002
    Whereas the standard IDOC structure is like as follows:
    e1plogi
    e1pityp
    e1p0000
    e1p0001
    e1p0002
    Please suggest how can we get the structure as specified above. My input structure of the file is as below:
    pa0000
    pa0001
    pa0002
    Reg,
    NJ

    If you have any issue for understanding the structure of IDoc, try to fill that structure on Application System in WE19 Mannually.
    you can check these issue there on application system (Test IDoc) WE19.
    create mappiing & make change in mapping after that.

Maybe you are looking for