XML Structure in XML Component

Hi,
I'm trying to build an XML component in Portal 9.0.2.
What I need to know is the structure of the XML generated by SQL placed inside the <ORACLE> tags so I can parse it with the XSL style sheet.
All the examples I've seen (about 2) show the sql coming out in one lump in a table, but I want to be able to parse individual columns from the SQL. All I seem to get is a default presentation of the data.
Any Ideas ?

Hi,
This is not possible currently. There is an enhancement filed for this.
Thanks,
Sharmila

Similar Messages

  • 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>

  • How to modify Source XML Structure as it is getting Fail in message Mapping

    From Client , I am Gettin Such XML Structure in XML File ...But it is getting failed in Message Mapping ,.,,
    <?xml version="1.0"?>
    <invoice>
       <Header>
          <DOCID>0001</DOCID>
          <DOCNO>0001</DOCNO>
          <INVAMT>1000</INVAMT>
       </Header>
    </invoice>
    I tried to find out few things ...
    On test of mesage mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:invoice xmlns:ns0="urn:sample.com:file:file">
       <Header>
          <DOCID>0001</DOCID>
          <DOCNO>0001</DOCNO>
          <INVAMT>1000</INVAMT>
       </Header>
    </ns0:invoice>
    This mapping is getting successful.
    So Problem I found Is difference in Sender File Structure from autogenrated Source Structure in Test tab :  
    </invoice>
    and
    <ns0:invoice xmlns:ns0="urn:sample.com.com:Invoice:DB">
    Please Suggest : What to do ?
    How to add this ns0: before INVOICE and :ns0="urn:sample.com.com:Invoice:DB" after INVOICE in Source Structure.
    I am using PI 7.0
    regards
    Prabhat

    Hi Prabhat,
    the easiest way is to make the field XML Namespace of the source Message Type blank.
    Regards,
    Udo

  • How can I get the XML structure from a flat structure?

    Hi all,
    in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
    The structure that I receive have this format:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
    <NumberRecordType_B><NumberRecordType_c>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    and the customer don't want to insert a line separator.
    Then, the question is:
    How can I get the XML structure from this structure?
    If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
    PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
    Best Regards,
    Paolo

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • One Communication Channel for two XML-Structure

    Hi to all!
    i'm Newbee in XI.
    i register one Communication Channel to recieve two different XML-Structure and when i sent second structure there was a Mapping error, because XI waiting for first XML-Structure.
    I'd like to ask if there are any additional condition that i must tune up to make it possible or just it's impossible?

    Hi,
    Please refer below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/121b053d-0401-0010-539f-f9295efb7bad
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3a913f71-0601-0010-7a83-dfd3208a9a0b
    how to find the URL of deployed Web services?
    Creating .NET Web service
    http://www.15seconds.com/issue/010430.htm
    Also refer SOAP Framework to generate the common wsdl for both the messages with single SOAP CC
    http://help.sap.com/saphelp_nw04s/helpdata/en/bb/ddb33d2ae46b3be10000000a114084/frameset.htm
    Thanks
    swarup

  • Special characters in XML structure when prepared using String

    Hi,
       I am preparing an XML structure using 'String'. I print the prepared XML structure in the server log. Issue is that I am seeing extra characters([[ and ]]) that I am not printing.
    Please let me know how to get rid of those.
    Code Excerpt
            String xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
            String lsb_xmlcon = xmlHeader;
            logger.info("ReqXMLString Process  1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("<REQUEST>");
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.2  --->" + lsb_xmlcon);
    Log
    ReqXMLString Process  1  ---><?xml version="1.0" encoding="utf-8" ?>
    ReqXMLString Process  1.1  ---><?xml version="1.0" encoding="utf-8" ?>[[
    ReqXMLString Process  1.2  ---><?xml version="1.0" encoding="utf-8" ?>[[
    <REQUEST>
    Thanks,
    Message was edited by: 996913
    This issue is observed only while running the code in server, not from Jdev.
    When we append the additional tags without new line character, "\n", there are no extra characters being added. Also, in other case also. where we used "Marshaller" to prepare the XML, we have seen this issue.
    After we set the below property to false, we got rid of the extra characters.
                            jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, false);
    Apparently the insertion of new line when the code runs on server(Weblogic 10.3.6.0) is creating the issue.
    Please let me know if anyone has come across a similar scenario.
    Thanks,

    I am building this XML in a servlet so ,right, DOM does process XML (even though a valid HTML file can be loaded into a DOM object) but if you build XML using DOM then write the XML out using PrintWriter and Transformer objects this will cause the XML to print out in your browser. If you view source on this XML you will see that the DOM object has translated all special characters to there &xxxx; equivalent. For a example: when the string (I know "cool" java) gets loaded into a attribute using the DOM object then wrote back out it looks like (I know &xxx;cool&xxx; java) if you view the source in your browser. This is what it should do, but the DOM object is not change the � to the "&xxxxx;". This servlet is acting as a gateway between a Java API and a windows asp. The asp will call the servlet expecting to get XML back and load it directly into a DOM object. When the windows DOM object gets the xml that I am returning in this servlet is throws a exception "invalid character" because the � was not translated to &xxxx; like the other characters were. According to the book HTML 4 in 24 hours (and other references) the eacute; or #233; are how you say "�" in HTML or XML. How do you say it?

  • How to use For-Each Structure with Multiple node XML structure

    Hi,
      How to use for-each (BPEL 2.0) construct for Multinode XML structure.
    Here is the easy case: I have list of suppliers specified by supplier
    <supplierList>
    <supplier>1</supplier>
    <supplier>2</supplier>
    <supplier>3</supplier>
    </supplierList>
    Now there is a web service http://hostname/getsupplierdetails/wsdl which accepts one supplier at a time.
    like
    <supplier>1</supplier>
    reponse object is
    <message> notfound/found </message>
    But how can I use for each of XML node to call this service and collect the result like
    <supplierList1>
         <Suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
        <suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
    </supplierlist1>
    Thanks

    For looping you use foreach loop and , loop for the number of occurences and when constructing response, adding a new element you have to use bpelx:append.  Good sample at Enterprise Integration: Oracle SOA Suite 11g: Populating a list or an array in BPEL without using XSLT.

  • Javax.xml.rpc.soap.SOAPFaultException: Component Interface API

    Hello,
    I built a portlet which includes a web service proxy. After I deployed the portlet to OAS and tried to load, I got the following errors:
    ERROR: Failed to handle HTTP Request
    javax.xml.rpc.soap.SOAPFaultException: Component Interface API.
    at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:555)
    at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:396)
    at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
    at edu.bgsu.psft.bursar.proxy.runtime.CI_BG_CI_BURSAR_ACCT_SUMM_Binding_Stub.CI_BG_CI_BURSAR_ACCT_SUMM_G(CI_BG_CI_BURSAR_ACCT_SUMM_Binding_Stub.java:76)
    at edu.bgsu.psft.bursar.proxy.CI_BG_CI_BURSAR_ACCT_SUMM_PortClient.CI_BG_CI_BURSAR_ACCT_SUMM_G(CI_BG_CI_BURSAR_ACCT_SUMM_PortClient.java:44)
    at htdocs.mybursaraccount._MyBursarAccountShowPage._jspService(_MyBursarAccountShowPage.java:206)
    at com.orionserverhttp://Oracle Application Server Containers for J2EE 10g (10.1.2.3.0).http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermindhttp://Oracle Application Server Containers for J2EE 10g (10.1.2.3.0).server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
    Can anyone give me some ideas?
    Thanks!

    Hello,
    I built a portlet which includes a web service proxy. After I deployed the portlet to OAS and tried to load, I got the following errors:
    ERROR: Failed to handle HTTP Request
    javax.xml.rpc.soap.SOAPFaultException: Component Interface API.
    at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:555)
    at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:396)
    at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
    at edu.bgsu.psft.bursar.proxy.runtime.CI_BG_CI_BURSAR_ACCT_SUMM_Binding_Stub.CI_BG_CI_BURSAR_ACCT_SUMM_G(CI_BG_CI_BURSAR_ACCT_SUMM_Binding_Stub.java:76)
    at edu.bgsu.psft.bursar.proxy.CI_BG_CI_BURSAR_ACCT_SUMM_PortClient.CI_BG_CI_BURSAR_ACCT_SUMM_G(CI_BG_CI_BURSAR_ACCT_SUMM_PortClient.java:44)
    at htdocs.mybursaraccount._MyBursarAccountShowPage._jspService(_MyBursarAccountShowPage.java:206)
    at com.orionserverhttp://Oracle Application Server Containers for J2EE 10g (10.1.2.3.0).http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermindhttp://Oracle Application Server Containers for J2EE 10g (10.1.2.3.0).server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
    Can anyone give me some ideas?
    Thanks!

  • Source structure of XML file as different from Message type?

    Hi,
    We are picking an xml file from the FTP server of the client.
    We have source message type 'MT_Invoice' with data type as 'DT_Invoice'.
    When we open the message mapping test tab, the source structure is as shown below.
    <ns0:MT_Invoice xmlns:ns0="urn:maxxium:nordic:invoice:inbound">
       <Invoices>
          <Invoice>
          </Invoice>
       </Invoices>
    </MT_Invoice>
    My question is "What should be the structure of the XML file that the client is depositing on to the FTP server?".
    Should it start with the tag 'MT_Invoice' with the namespace or should it simply start from    <Invoices> tag.
    I have tried various combinations for the source xml structure. But all are failing.
    (This is evident from the fact that the mapping is failing. That's why I have given the structure from the source structure of the message mapping tab.)
    Kindly help.
    Thanks,
    John

    >
    john j wrote:
    > Hi,
    >
    > We are picking an xml file from the FTP server of the client.
    >
    > We have source message type 'MT_Invoice' with data type as 'DT_Invoice'.
    >
    > When we open the message mapping test tab, the source structure is as shown below.
    >
    > <ns0:MT_Invoice xmlns:ns0="urn:maxxium:nordic:invoice:inbound">
    >    <Invoices>
    >       <Invoice>
    > .
    > .
    > .
    > .
    >       </Invoice>
    >    </Invoices>
    > </MT_Invoice>
    >
    > My question is "What should be the structure of the XML file that the client is depositing on to the FTP server?".
    >
    > Should it start with the tag 'MT_Invoice' with the namespace or should it simply start from    <Invoices> tag.
    >
    > I have tried various combinations for the source xml structure. But all are failing.
    >
    > (This is evident from the fact that the mapping is failing. That's why I have given the structure from the source structure of the message mapping tab.)
    >
    > Kindly help.
    >
    > Thanks,
    > John
    you are picking an XML file. So you should create the MT which would represent exactly the XML format of the source file.
    So ideally if your file starts with <invoice>, then name your MT as invoice

  • Attribute "action" missing or wrong XML structure

    Does anyone know what's the problem of below XML format ?   I want to triggle a stored procedure in AS/400 from SAPXI after receiving records.  But the message "No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)" is found
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_t1 xmlns:ns0="http://cxx.xxx.hk/zxxxpxx/jdbc">
       <storedProcedurename>
          <action>EXECUTE</action>
          <table>LIBRARY.PROCNAME</table>
          <TRNX_TYPE IsInput="true" TYPE="CHAR">content 1</TRNX_TYPE>
          <TRNX_NO IsInput="true" TYPE="CHAR">content 2</TRNX_NO>
       </storedProcedurename>
    </ns0:MT_t1>

    Dear all,
    Thanks for your help and now I can submit a stored procedure via SAP XI by using below XML format.  I try to define two output parameters at the end of this XML. How to get the return value ? Should I define a response message type ? and what is the XML format ?
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_SYN_t1 xmlns:ns0="http://xxx.xxu.hk/zxxxpgs/jdbc">
       <update>
          <storedProcedurename action="EXECUTE">
             <table>LIBRARY.PANSYTEST</table>
             <TRNX_TYPE IsInput="TRUE" TYPE="CHAR">4</TRNX_TYPE>
             <TRNX_NO IsInput="TRUE" TYPE="CHAR">2</TRNX_NO>
             <ACTIN IsInput="TRUE" TYPE="CHAR">23</ACTIN>
             <RCRT_DATM IsInput="TRUE" TYPE="CHAR">3</RCRT_DATM>
             <RCRT_USER IsInput="TRUE" TYPE="CHAR">8</RCRT_USER>
             <STUD_ID IsInput="TRUE" TYPE="CHAR">8</STUD_ID>
             <AWD_SEQ IsInput="TRUE" TYPE="CHAR">6899</AWD_SEQ>
             <AW_PSDATE IsInput="TRUE" TYPE="CHAR">89</AW_PSDATE>
             <AW_PEDATE IsInput="TRUE" TYPE="CHAR">99</AW_PEDATE>
             <OUT_TRNX_TYPE IsOutput="TRUE" TYPE="CHAR">4</OUT_TRNX_TYPE>
             <OUT_TRNX_NO IsOutput="TRUE" TYPE="CHAR">2</OUT_TRNX_NO>
          </storedProcedurename>
       </update>
    </ns0:MT_SYN_t1>

  • 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

  • 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

  • Download XML structure to Application server

    Hi all.
    I am generating an XML structure based on some data that I select from HR e-Recruiting, and I need to save the generated XML file on the application server, not the presentation server (local computer). Most of the code I have found on SDN (contributed by Robert Eijpe) and I must admit that I do not understand everything the code does.
    I have attached the source code and the resulting XML structure:
    REPORT  zhr_test2_tk.
    TYPE-POOLS: ixml.
    TYPES: BEGIN OF xml_line,
            data(256) TYPE x,
           END OF xml_line.
    DATA: l_ixml            TYPE REF TO if_ixml,
          l_streamfactory   TYPE REF TO if_ixml_stream_factory,
          l_ostream         TYPE REF TO if_ixml_ostream,
          l_renderer        TYPE REF TO if_ixml_renderer,
          l_document        TYPE REF TO if_ixml_document.
    DATA: l_element_position TYPE REF TO if_ixml_element,
          l_element_title    TYPE REF TO if_ixml_element,
    *        l_element_flight  TYPE REF TO if_ixml_element,
    *        l_element_from    TYPE REF TO if_ixml_element,
    *        l_element_to      TYPE REF TO if_ixml_element,
            l_element_dummy   TYPE REF TO if_ixml_element,
             l_value           TYPE string.
    DATA: l_xml_table       TYPE TABLE OF xml_line,
          l_xml_size        TYPE i,
          l_rc              TYPE i.
    DATA: lt_erec TYPE TABLE OF hrp5126,
          l_erec TYPE hrp5126.
    DATA: date(10),
          time(4),
          filepath TYPE string.
    CONSTANTS: filedir TYPE string VALUE 'C:tmp',
               filename TYPE string VALUE 'ZHR_test'.
    START-OF-SELECTION.
    * fill internal table
      SELECT * FROM hrp5126 INTO TABLE lt_erec.
    * Start filling xml DOM object from internal table lt_erec.
      LOOP AT lt_erec INTO l_erec.
    *Create the root node 'position'
        IF sy-tabix EQ 1.
    *     create an ixml factory
          l_ixml = cl_ixml=>create( ).
    *     create Document Object Model
          l_document = l_ixml->create_document( ).
    *    Fill root node with value 'position'
          l_element_position = l_document->create_simple_element(
                         name   = 'position'
                         parent = l_document ).
        ENDIF.
        IF sy-tabix GT 1.
    *     create element jobtitle as child of position
          l_value = l_erec-jobtitle.
          l_element_title = l_document->create_simple_element(
                             name   = 'job_title'
                             parent = l_element_position
                             value  = l_value ).
          l_value = l_erec-empl_start_date.
          l_element_dummy = l_document->create_simple_element(
                             name   = 'StartDate'
                             parent = l_element_title
                             value  = l_value ).
          l_value = l_erec-empl_end_date.
          l_element_dummy = l_document->create_simple_element(
                             name   = 'EndDate'
                             parent = l_element_title
                             value  = l_value ).
        ENDIF.
      ENDLOOP.
      IF sy-subrc NE 0.
        WRITE: 'No data in table hrp5125'.
      ENDIF.
    * create a stream factory
      l_streamfactory = l_ixml->create_stream_factory( ).
    * connect internal XML table to streamfactory
      l_ostream = l_streamfactory->create_ostream_itable(
                      table = l_xml_table ).
    * render the document
      l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                            document = l_document ).
      l_rc = l_renderer->render( ).
    * Get time and date
      WRITE sy-uzeit+2(2) TO time+2(2).
      WRITE sy-uzeit+0(2) TO time+0(2).
      WRITE sy-datum+4(2) TO date+0(2).
      WRITE sy-datum+6(2) TO date+2(2).
      WRITE sy-datum+0(4) TO date+4(4).
    *Build filename with date and time reference
    CONCATENATE filedir filename date time '.xml' INTO filepath.
    <i>* This is the code I hope to modify in order to save the xml structure on the application server, with a specified filepath.</i>
    <b>  OPEN DATASET filepath FOR OUTPUT IN BINARY MODE.
      LOOP AT lt_erec into l_erec.
        TRANSFER  l_erec TO filepath.
      ENDLOOP.
      CLOSE DATASET filepath.</b>
    * save XML document
      l_xml_size = l_ostream->get_num_written_raw( ).
    *This is the code for download to local computer
    *  CALL METHOD cl_gui_frontend_services=>gui_download
    *    EXPORTING
    *      bin_filesize            = l_xml_size
    *      filename                = filepath
    *      filetype                = 'BIN'
    *    CHANGING
    *      data_tab                = l_xml_table
    *    EXCEPTIONS
    *      file_write_error        = 1
    *      no_batch                = 2
    *      gui_refuse_filetransfer = 3
    *      invalid_type            = 4
    *      no_authority            = 5
    *      unknown_error           = 6
    *      header_not_allowed      = 7
    *      separator_not_allowed   = 8
    *      filesize_not_allowed    = 9
    *      header_too_long         = 10
    *      dp_error_create         = 11
    *      dp_error_send           = 12
    *      dp_error_write          = 13
    *      unknown_dp_error        = 14
    *      access_denied           = 15
    *      dp_out_of_memory        = 16
    *      disk_full               = 17
    *      dp_timeout              = 18
    *      file_not_found          = 19
    *      dataprovider_exception  = 20
    *      control_flush_error     = 21
    *      OTHERS                  = 22.
    *  IF sy-subrc <> 0.
    *    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    <b>XML result:</b>
    <?xml version="1.0" ?>
    <position>
       <job_title>Test Process Template</job_title>
       <job_title>jjjj</job_title>
       <job_title>Test Job Req. 20092005</job_title>
       <job_title>Created 22.09</job_title>
       <job_title>title 07.12</job_title>
       <job_title>Test fra portal</job_title>
       <job_title>Test med 100328</job_title>
       <job_title>Test restricted recruiter</job_title>
       <job_title>Test restricted recruiter</job_title>
       <job_title>Workshop requisition job title</job_title>
    </position>
    Any help is greatly appreciated.
    Best Regards,
    Thomas Kjelsrud

    Hi Guillaume,
    The thing is that the code I presented to you is incorrect. I am asking the question of how to download / save an XML (not an internal table) to the application server. Using the gui_download will not satisfy me need, as it only downloads to the presentation server (local machine that I run my SAP session on), when I need it to download to the application server. The Open Dataset and Transfer statements are (as far as I know) only used for downloading internal tables to the application server.
    So I guess my question should be like this instead:
    "How can I save the XML structure that is created in the above program to the file system in the application server?"
    It is a bit hard to explain this, so please ask me more questions if required.
    Thank you for helping.
    Best regards,
    Thomas

  • How create an xml structure in a pdf form

    Hi genius guys,
    some one can help me to create a correct xml structure (root, subroot1, subroot2, etc etc) in a pdf form and not only the single tag?
    Example: I give a pdf with form to be filled and after I extract xml data. Now I have this:
    <?xml version="1.0" encoding="UTF-8"?>
    <fields xmlns:xfdf="http://ns.adobe.com/xfdf-transition/"
    ><A1classe
    >1995</A1classe
    ><A1cognome
    >Fanna</A1cognome
    ><A1nome
    >Tonino</A1nome
    ><Annodifondazione xfdf:original="Anno di fondazione"
    >1965</Annodifondazione
    ><C1classe
    >1976</C1classe
    ><C1cognome
    >Di Gennaro</C1cognome
    ><C1nome
    >Antonio</C1nome
    ><Campionato
    >ECCELLENZA</Campionato
    ><Campodigioco
    >Comunale di Villabartolomea</Campodigioco
    ><Colorisociali
    >Giallo Rosso</Colorisociali
    ><D1classe
    >1984</D1classe
    ><D1cognome
    >Fontolan</D1cognome
    ><D1nome
    >Beppe</D1nome
    ><Girone
    >A</Girone
    ><P1classe
    >1980</P1classe
    ><P1cognome
    >Zoff</P1cognome
    ><P1nome
    >Dino</P1nome
    ><P2classe
    >1974</P2classe
    ><P2cognome
    >Garella</P2cognome
    ><P2nome
    >Claudio</P2nome
    ><S1cognome
    >Baudo</S1cognome
    ><S1mansione
    >Presidente</S1mansione
    ><S1nome
    >Pippo</S1nome
    ><S2cognome
    >Togni</S2cognome
    ><S2mansione
    >Vice Presidente</S2mansione
    ><S2nome
    >Darix</S2nome
    ><Sede
    >Via Pisacane,8 - Villabartolomea</Sede
    ><Squadra
    >VILLABARTOLOMEA</Squadra
    ><T1cognome
    >Dallara</T1cognome
    ><T1mansione
    >Allenatore</T1mansione
    ><T1nome
    >Toni</T1nome
    ><T2cognome
    >Silvan</T2cognome
    ><T2mansione
    >Magazziniere</T2mansione
    ><T2nome
    >Mago</T2nome
    ></fields
    >
    and I need this:
    <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns:xfdf="http://ns.adobe.com/xfdf-transition/"
    ><attaccanti>
    <A1classe
    >1995</A1classe
    ><A1cognome
    >Fanna</A1cognome
    ><A1nome
    >Tonino</A1nome
    >
    </attaccanti>
    <Annodifondazione xfdf:original="Anno di fondazione"
    >1965</Annodifondazione
    >
    <centrocampisti>
    <C1classe
    >1976</C1classe
    ><C1cognome
    >Di Gennaro</C1cognome
    ><C1nome
    >Antonio</C1nome>
    </centrocampisti>
    <Campionato
    >ECCELLENZA</Campionato
    ><Campodigioco
    >Comunale di Villabartolomea</Campodigioco
    ><Colorisociali
    >Giallo Rosso</Colorisociali
    >
    <difensori>
    <D1classe
    >1984</D1classe
    ><D1cognome
    >Fontolan</D1cognome
    ><D1nome
    >Beppe</D1nome
    ></difensori>
    <Girone
    >A</Girone
    ><portieri>
    <P1classe
    >1980</P1classe
    ><P1cognome
    >Zoff</P1cognome
    ><P1nome
    >Dino</P1nome
    ><P2classe
    >1974</P2classe
    ><P2cognome
    >Garella</P2cognome
    ><P2nome
    >Claudio</P2nome
    ></portieri>
    <societa>
    <S1cognome
    >Baudo</S1cognome
    ><S1mansione
    >Presidente</S1mansione
    ><S1nome
    >Pippo</S1nome
    ><S2cognome
    >Togni</S2cognome
    ><S2mansione
    >Vice Presidente</S2mansione
    ><S2nome
    >Darix</S2nome
    ></societa>
    <Sede
    >Via Pisacane,8 - Villabartolomea</Sede
    ><Squadra
    >VILLABARTOLOMEA</Squadra
    ><tecnici>
    <T1cognome
    >Dallara</T1cognome
    ><T1mansione
    >Allenatore</T1mansione
    ><T1nome
    >Toni</T1nome
    ><T2cognome
    >Silvan</T2cognome
    ><T2mansione
    >Magazziniere</T2mansione
    ><T2nome
    >Mago</T2nome
    >
    </tecnici></root
    >
    Thanx, Paolo

    I solve the trouble using "." to separate the tagname and create the correct structure for xml.
    example:
    team.player.1name
    team.player.1surname
    team.player.1rol
    team.player.2name
    team.player.2surname
    team.player.2role
    this give me:
    <team>
         <player>
              <1name>XXXX</1name>
              <1surname>YYY</1surname>
              <1role>forward</1role>
         </player>
    <player>
              <2name>XXXX</2name>
              <2surname>YYY</2surname>
              <2role>forward</2role>
         </player>
    </team>

  • Consistency error:more fields found in XML structure than specified in conv

    Hi,
    I am doing a File 0 RFC- File in PI 7.1 and facing the following error:
    2009-12-07 09:45:05 Error        MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '20000000|3022|800.99|10.11.2009|Testing 22222|')', probably configuration error in file adapter (XML parser error)'
    2009-12-07 09:45:05 Error File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '20000000|3022|800.99|10.11.2009|Testing 22222|')', probably configuration error in file adapter (XML parser error)'
    my output file record structure :
    DT_out
        itab_out                       0.........1
           item                          0...... unbounded
             STR                        0........1
    So i have given in the receiver FCC parameters as:
    Record structure : item
    Content conversion parameters:
    item.fieldFixedLengths               255
    item.endSeparator                      'nl'
    could anyone pls help me in solving this error at the earliest.
    thanks

    my problem has been solved by giving the FCC parameters as shown below:
    my output file record structure :
    DT_out
    itab_out 0.........1
    item 0...... unbounded
    STR 0........1
    So i have given in the receiver FCC parameters as:
    Record structure : item,ITAB_OUT
    Content conversion parameters:
    item.fieldFixedLengths 255
    item.endSeparator 'nl'
    ITAB_OUT.fieldFixedLengths 255
    ITAB_OUT.endSeparator 'nl'

Maybe you are looking for