XML Data Provider - Information

Hi!
I am using the web item "Data Provider - Information" in the WAD to get a query result in XML. When i choose view source in the explorer i can see the XML generated.
My problem is that this generated XML generates one "XML set" for the characteristics in the query and one "XML set" for the key figures in the query.
By this i mean that when i copy the xml from the "view source" file and save it as its own XML file i have to save it as one file for the Key Figures and one file for the Characteristics.
Like this(Characteristic OMaterial and KeyFiure NetValue):
<?xml version="1.0" encoding="iso-8859-1"?>
<item>
<material>12345</material>
</item>
and
<?xml version="1.0" encoding="iso-8859-1"?>
<item>
<net_value>100</net_value>
</item>
I would like the web item to generate a XML file that includes both the KeyFigures and the Characteristics.
Like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<item>
<material>12345</material>
<net_value>100</net_value>
</item>
Do any of you know if/how this is possible?
Thanks,
Charlotte

Hey, sounds like you're getting pretty close. The next thing is integrating the XSLT transform into a web template. I'm actually working on a paper on this that I'll put out at some point. Anywho, here's a sample template that does the XSLT transform on load of the page... The most important thing is that the web template has property "STATELESS=X" so that any navigation you do reruns the transform. This way, you can still navigate and do BW type activities while still transforming the result set. This is very powerful and you'll be able to change or do anything using XSLT transforms. I'm even working on creating javascript functions that run these transforms to do left outer joins and inner joins based on 2 XML result sets. This way, even if data isn't modeled together, it can be presented together. I'm working through the kinks of some of these transforms. Also, I'm working to integrate stylesheet support into my transform as well. Just substitute your transform into the sample template below and it'll render an html table for the XML Query Result Set.
[code]
<HTML>
<!-- BW data source object tags -->
<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_DATA_PROVIDER"/>
         <param name="NAME" value="DATAPROVIDER_1"/>
         <param name="DATA_PROVIDER_ID" value="ZV_STAT_CUBE_VIEW"/>
         DATA_PROVIDER:             DATAPROVIDER_1
</object>
<object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_PROPERTIES"/>
         <param name="TEMPLATE_ID" value="ZPD_STAT_XSL_3"/>
         <param name="STATELESS" value="X"/>
         TEMPLATE PROPERTIES
</object>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE>BW Web Application</TITLE>
<link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
</HEAD>
<script language="JavaScript">
      function loadIt() {
        XMLQUERYVIEWDATA_1.async = false;
xsl_result_1.innerHTML = XMLQUERYVIEWDATA_1.transformNode(xsl_transform_1.documentElement);     
alert(XMLQUERYVIEWDATA_1.transformNode(xsl_transform_1.documentElement));
    </script>
<body onLoad="loadIt()">
<P>
  <object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="TABLE_1"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
         <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         ITEM:            TABLE_1
</object>
  <BR>
  <object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="XMLQUERYVIEWDATA_1"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_XML_QUERYVIEW"/>
         <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         <param name="NAVIGATIONAL_STATE" value=""/>
         <param name="RESULT_SET" value="X"/>
         ITEM:            XMLQUERYVIEWDATA_1
</object>
</P>
<!--
#==========================================================================
XSL Transformation that displays
Template Properties, List of Data Providers and List of Items
#==========================================================================
-->
<xml id="xsl_transform_1">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="header">
<tr bgcolor="white"> <xsl:for-each select="//RRWS_SX_TUPLE[1]/*">
  <td>
  <xsl:value-of select="local-name()"/>
  </td>
</xsl:for-each>
</tr>
</xsl:variable>
<xsl:template match="/">
<table bgcolor="gold" border="1">
TESTVALUE -
<tr>
  <xsl:copy-of select="$header" /> <xsl:apply-templates />
</tr>
<xsl:for-each select="//RRWS_SX_TUPLE">
      <tr>
        <td><xsl:value-of select="TUPLE_ORDINAL"/></td>
          <xsl:for-each select="//RRWS_S_CELL">           
          <td><xsl:value-of select="CELL_ORDINAL"></td>
          </xsl:for-each>
        <td><xsl:value-of select="TUPLE_ORDINAL"/></td>
        <td><xsl:value-of select="CHANM"/></td>
        <td><xsl:value-of select="CAPTION"/></td>
        <td><xsl:value-of select="CHAVL"/></td>
        <td><xsl:value-of select="CHAVL_EXT"/></td>
        <td><xsl:value-of select="NIOBJNM"/></td>
        <td><xsl:value-of select="TLEVEL"/></td>
        <td><xsl:value-of select="DRILLSTATE"/></td>
        <td><xsl:value-of select="OPT"/></td>
        <td><xsl:value-of select="SIGN"/></td>                    
        <td><xsl:value-of select="ATTRIBUTES"/></td>     
      </tr>
<xsl:for-each select="//RRWS_S_CELL">
     <tr>     
        <td><xsl:value-of select="CELL_ORDINAL"/></td> 
        <td><xsl:value-of select="VALUE"/></td>            
        <td><xsl:value-of select="FORMATTED_VALUE"/></td> 
        <td><xsl:value-of select="VALUE_TYPE"/></td> 
        <td><xsl:value-of select="CURRENCY"/></td> 
        <td><xsl:value-of select="UNIT"/></td> 
        <td><xsl:value-of select="MWKZ"/></td> 
        <td><xsl:value-of select="NUM_SCALE"/></td> 
        <td><xsl:value-of select="NUM_PREC"/></td> 
        <td><xsl:value-of select="CELL_STATUS"/></td> 
        <td><xsl:value-of select="BACK_COLOR"/></td> 
     </tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="RRWS_S_CELL/*">
<td> <xsl:value-of select="." /> </td>
</xsl:template></xsl:stylesheet>
</xml>
<table>
  <tr><td valign="top"><div id="xsl_result_1"></div></td></tr>
</table>
</body>
</HTML>
[/code]

Similar Messages

  • Hi to all... What is a  XML data provider,stored Procedure, personal data

    Hi to all... What is a  XML data provider,stored Procedure, personal data providers in deski.  when we use these data provider in desk top intelligence.. and use of it.
    Please give detail description of the above...
    Thanks for reply..........

    Hi,
    We can create Desktop Intelligence reports using XML Data Provider, Personal Data Files and Stored Procedure.
    Following is some detailed information about these three.
    Xml data provider:
    Xml data provider is used for the integration of external data sources stored in XML format.
    This is similar to HTML.
    Stored Procedure:
    A stored procedure is a set of SQL commands that has been compiled and stored on the database server.
    Once the stored procedure has been "stored", client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again.
    Stored procedures improve performance by reducing network traffic and CPU load.
    Personal data files:
    u2022     *.prn files
         A PRN file is a special type of file which contains instructions for a printer, it tells the printer what to print on the page and where as well as which paper tray to use, what the paper size is and a number of other controls.
    u2022     *.asc files
          Between the values of a row any number of carriage returns  or blanks are allowed. In any case it is strongly recommended that the data table be stored in such a way that it can be read and edited easily.
           The values may be stored in any format (integer, floating point, exponential notation) and they must be separated at least by one blank. The class information must be of integer type, the row identifiers are interpreted as strings. The lines can have any length and must not contain any comment.
    u2022     *.csv files
    A CSV file is a specially formatted plain text file which stores spreadsheet or basic database-style information in a very simple format, with one record on each line, and each field within that record separated by a comma.
    Regards,
    Pradnya Kokil

  • ComboBox XML Data Provider

    Hello all,
    I'm having trouble creating an XML data provider to use for a
    ComboBox. Below is what I've done:
    XML data I get from Rails server:
    <states>
    <state name="Arizona" id="1" />
    </states>
    CDATA:
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    [Bindable] private var stateData:ArrayCollection;
    private function getStates(event:ResultEvent):void {
    stateData = (event.result as XML).states.state;
    state.dataProvider = stateData;
    state.labelField = "name";
    state.data = "id";
    <mx:ComboBox id="state" />
    This compiles, but when I run it, I don't get anything in the
    ComboBox. I know I'm getting data from the server, because I can
    set the data provider for the ComboBox to be event.result and I see
    all the resulting XML in the ComboBox.
    Please help!!! What am I doing wrong here?!
    Thanks in advance! -- BTR

    Hey Vygo,
    Thanks for the suggestion. I'll try it out and let you know
    how it goes. However, I was worried about the attributes so I tried
    it using regular elements as well, but to no avail. Anyway, I'll
    get back to you once I have a chance to try out your suggestion.
    Thanks again! -- BTR

  • UIX with XSQL as XML data provider and event handler

    Hello ,
    I would like to bind XML data to messageinput elements of a form element
    as values to be presented before entering (data provider)
    as well as input values to be persisted after completing the form (event handler).
    My impression (as a newbee) is that only for BC4J integration there is a bidirectional binding with view objects.
    Can i use 'include' to bind a static xml file as data source for output?
    How can i use XSQL to be bound as data for input as well as for output of a form?
    A last question concerning a page with 3 tabs:
    do i need 3 different pages and requests to get the data of the 3 tabs
    or is it possible to get the whole data of the page in one request
    and distribute it over the 3 tabs.
    Any help appreciated
    Thanks
    Klaus Dreistadt

    You could do this, but we don't provide any tools to make this easy.
    You'd have to write an implement of the DataObject interface
    that gives your UI access to the XML document, and write custom
    event handlers to perform the "set" side of things. The Data Binding
    and UIX Controller chapters of the UIX developer's guide will give you
    a high-level view of how to accomplish this, but nothing specifically
    about reading or writing to XML documents.

  • How to register/configure a Data Provider with Crystal Report Designer

    Hi,
    Iu2019m in the process of developing an ADO .Net XML Data Provider which works with Data Sets. I want to use this custom Data Provider through Crystal Report Designer 2008 so that I can access it from the u201CStandard Report Creation Wizard\Available Data Sourcesu201D section. How can I do this? I read the following in the u201Ccreating custom adddins.docu201D documentation.
    u201CCrystal Reports (CR) 2008 installs a new managed dll called DotNetExternalCommandAdapter.DLL and installs it into the Global Assembly Cache (GAC).  CR 2008 uses this dll to search and load files with a csc prefix in CR 2008u2019s AddIns subdirectory in a similar way it looks for database drivers, export drivers and UFLs. To create an Add-In the developer needs to reference this dll and inherit two classes from it, ICommand and ICommandDLL.u201D
    I have the following questions,
    1) As it mentions above how can I make Crystal find my custom Data Provider when it searches for the database drivers?
    2) Is there another class I can inherit from when creating my custom data provider? If so where can I find some documentation regarding this?
    3) Can I register my custom data provider in to the GAC and will Crystal find it if so how can I register my custom Data Provider? Will GACUtil work for Crystal as well?
    Thanks in Advance,
    Regards,
    Chanaka

    Baron, thank you for providing that link.
    Chanaka see if that article helps you out. It should - had I got to this thread earlier, I'd have sent that link also. Certainly DE place to start.
    Ludek

  • Data provider selection

    Evening
    I'm attempting to create a data provider selection drop down box. The box should allow selection of one of many external XML documents, which when selected, fills in the datagrid below.
    So far I've got the XML documents set up, and have been able to link them with the main project
    I've got the datagrid working nicely with both sizes and behaviours, and displaying data properly
    I've got a drop down working (heheh)
    It's the part where the drop down displays the list of XML docs and allows me to select them as the datagrid data provider that has me stumped.
    I wonder if anyone would be kind enough to point me in the direction of a tutorial, or example code that would allow me to do this. I've had a browse, but can't think of any other terms to use besides the obvious (XML, data provider, data provider selector, data provider selection etc).
    I'm also wondering if what I'm attempting is maybe more complicated than I think, which may be why I haven't stumbled upon anything specific yet.
    All the best,
    Mag
    P.S. I am new also, which I think may be obvious by the question    Flex looks too useful to pass up learning, so it's time to take the plunge I think.

    Morning. Sorry. It seems I said a lot but didn't explain very well. My fault
    Thank you both for your replies. I think I should have explained from the point of view of the app actually running.
    So imagine you run the app in your browser, and you see one datagrid, and one drop down box. Inside the drop down is a choice of XML files. Selecting XML file 1, will display the XML1's info in the datagrid. Selecting XML2 will display XML2's info in the datagrid and so on.
    It's creating that drop down that allows me to select XML files for the datagrid to use while the app is running that is my stumbling block.
    I'm familiar with the XML structure and how to display the info correctly inside the datagrid if the XML file is static.
    I am however unsure how to go about being able to select an alternative XML file for the grid to use while the app is running - this is what I'd like to find out how to learn.
    All the best,
    Mag

  • Showing XML data

    Hi all,
    i have to create a table in the DDIC where i have to store some XML data and informations.
    ID -> char
    date -> date field
    desc -> char
    xml -> ????
    What datatype shall i use to store my XML Data ?
    Later in a Dynpro i need to show this XML Data. What type of control shall i use to show this XML Data ?
    Can i use the browser control ? If so ... how can i pass my xml data to this control ??
    Greetings
    Henning

    You can create a field of data type STRING if you are planning to store your XML in string or RAWSTRING if you are planning to store your data in XSTRING.
    You can use the Simple CL_GUI_HTML_VIEWER to display your XML data stored in STRING or XSTRING. Take a look at the FM DISPLAY_XML_STRING.
    Regards,
    Naimesh Patel
    Edited by: Naimesh Patel on Feb 12, 2009 10:19 AM

  • Error using an XML as data provider for either datagrid or linechart

    Hi,
    I am developing an application using Flex and Java servlets.
    Upon user
    event, I load the data using the servlet and store the data
    in a
    Dictionary. I am running into couple of issues from here
    a. If I try to use the XML object in the dictionary as the
    data provider
    for either Datagrid or Linechart I am unable to view the
    data. I did a
    trace on the object and it has the correct data.
    b. Also, I am unable to access the content of child elements
    when using
    a parent element as the data provider.
    ex. parent. child1. child2 does not work, it works when I
    provide child2
    as the dataprovider directly.
    Please let me know what might be the root causes and
    resolutions.
    Thanks in advance,
    Nataraj

    I did not find a solution to the problem and created a list
    of the child objects and used that as the source instead of the top
    level XML object. This worked.

  • Little help with complex XML data as data provider for chart and adg

    Hi all,
    I've been trying to think through a problem and Im hoping for
    a little help. Here's the scenario:
    I have complex nested XML data that is wrapped by subsequent
    groupings for efficiency, but I need to determine if each inner
    item belongs in the data collection for view in a data grid and
    charts.
    I've posted an example at the bottom.
    So the goal here is to first be able to select a single
    inspector and then chart out their reports. I can get the data to
    filter from the XMLListCollection using a filter on the first layer
    (ie the name of the inspector) but then can't get a filter to go
    deeper into the structure in order to determine if the individual
    item should be contained inside the collection. In other words, I
    want to filter by inspector, then time and then tag name in order
    to be able to use this data as the basis for individual series
    inside my advanced data grid and column chart.
    I've made it work with creating a new collection and then
    looping through each time there is a change to the original
    collection and updating the new collection, but that just feels so
    bloated and inefficient. The user is going to have some buttons to
    allow them to change their view. I'm wondering if there is a
    cleaner way to approach this? I even tried chaining filter
    functions together, but that didn't work cause the collection is
    reset whenever the .refresh() is called.
    If anyone has experience in efficiently dealing with complex
    XML for charting purposes and tabular display purposes, I would
    greatly appreciate your assistance. I know I can get this to work
    with a bunch of overhead, but I'm seeking something elegant.
    Thank you.

    Hi,
    Please use the code similar to below:
    SELECT * FROM DO_NOT_LOAD INTO TABLE IT_DO_NOT_LOAD.
    SORT IT_DO_NOT_LOAD by WBS_Key.
        IF SOURCE_PACKAGE IS NOT INITIAL.
          IT_SOURCE_PACKAGE[] = SOURCE_PACKAGE[].
    LOOP AT IT_SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
            V_SYTABIX = SY-TABIX.
            READ TABLE IT_DO_NOT_LOAD into WA_DO_NOT_LOAD
            WITH KEY WBS_Key = WA_SOURCE_PACKAGE-WBS_Key
            BINARY SEARCH.
            IF SY-SUBRC = 0.
              IF ( WA_DO_NOT_LOAD-WBS_EXT = 'A' or WA_DO_NOT_LOAD-WBS_EXT = 'B' )     
              DELETE IT_SOURCE_PACKAGE INDEX V_SYTABIX.
            ENDIF.
    ENDIF.
          ENDLOOP.
          SOURCE_PACKAGE[] = IT_SOURCE_PACKAGE[].
        ENDIF.
    -Vikram

  • Populating a Crystal Report from XML data

    Hi,
    I want to populate a Crystal Report using a XML data structure. Below I have explained what Iu2019m trying to do in detail,
    u2022 First I will create a Crystal Report using Crystal Report XI R2 designer  by connecting to a Oracle database using a native Oracle connection (not ODBC or JDBC)
    u2022 Then I want to write a Java application using CR XI R2 JRC SDK to open this report
    u2022 Then to run and populate this report using a XML data structure (which I have separately in a disk location. XSD too is available in disk)
    u2022 Then to export this report with data to either PDF or RPT file with saved data in to disk.
    The questions I have are,
    1. Is this possible to do in away?
    2. If so, can you please provide me with a sample code for doing this? I tried some of the other threads in the forum but some had broken links.
    3. Do the xml and the xsd needs to be in a special format?
    4. Is there any other configuration setting I should do?
    Hope you can help me. Thank you in advance.
    Regards,
    Chanaka

    Hi Chinmay,
    Thank you for the prompt answer. I have gone through this before. It explains on how to create a report using a xml database from CR designer. What I want to do is to set the data source programmatically to a xml date source from the code. I didnu2019t find anything like that. Is it the same way as setting the database connection information?
    Also another question I have is how does a report with two tables work? Say I have a master u2013 detail report (order and order lines). The master part is taken from one table (order_tab) and the detail part is taken from another (order_detail_tab). Do I need to have 2 xmls or is one structured xml sufficient? How will the same work if I have the detail section in a sub-report? Will it work with one or do I need to have two?
    Regards,
    Chanaka

  • Using a Web Service as a data provider for a Crystal Report

    <p>I&#39;m trying to write a Crystal Reports XI report that uses a Web Service as the data provider.  I have a Web Service written in ColdFusion that looks like this.<br /><br /><cfcomponent displayName="FindEmployee" ><br />   <cffunction name="FindEmployeeSort" access="remote"          <br />               returnType="xml" output="false"><br />      <cfdump var=form><br />      <cfset myXML = ""><br />       <!--- FindEmployeeSort body ---><br />       <cfquery name="EmployeeQuery" datasource="Production"><br />           Select * from employee<br />          <cfif isdefined(&#39;form.lastname&#39;)><br />             WHERE lastname LIKE &#39;%#form.lastname#%&#39; <br />          </cfif><br />           Order by lastname asc <br />        </cfquery><br />     <cfreturn EmployeeQuery>  <br />   </cffunction><br /></cfcomponent><br /><br />I can get the web service to work from a ColdFusion page (either locally or on a remote server).</p><p>When I try to create the CR data source, I get the following error:</p><p>Crystal Reports<br />! Logon Failed.<br />Details: Cannot find correspondign table information in the XML file</p><p>The steps I took were:<br />* Choose XML from the "Avalable Data Sources"<br />* Choose "Use Web Service Data Source"<br />* Choose "Use HTTP(S) WSDL" with a url of <a href="http://host/directory/FindEmployee.cfc?wsdl">http://host/directory/FindEmployee.cfc?wsdl</a><br />* Leave the "HTTP(S) Web Service User ID:" and "HTTP(S) Web Service Password:" parameters blank<br />* Accept the defaults for Services, Ports, and Methods.  They are respectively FindEmployee, FindEmployee.cfc and FindEmployeeSort.<br />* Then get the error</p><p>The most likely candidate to me is the user id and password, but I have no idea what to use.  I didn&#39;t have to set any login information up in the ColdFusion pages that I used to test the Web Service.</p><p>Any ideas where to go from here?</p><p>Thanks,</p><p>Brian</p>

    Please re-post if this is still an issue to the Java Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • What is the use of XML data collections

    Dear all,
    I have open the Adventure works database sample and have few technical design question about it :
    1- I have seen that seen that some function has been define. IN which case we should use function vs Store procedure ? so far I always have used SP.
    2- I have notice also that in some table, there is a field which contains XML content and this XML content is coming from the XML Schema collections. Some shemas has been define here for different tables.
        - What are those shema used for in here ?
        - How they are created ?
        - how they get inserted to Table colum ?
    I am not a DBA and knows some basics but not all so thanks for simple explaination :-)
    regards

    Hi wakefun,
    About your questions, I recommend you review the following articles for understanding user function , Store procedure and XML Schema collections in Adventureworks database.
    1. Stored Procedures in AdventureWorks;
    2.
    User-Defined Functions in AdventureWorks;
    3. XML Schema Collections (SQL Server).
    The XML schema collection is a metadata entity like a table in the database. You can create, modify, and drop them.
    the XML stored in a column or variable that a schema is associated with is referred to as typed XML, because the schema provides the necessary data type information for the instance data.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Getting XML data of SSIS Package (which is located in File System) from a query

    Hi,
    We have around 200 SSIS packages deployed to File System. These pacakges are being scheduled using SQL Agent job.
    So, currently I have a list of all the packages and their respective File Path.
    Note : **They are NOT deployed to Server**.
    Now, my task is to search all the packages which has a specific connection in it.
    From the below blog, I got to know we can achieve this by querying the XML data of the SSIS Package.
    https://www.simple-talk.com/sql/ssis/-exploring-ssis-architecture-and-execution-history-through-scripting/.
    But in the above article they are getting the XML definition of the Package from msdb(as it was deployed to server).
    In my requirement, SSIS Packages are in File System. Is there any way to to get the XML definition of these packages using a query.
    Please let me know if the above requirement is not clear or if any further information is required.
    Thanks
    Raksha

    Hi Visakh & Praveen,
    Thanks for the response. 
    @Visakh: The query provided by you gives the information about all the connection strings in the package.
    @Praveen: The query in the link provided by you lists the values of all the properties of the package like MaxerrorCount, CreatorName, CreatorDate and other properties.
    I think, we may have to slightly modify this query to get the connection string values
    Praveen, nice to hear from you after a long time and that too in this forum !! :) Hope you are doing good.
    Thanks
    Raksha

  • Fill in form using XML data source usable in Reader

    I have a simple example of a scenario we need to solve. Different branches will fill out a form (designed in LiveCycle 8) and by entering their branch number static information will be filled in. I want to store the static infomation for all branches in an XML sheet that will be stored on a shared folder on the intranet.
    The problem I have is getting the script to run in Reader. In preview in the Designer and using the import data function of Acrobat Pro it works fine. I think I am missing the script to import the data to work in Reader. I have not been able to find anything in the documentation to point me in the right direction. I have also had a case open with Adobe support for 2 months.
    Any help would be appreciated.
    Kris
    Below is the script in the exit event of the Text field BranchNumber:
    ----- BranchInfo.#subform[0].BranchNumber::exit: - (FormCalc, client) ------------------------------
    xfa.host.resetData("xfa.form.BranchInfo.#subform[0].Party_Code")
    Party_Code.clearItems()
    var BList = ref(record.Branches)
    for j=0 upto (BList.nodes.length -1) do
    xfa.resolveNode("BranchInfo.#subform[0].Ph") = BList.nodes.item(2).name
    if (BList.nodes.item(j).BranchCode.value == $) then
    xfa.resolveNode("BranchInfo.#subform[0].Full_Company_Address") = BList.nodes.item(j).Full_Address.value
    var List = ref(BList.nodes.item(j).SPCS)
    if (List.nodes.length == 1) then
    xfa.resolveNode("BranchInfo.#subform[0].Party_Code") = BList.nodes.item(j).SPCS.SPC.value
    elseif (List.nodes.length > 1) then
    for i=0 upto List.nodes.length -1 do
    BranchInfo.#subform[0].Party_Code.addItem(List.nodes.item(i).value,"")
    endfor
    endif
    xfa.resolveNode("BranchInfo.#subform[0].Ph") = BList.nodes.item(j).PH.value
    xfa.resolveNode("BranchInfo.#subform[0].Fax") = BList.nodes.item(j).FAX.value
    xfa.resolveNode("BranchInfo.#subform[0].Member") = BList.nodes.item(j).Member.value
    break
    endif
    endfor
    Below is the xml data file for this test:
    <BranchInfo>
    <Branches>
    <Branch>
    <BranchCode>123456</BranchCode>
    <Full_Address>123 First RD #02 BOX 2222, DARTMOUTH, NS, B7W 1X9</Full_Address>
    <PH>9025551234</PH>
    <FAX>9025556789</FAX>
    <Member>991AP991P</Member>
    <SPCS>
    <SPC>NS-6379</SPC>
    </SPCS>
    </Branch>
    <Branch>
    <BranchCode>123882</BranchCode>
    <Full_Address>BOX 55 Second ROAD PLAZA, ST JOHN'S, NL, A9N 1X1</Full_Address>
    <PH>7095552345</PH>
    <FAX>7095557890</FAX>
    <Member>991AP222P</Member>
    <SPCS>
    <SPC>NL-706</SPC>
    </SPCS>
    </Branch>
    <Branch>
    <BranchCode>123333</BranchCode>
    <Full_Address>333A Third ST, ST STEPHEN, NB, E9A 2Z3</Full_Address>
    <PH>5065553333</PH>
    <FAX>5065559999</FAX>
    <Member>991AP333P</Member>
    <SPCS>
    <SPC>NB-10269</SPC>
    </SPCS>
    </Branch>
    </Branches>
    </BranchInfo>

    Hi Jeroen,
    to have a user fill in, you first need to create a Web Dynpro application providing the offline form, e.g. through a download - tutorial at http://sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/2dd3dbcd-0401-0010-55b8-b10808ff688e - or an e-mail - tutorial at http://sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b040e6cd-0401-0010-268d-f67cf4904358
    On the return trip, the user-entered data is stored in the SAP backend via the Web Dynpro context. (You do not store the raw XML, the data is back-converted by ADS to Java.)
    In the fourth step, you will have to provide a Web Dynpro
    application with an online form, which can be part of the same project, but basically generates the form again for completion.
    If you want to use the same form that was submitted, you have to have your app store the submitted PDF (do not submit only the XML) in the backend (through the WD context), and then call that one up in the online scenario.
    Cheers,
    Markus

  • How to Store an XML Data into Table?

    Hi All,
    My Requirement is "I Have an XML File (or) XML Data as CLOB, now I should decode this XML Data and find the equivalent data for columns in a table and then store that in a relational table",
    Would be greatful if any one can provide me a feasible solution (or) good link where I can get this information with examples.
    Thanks in advance,
    Sunil N

    Or,
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>
    satyaki>drop table dump_tab;
    Table dropped.
    Elapsed: 00:00:01.08
    satyaki>
    satyaki>create table dump_tab
      2   (
      3      raw_xml  clob
      4   );
    Table created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>desc dump_tab;
    Name                                      Null?    Type
    RAW_XML                                            CLOB
    satyaki>
    satyaki>
    satyaki>insert into dump_tab
      2  select yy.rxml
      3  from (
      4        select ('  <data>
      5           <var name="document">
      6           <string>Sales Order</string>
      7           </var>
      8           <var name="results">
      9           <recordset rowcount="2">
    10           <field name="sales_num">
    11           <string>12345</string>
    12           <string>60192</string>
    13           </field>
    14           <field name="ord_qty">
    15           <string>10</string>
    16           <string>50</string>
    17           </field>
    18           </recordset>
    19           </var>
    20           </data>'
    21      ) rxml from dual
    22     ) yy;
    1 row created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>create table results
      2    (
      3      serial_no    number(5),
      4      sales_num    number(7),
      5      ord_qty      number(10)
      6    );
    Table created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>desc results;
    Name                                      Null?    Type
    SERIAL_NO                                          NUMBER(5)
    SALES_NUM                                          NUMBER(7)
    ORD_QTY                                            NUMBER(10)
    satyaki>
    satyaki>select * from dump_tab;
    RAW_XML
      <data>
             <var name="document">
             <string>Sales Order</string>
             </var>
             <var name="results">
             <recordset rowcount="2">
             <field name="sales_num">
             <string>12345</string>
             <string>60192</string>
             </field>
             <field name="ord_qty">
    RAW_XML
             <string>10</string>
             <string>50</string>
             </field>
             </recordset>
             </var>
             </data>
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  insert into results(serial_no,sales_num,ord_qty)
      2  with t
      3    as (
      4         select xmltype(raw_xml) xml from dump_tab
      5       ),
      6    t1 as (select rownum rn, t1.column_value.extract('*/text()') sales_num from t t, table(xmlsequence(t.xml.extract('//field[@name="sales_num"]/string'))) t1),
      7    t2 as (select rownum rn, t2.column_value.extract('*/text()') ord_qty   from t t, table(xmlsequence(t.xml.extract('//field[@name="ord_qty"]/string'))) t2)
      8    select t1.rn x,
      9           to_number(regexp_replace(xmlelement("e",sales_num).getstringval(),'<(|/)e>','')) sales_num
    10           to_number(regexp_replace(xmlelement("d",ord_qty).getstringval(),'<(|/)d>','')) ord_qty
    11      from t1,t2
    12*    where t1.rn = t2.rn
    satyaki>/
    2 rows created.
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>select * from results;
    SERIAL_NO  SALES_NUM    ORD_QTY
             1      12345         10
             2      60192         50
    Elapsed: 00:00:00.00
    satyaki>Regards.
    Satyaki De.

Maybe you are looking for