XML select data by value

I am looking to select XML in flash from an external XML file
by a tag's value.
var xnRoot:XMLNode = this.firstChild.firstChild.firstChild;
How do I select like the forth child by its value of "my text
value".

That doesn't really work for me. How can I use something like
var xnRoot:XMLNode =
this.firstChild.firstChild.firstChild.sect_var;
Where something like "sect_var" is a variable in flash that
represents the current section you are in, so the XML knows what
section you are in and to pull data from tags that's value equals
the "sect_var" variable.

Similar Messages

  • Select data from an XML Column in a Relational Table

    Hi guys,
    I read a lot of documentation from Oracle how to select xml nodes from an XML Table. The following statement works perfectly for an XML table.
    select extract(OBJECT_VALUE, '/loop/loop_data/description') "DESCRIPTION"
    from loop_table
    where xmlexists('/loop/loop_data[type_code="212"]' PASSING OBJECT_VALUE);
    BUT: how to select xml nodes (data) from a relational table with an XML column???
    I'm interested in the xml data.
    Thanks!
    Miro

    I've tried the same but i don't get any results
    WITH BOL_JMS_MESSAGES_TMP AS
    (SELECT 1 pk,
    XMLTYPE('<MESSAGE_ENVELOPE>
    <ORDER>
    <DIRECT_TURNOVER>N</DIRECT_TURNOVER>
    <DATE_PLACED>2010-05-06T17:14:35.189+02:00</DATE_PLACED>
    <PAYMENT_TYPE>02</PAYMENT_TYPE>
    <ACCOUNT_NUMBER>108317412</ACCOUNT_NUMBER>
    <GIFT_FLAG>N</GIFT_FLAG>
    <ID>7788783900</ID>
    <NETPRICE>117.21</NETPRICE>
    <VAT>7.69</VAT>
    <TOTALPRICE>126.85</TOTALPRICE>
    <SHIPHAND_COSTS>1.64</SHIPHAND_COSTS>
    <SHIPHAND_VAT>0.31</SHIPHAND_VAT>
    <SHIPEQUALBILL_FLAG>Y</SHIPEQUALBILL_FLAG>
    <SHIPPING_METHOD>01</SHIPPING_METHOD>
    </ORDER>
    </MESSAGE_ENVELOPE>') rnd_col
    from dual
    select extract(rnd_col, '/message_envelope/order/direct_turnover/date_placed/payment_type/account_number/gift_flag/id/netprice/vat/totalprice/shiphand_costs/shiphand_vat/shipequalbill_flag/SHIPPING_METHOD') "Payment type"
    FROM BOL_JMS_MESSAGES_TMP
    WHERE existsNode(rnd_col,'/message_envelope') = 1;
    No rows.
    Eventually i want to update the payment type from 02 to 00.

  • Select data from database via XML

    I want to select data for display and insert data to tables via XML, and I want
    to do this from a browser.
    I am using "Oracle8i Enterprise Edition Release 8.1.7.4.0" on HP-UX server
    with "JServer Release 8.1.7.4.0.".
    The oracle documentation says I need the following in order to do this.
    1. XML-SQL Utility
    2. XML Parser for Java, V2
    3. JDBC driver
    4. JDK
    5. A Java compliant web server
    6. XSL Servlet
    How do I verify, if the above software list is available in my environment.
    What are all available within the database and what are other software I need to
    install.
    Thanks
    Pushparaj

    It's a classpath problem. Either you mistyped the class name, or you don't have the class in your classpath. I think Oracle's drivers come in db12.zip or db12.jar or some such. Whatever that jar or zip file is, it has to be in your classpath, but it's not.
    Or it is in your classpath, but you're in an appserver context where the classloader that the container provides for your app uses something other than the classpath variable. For instance, in tomcat, the jar file would be uder webapps/yourApplication/WEB-INF/lib I think.

  • Select data as table from xml string using xquery.

    Hi ,
    I have this xml 
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select @xml
    I wan the output to be shown as
    id subid marks
    1 1 30
    1 2 40
    2 1 30
    2 2 40
    how can i do this using XQUERY in sqlserver ?.
    Thanks in advance for any help.

    how can i do this using XQUERY in sqlserver ?
    Sure you can and it's easy:
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select students.Rows.value('subid[1]', 'int') AS id
    ,students.Rows.value('marks[1]', 'int') AS marks
    FROM @xml.nodes('/StudentsData/StudentData/subjects/subject') AS students(Rows)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to read value within XML Tag data using IO Stream in Java

    We have xml data into a Stream and we need to extract values again into a Stream from the particular XML tag <Data> inside the Stream. PFB the sample XML which will be contained inside the stream and can someone help us to hint the java code for this. We require it using the IO API only and we need to look <DATA> for the begining of the stream and </DATA> as the end of the stream.
    Please note that input is stream and output require also is a stream.
    <?xml version = "1.0" encoding="UTF-8" ?>
    <GenericDataEnvelope>
    <DataFormat>PlainText</DataFormat>
    <Name>1111</Name>
    <Security>NA</Security>
    <senderName>abc</senderName>
    <Protocol>HTTP</Protocol>
    <Data>
    SElQRlhDVElQRlBCTktERUZGMDYxMDAyMDc0MzUyMDAwMTA2MTAwMjA3NDM1MlRDSEFTVVMzMzAw
    MDAwMDAwMDAwMTc4LDEyMDAwMTc4MTIKezQ6TVQxMDM6CjoyMDowMDYwMDQ5MjQxMDA2NzcwCjoy
    M0I6Q1JFRAo6MjNFOlNEVkEKOjMyQTowNjEwMDVDQUQwLDAxCjozM0I6RVVSMCwwMQo6MzY6MSwz
    TNzcwQU5WLVJFTlRFIE9DVCAwNgowLDAxLzEsMTcxOQo6NzFBOlNIQQo6NzI6L1JFQy84NDM2MTU3
    MTA2Ci19ClRJUEYK
    </Data>
    <DataType>INVOICE</DataType>
    </GenericDataEnvelope>

    The example you've showed is valid and it is also text.
    Think seriously about this ... for example, do you have a rule that says </DATA> can't appear in the binary data?
    But in any case I can't see the problem. If you want to use IO classes directly, just read lines until you see <DATA>, then read data until it ends with </DATA>, and remove that.
    But I would certainly use SAX myself until proven otherwise that it won't work..

  • XML SELECT error ORA-01830: date format picture ends before converting enti

    Apologies, If I have to open a new thread. I have a similar problem and would be grateful if you can help:
    Created a view based on an xsd. View works fine. However when selecting data from the view, the xml output is scrambled. On search found there is a pretty print function which can be added when creating the view: .extract('/*') as:
    ).extract('/*')
    as RBid
    from Balit_Submissions bs
    Again the view gets created successfully. But when doing the same select from it get the error:
    ERROR:
    ORA-01830: date format picture ends before converting entire input string
    I have narrowed it down to the .xsd definition of the tag: <xsd:element name="CreationDateTime" type="ecc:MessageDateTimeType">
    In the view, CreationDateTime is selected as follows:
    ,XMLelement("CreationDateTime",xmlattributes(to_char(bs.creation_datetime,'yyyy-mm-dd"T"hh:mi:ss"Z"') as "v"))
    where the column bs.creation_datetime is Oracle data type DATE.
    The MessageDateTimeType is defined in Oracle as a timestamp.
    Any hints to overcome this.
    Using: Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - Production
    I will paste the full .xsd and view if required.
    Thanks
    James Sathiaraj

    Indeed a small test case would be great. Not sure if I could reproduce - have touched 10.1.0.5 in 4, 5 years...

  • Date field not updated when select on F4 value on editable ALV Grid

    Can some one look into this to see what was wrong.
    I have a report that display fields extracted from a ZTable and display on an ALV Editable Grid.
    The data are displayed as read only mode for these fields:
    Field A -   type char20 and have a search help available.
    Start Date - type dats
    End Date - type dats.
    Field B
    Field C ...
    When user select to add new record,  Field A, Start Date and End Date must be editable, the rest are read only.
    On field A because there is search help available, I have no problem select data on F4 pull down menu and the data is updated on the grid.
    But on field start date and end date, there is F4 menu and when you pull down, it shows the calendar date.  But when I select the date to change, it acts like nothing happens.  I run the debug mode and found out that in function module 'F4IF_FIELD_VALUE_REQUEST', after you select the date field, I got the return code irc = 8 from line 305 of this FM.
    Here is what I did.
    I build field catalog similar like BCALV_EDIT04  (add table type lvc_t_styl to each extracted record to indicate which field will be  editable.
    In the PBO,  I build field catalog and set style as enable for these fields:
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = p_struct
        CHANGING
          ct_fieldcat      = p_t_fieldcat.
    LOOP AT p_t_fieldcat INTO ls_fcat.
        CASE   ls_fcat-fieldname.
           when 'Field_A'.
               ls_fcat-ref_table = 'ZTABNAME'.
            ls_fcat-ref_field = 'FIELD_A'.
            ls_fcat-edit = 'X'.
            MODIFY p_t_fieldcat FROM ls_fcat.
       when 'START_DATE' or 'END_DATE'.
        ls_fcat-style = CL_GUI_ALV_GRID=>MC_STYLE_enabled.
             MODIFY p_t_fieldcat FROM ls_fcat.
       endcase.
    Just curious, I copied program BCALV_EDIT_08 to ZBCALV_EDIT08 and make field booking date as editable to test.  When I select to change booking date from F4 menu pull down, the new date is populated to the screen field.  So what was wrong between my program and BCALV_EDIT_08?  Thanks for your help.  I am stuck on this problem for 2 days and could not figure out what was wrong.

    not sure why you use that FM for date filed , you just need in the field catalog make sure that are use a date field of reference , anyway check program BCALV_EDIT_01

  • Multiple selection of parameter values (BIP 10.1.3.2)

    Hi there,
    I'm working with BI Publisher 10.1.3.2 and I'd like to use parameters allowing multiple selection. I've tried it with both data templates and SQL queries ... but I'm not getting it work ...
    I've established a simple "Show me department name and id"-example according to my parameter selection (you can select multiple values e.g. Administration, Marketing, Sales ... and the "All"-option is activated as well), based on the HR/OE schema.
    Here's just a quick note, where I tested the way the Publisher Engine copes with parameter selection in general
    5.6.2
    single selection => e.g. Administration
    multiple selection => e.g. Administration,Marketing
    All => *
    10.1.3.2
    single selection => e.g. Administration
    multiple selection => e.g. 'Administration','Marketing'
    All => null
    So, in 10.1.3.2 there's been an improvement concerning single quotes - in the case of multiple selection only. I do not know why there are no single quotes for a single selection, but it seems like that's the way it is ...
    Well, I've created a simple SQL query as follows:
    CASE 1 *
    select DEPARTMENT_ID as ID, DEPARTMENT_NAME as NAME
    from DEPARTMENTS
    where DEPARTMENT_NAME IN (:myParameter)
    => All does not work
    => Single Selection is working
    => Multiple Selection is working
    sample output in the case of selecting "Marketing" (single selection):
    <TESTINGIN>
    <myParameter>Marketing</myParameter>
    <LIST_DEPTS>
    <DEPTS>
    <_MYPARAMETER>Marketing</_MYPARAMETER>
    <ID>20</ID>
    <NAME>Marketing</NAME>
    </DEPTS>
    </LIST_DEPTS>
    </TESTINGIN>
    ... and I've tried the same select statement using a data template instead, and then I got another result: both, All and Multiple Selection, do not work (I'm getting back an empty element)
    sample (error) output in the case of selecting both "Marketing" and "Administration" (multiple selection):
    <TESTINGIN>
    <myParameter>'Administration','Marketing'</myParameter>
    <LIST_DEPTS></LIST_DEPTS>
    </TESTINGIN>
    In order to cover the "All"-case ... I manipulated my select statement as follows and used it as SQL query:
    CASE 2 *
    select DEPARTMENT_ID as ID, DEPARTMENT_NAME as NAME
    from DEPARTMENTS
    where DEPARTMENT_NAME IN (nvl(:myParameter, DEPARTMENT_NAME))
    => All is working now
    => Singe selection is working
    => Multiple selection is not working any more (ORA-00909: Ungültige Anzahl von Argumenten / illegal amount of arguments)
    ... using the same select statement within a data template, Multiple Selection is still not working (empty element)
    Last, I've tried another select statement, based on an entry of the xml publisher forum:
    CASE 3 *
    select DEPARTMENT_ID as ID, DEPARTMENT_NAME as NAME
    from DEPARTMENTS
    where DEPARTMENT_NAME IN (:myParameter) or :myParameter IS NULL
    => All is working
    => Singe selection is working
    => Multiple selection is not working (ORA-00920: Ungültiger relationaler Operator / illegal relational operator)
    So, I couldn't find a way that all three possibilities are working ... and using data templates, multiple selection never worked. If I hardcoded the where clause in the data template,
    e.g. where DEPARTMENT_NAME IN ('Administration','Marketing'), it worked fine (no matter, whether I place the sql statement within an CDATA section, or not).
    Can anyone tell me, what I'm doing wrong here?
    While testing my problem, I figured out that there's a difference of generated parameter output ... I just put the parameter in the select list, and depending on whether you use SQL query or data template, you'll get different results:
    SQL statement
    => for each parameter value an own parameter
    <_MYPARAMETER>Administration</_MYPARAMETER> in the case of single selection
    <_MYPARAMETER8093>Administration</_MYPARAMETER8093>
    <_MYPARAMETER8094>Marketing</_MYPARAMETER8094> in the case of multiple selection
    data Template
    => list of parameter values
    <_MYPARAMETER>Administration</_MYPARAMETER> in the case of single selection
    <_MYPARAMETER>'Administration','Marketing'</_MYPARAMETER> in the case of multiple selection
    Maybe that's the problem? I don't know, this difference how the Publisher Engine copes with parameters just attracted attention to me ...
    Alright, I hope it was not too confusing. I would appreciate any help, since here @ the customer's site we need to use data templates inclduing multiple selection in order to establish a context for VPD.
    The problems in summary:
    - how to write a select statement to include all three possibilites of parameter selection (single selection, multiple selection, All option)
    - multiple selection never worked using data templates
    Can someone help me here?

    hi,
    i think you have to use lexical parameters and a package, like this:
    <dataTemplate name="departments" dataSourceRef="hr@demo" defaultPackage="bip_departments">
    <parameters>
    <parameter name="p_location_id" include_in_output="false" datatype="float"/>
    </parameters>
    <dataTrigger name="beforeReport" source="bip_departments.beforeReportTrigger"/>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[ select d.department_id, d.department_name, d.location_id
                      from departments d
                     &p_where_clause
                order by location_id, department_id]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="LOC" source="Q1">
    <element name="location_id" value="location_id"/>
    <group name="DEPT" source="Q1">
    <element name="department_id" value="department_id"/>
    <element name="department_name" value="department_name"/>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    with package:
    create or replace package bip_departments
    as
    p_location_id long;
    p_where_clause long;
    function beforereporttrigger
    return boolean;
    end bip_departments;
    create or replace package body bip_departments
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    if (p_location_id is not null)
    then
    p_where_clause := 'where (d.location_id in (' || replace (p_location_id, '''') || '))';
    else
    p_where_clause := 'where 1=1';
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments;

  • Accessing local XML as data source

    Are there any instruction on how to do this.  the Xcelsius 2008 user guide shows instructions for server side where a script is required.  I can't imagine that this would be required for a local XML file.
    thanks

    Martin, here is a short walkthrough I wrote:
    <br>Basic Workflow
       1. Enter the file path in the "XML Data URL" field (e.g. c:\documents and settings\user\desktop\xmlfile.xml)
       2. Click "Enable Load"
       3. Click the plus button for as many ranges as you want
             3.a. Each range name must correspond to a matching variable name in the XML file (so if you name Range_0 to "Test", there must be a variable named "Test" in xmlfile.xml)
       4. Bind the ranges to ranges of cells (e.g. A1 through A10)
       5. In the XML file referenced in Step 1, make sure there are data values to be read
       6. Set the Usage tab's refresh options or use a Connection Refresh button
       7. Run the model and verify that the data loads from the XML file into the cell bindings
    <br>The data that is read from the XML file into the Excel cells will be used as if it was entered manually into the embedded Excel sheets. It can be used by reference in other Excel cell formulas, by components, and in any other fashion that cell data can be used in Xcelsius 2008.
    Here is the basic format required of the XML file:
    <data>
    <variable name="Test">
    <row><column>1</column><column>2</column></row>
    <row><column>10</column></row>
    </variable>
    </data>
    <br>If the file contains 1 variable (the range) with 5 row tags, each row tag with 1 column tag and 1 data value, the data will be read into Xcelsius as...
    A1 = 10
    A2 = 2
    A3 = 13
    A4 = 4
    A5 = 5
    The range can be bound to any column; A1:A5 was selected arbitrarily for demonstration.
    Note that the range will not conform to the Xcelsius binding. That is, if the XML file defines 5 rows with 1 column, that corresponds to a vertical listing of 5 cells; so, if you bind the XMLData connection range to 1 row and 5 columns, you will only see 1 data value.

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.

    Experts,
    In BW, does anybody have some simple code for when on your selection-screen you have an input parameter for the location of the file you want to upload. In SAP/R3 there use to be "Perform get_local_path" to drill down thru your hard drive to find the file you want to select to upload. I am not sure what to use in BW to execute a drill down process for getting the file in a drop down window.
                 Thank-You!

    Are you trying to browse the local PC or the appliation server. 
    Implement the program above,  give it a try.  When you hit F4, you will get a file open dialog,  selection your file, then click open, this will fill the pathfile into your parameter on the selection screen.  IS this whay you are looking for?
    You don't need to provide anything, but you can if you want.  There are import parameters.
    report zrich_0001.
    data: ifile type filetable.
    data: xfile like line of ifile.
    data: return type i.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call method cl_gui_frontend_services=>file_open_dialog
      EXPORTING
    <b>     WINDOW_TITLE            = 'Please choose a file'
    *     DEFAULT_EXTENSION       =
         DEFAULT_FILENAME        = 'Test.xml'
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = 'C:'
    *    MULTISELECTION          =</b>
        changing
          file_table              = ifile
          rc                      = return.
      read table ifile into xfile index 1.
      p_file = xfile-filename.
    Regards,
    Rich Heilman

  • Selecting data from a RDBMS table using connector framework, JDBC-Connector

    Hi Experts,
    I'm trying to select data from a mysql database that is connected via the BI-JDBC System in the portal (EP 7 SP 11).
    The connection (using the Connector Gateway Service) is set up, but selecting data fails.
    Can you please give me a code example how to select data from a table using INativeQuery or IOperation / IExcecution ?? IQuery is depracted...
    Here my piece of code, actually method "connection.newNativeQuery()" throws exception "BICapabilityNotSupportedException: Operation is not supported":
         IConnection connection = null;
         public void connectToJDBCSystem(String jdbcSystem) {
           // open a connection
           try { // get the Connector Gateway Service
              Object connectorservice =
              PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
              IConnectorGatewayService cgService =
              (IConnectorGatewayService) connectorservice;
              if (cgService == null) {
                   response.write("Error in get Connector Gateway Service <br>");
              try {
                ConnectionProperties prop =
                   new ConnectionProperties(request.getLocale(), request.getUser());
                connection = cgService.getConnection(jdbcSystem, prop);     
              } catch (Exception e) {
                   response.write("Connection to JDBC system " + jdbcSystem + " failed <br>");
                   response.write((String)e.getMessage() + "<br>");
                   e.printStackTrace();
              if (connection == null) {
                   response.write("No connection to JDBC system " + jdbcSystem + "<br>");
              } else {
                   response.write("Connection to JDBC system " + jdbcSystem + " successful <br>");
           } catch (Exception e) {
                response.write("Exception occurred <br>");
                           // up to this point it works fine...
           // build query using an IExecution object obtained from the Connection object
           response.write("prepare query 'SELECT idArt, art FROM art' <br>");
           String qstr = "SELECT idArt, art FROM art";
           INativeQuery query = null;
           try {
              query = connection.newNativeQuery();             
              response.write("execute query...<br>");
              ResultSet rs = (ResultSet)query.execute(qstr);
              while (rs.next()) {
                   response.write("<th>" + rs.getString(1) + "</th>");     
           } catch(Exception e)
              response.write("connection.newNativeQuery() failed <br>");
              response.write((String)e.getMessage() + "<br>");
              e.printStackTrace();
           } finally {
                 if( connection != null )
                 try {connection.close();}
                              catch(Exception ee){}
    Many thanks in advance, Monika
    Edited by: Monika Verwohlt on Jan 26, 2010 9:49 AM

    However this doesn't affect the XML encoding in data retrieved from XMLType using PL/SQL or programs (but it does work OK for SQLPlus SELECT).When performing an explicit serialization, with getClobVal method or XMLSerialize function, the database character set is used :
    NLS_LANG = FRENCH_FRANCE.WE8MSWIN1252
    NLS_CHARACTERSET = AL32UTF8
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create table test_nls of xmltype;
    Table créée.
    SQL> insert into test_nls values(xmltype('<?xml version="1.0" encoding="UTF-8"?><root/>'));
    1 ligne créée.
    SQL> select * from test_nls;
    SYS_NC_ROWINFO$
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <root/>
    SQL> select t.object_value.getclobval() from test_nls t;
    T.OBJECT_VALUE.GETCLOBVAL()
    <?xml version="1.0" encoding="UTF-8"?><root/>
    SQL> select xmlserialize(document object_value as clob) from test_nls;
    XMLSERIALIZE(DOCUMENTOBJECT_VALUEASCLOB)
    <?xml version="1.0" encoding="UTF-8"?><root/>

  • XML/RTF Data Template Question : Linking

    Ok, I have my data template here however when I try to print it, BIP makes no attempt to link the queries. I am using the Bind Method here with an XML Data Template.
    Data template is:
    <dataTemplate name="Orders_Dataset" description="List of Orders with Details" dataSourceRef="COE" defaultPackage="results_report">
    <parameters>
    <parameter name="TERM" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="People_Query">
    <![CDATA[SELECT DISTINCT PERSON Personp, RECTYPE RECTYPEP, SEC SECP, TERM TERMP, (SELECT TERMNAME FROM TERM b WHERE b.BANNER_CODE = TERM ) termnamep, PERSON || ' ' || SEC PERSEC FROM COE_DATA]]>
    </sqlStatement>
    <sqlStatement name="General_Questions_Query">
    <![CDATA[select DISTINCT d.PERSON PERSON, d.SEC SEC, q.Q_Number Q_Number, q.Q_ID Q_ID, TRIM(q.TEXT) text, TRIM(q.A1) A1, TRIM(q.A2) A2, TRIM(q.A3) A3, TRIM(q.A4) A4, TRIM(q.A5) A5, TRIM(A6) A6 from  COE_DATA d, coe_questions q WHERE q.Q_Number = d.Q_ID and Q_Number < 6 and d.Person = :Personp order by Q_Number]]>
    </sqlStatement>
    <sqlStatement name="Department_Questions_Query">
    <![CDATA[select DISTINCT d.PERSON PERSON, d.SEC SEC, q.Q_Number Q_Number, q.Q_ID Q_ID, TRIM(q.TEXT) text, TRIM(q.A1) A1, TRIM(q.A2) A2, TRIM(q.A3) A3, TRIM(q.A4) A4, TRIM(q.A5) A5, TRIM(A6) A6 from  COE_DATA d, coe_questions q WHERE q.Q_Number = d.Q_ID and d.Person = :Personp order by Q_Number]]>
    </sqlStatement>
    <sqlStatement name="Results_Query">
    <![CDATA[SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 1 o_id
      FROM coe_data a where term = :termp and a.Q_ID = :Q_Number and a.sec = 'COE' and a.person = 'COE'
    UNION
    SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 2 o_id
      FROM coe_data a where term = :termp and a.Q_ID = :Q_Number and a.sec = :secp and a.person = :secp
    UNION
    SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 3 o_id
      FROM coe_data a where term = :TERMP and a.Q_ID = :Q_NUMBER and a.sec = :SECP and a.person = :PERSONP order by o_id, rectype]]>
    </sqlStatement>
    </dataQuery>
    <!--dataTrigger name="beforeReport" source="results_report.beforeReportTrigger"/-->
    <dataStructure>
    <group name="G_People" source="People_Query">
    <element name="Person" value="personp"/>
    <element name="Section" value="secp"/>
    <element name="Course_Number" value="RECTYPEP"/>
    <element name="Term" value="TERMP"/>
    <element name="PERSEC" value="PERSEC"/>
    <group name="G_GENERAL_QUESTIONS" source="Department_Questions_Query">
    <element name="GQuestion_Text" value="text"/>
    <element name="GQuestion_Number" value="Q_Number"/>
    <element name="GQ1" value="A1"/>
    <element name="GQ2" value="A2"/>
    <element name="GQ3" value="A3"/>
    <element name="GQ4" value="A4"/>
    <element name="GQ5" value="A5"/>
    <element name="GQ6" value="A6"/>
    <group name="G_GENERAL_ANSWERS" source="Results_Query">
    <element name="GAPerson" value="person"/>
    <element name="GArec" value="rectype"/>
    <element name="GAsec" value="sec"/>
    <element name="GARQ_ID" value="Q_ID"/>
    <element name="GA1" value="A1"/>
    <element name="GA2" value="A2"/>
    <element name="GA3" value="A3"/>
    <element name="GA4" value="A4"/>
    <element name="GA5" value="A5"/>
    <element name="GA6" value="A6"/>
    </group>
    </group>
    <group name="G_DEPARTMENT_QUESTIONS" source="Department_Questions_Query">
    <element name="DQuestion_Text" value="text"/>
    <element name="DQuestion_Number" value="Q_Number"/>
    <element name="DQ1" value="A1"/>
    <element name="DQ2" value="A2"/>
    <element name="DQ3" value="A3"/>
    <element name="DQ4" value="A4"/>
    <element name="DQ5" value="A5"/>
    <element name="DQ6" value="A6"/>
    <group name="G_DEPARTMENT_ANSWERS" source="Results_Query">
    <element name="DAPerson" value="person"/>
    <element name="DArec" value="rectype"/>
    <element name="DAsec" value="sec"/>
    <element name="DARQ_ID" value="Q_ID"/>
    <element name="DA1" value="A1"/>
    <element name="DA2" value="A2"/>
    <element name="DA3" value="A3"/>
    <element name="DA4" value="A4"/>
    <element name="DA5" value="A5"/>
    <element name="DA6" value="A6"/>
    </group>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    I am trying to establish all my linking in this data template. However I noticed a discrepancy between the expected output and what I received. For some reason at the 3rd level of the dataStructure (the answer level), it restarts at Q_ID = 1 instead of whatever the Q_Number is from the level above. In my case all of the answers are in the same table regardless of category. Can someone offer up any help with fixing my template?
    I did notice something odd, for G_DEPARTMENT_ANSWERS it is working correct but does not work for G_GENERAL_ANSWERS.

    Warren,
    You need to select data source type as DataTemplate and then cut and paste your DataTemplate in the text editor window.
    Make sure you define the dataSourceRef in dataTemplate Header. The dataSourceRef is the DataSource (JDBC Connection) you define through Administartion.
    <dataTemplate name="Employee" description="Template description" dataSourceRef="demo">
    -Ashish

  • UCCX Script XML Select equivalent

    Assume the following XML document exists:
    <Technician>
          <ID>1234</ID>
               <CellPhone>5039991234</CellPhone>
               <HomePhone>5039992345</HomePhone>
         <ID>2345</ID>
               <CellPhone>4155551212</CellPhone>
               <HomePhone>4151234445</HomePhone>
         <ID>5678</ID>
               <CellPhone>6125431234</CellPhone>
               <HomePhone>6126634242</HomePhone>
    </Technician>
    I Know I have to Create the FileDocumentName = Technician
    I know that I have to Create XML Document = Technician
    For each element I want to retrieve I know I have to as an example
    GET XML DOCUMENT DATA "/descendant::Technician/child::HomePhone"
    But what is the correct format to select the HomePhone based  WHERE ID is provided of lets say 1234?
    /Technician/ID=[1234]/HomePhone
    What is the correct format here?

    OK I broke the code on this (sorry for the PUN).   Reformat your XML document to set the ID as an Attribute and put the Phones as Element within the Technicians as follows:
               8589451069
               6590
               7608049733
               6590
               7025532706
               6590
               9144718510
               6599
    The document is the same, but we set the ID as a Unique Record Number (maybe the only reason I can see that anyone would use an Attribute over an Element).   You can not use your [@ID="1234"] to select a specifc Element from the TechnicianList.   So you would setup an Xpath as follows:
    strXpath = //Technician[@ID="1234"]/TechnicianCell 
    Then stuff your "TechnicianCell = GET XML DATA with strXpath"
    You can then Substitue a Variable for the ID so that you can fill it from the GET DIGITS step.  I sometimes find that I have to convert the String value to a int Value, but it works and you should get the desired result.  Take Away = Unique Record ID!
    Peter Buswell (aka DrVoIP)
    http://blog.drvoip.com

  • JBO-27021: Failed to load custom data type value at index 1

    I have an adf table and an adf form in a jspx page. Well, the function of it is pretty basic CRUD. During our testings, we seem to have no problem at all but after deploying it to our remote server, we've been getting this error every time we delete the 'first' record in the table. We tried deleting other records and it worked perfectly fine. This is the first time we've encountered an error like this and we don't really know how to debug this, since it's working fine locally. Any help would be appreciated. Thanks!
    here's the pop-up error after trying to delete the first record
    JBO-27021: Failed to load custom data type value at index 1 with java object of type oracle.jbo.domain.Number due to java.sql.SQLException.
    I'm using jdev 11g and the latest webLogic server

    I have a similar problem,
    I have a VO with a query of the form: "SELECT d.campoUno, d.campoDos, sum(d.campoTres) as campoTres FROM TablaUno d
    WHERE <conditions>
    GROUP BY d.campoUno, d.campoDos",
    to modify the query for "SELECT d.campoUno, d.campoDos, *d.campoCuatro*, sum(d.campoTres) as campoTres FROM TablaUno d
    WHERE <conditions>
    GROUP BY d.campoUno, d.campoDos, *d.campoCuatro*"
    throws an exception: "javax.faces.el.EvaluationException: oracle.jbo.AttributeLoadException: JBO-27021: Failed to load custom data type value at index 16..............Caused by: java.sql.SQLException: Invalid column index
    The attribute was added well in xml definitions.
    I use JDeveloper 11.1.1.4.0
    any suggestions?

  • Upload XML file data into internal table

    Hi,
    I need help from you.
    I am uploading XML file from Application server.
    1.In application server under directory it may have several XML files and i need to upload all the XML files  when we gave only directory name. So, what is the function module for that logic . If possible code also.
    2.Once we get the files into some internal table we need to upload data from that files to internal table.
    So what is the logic for that , if possible code also.
    I am giving sample directory:    
    For example in this directory assume 3 xml files are there.
    I need to upload those files and data from that in to internal table.
    Thanks & Regards
    VSR

    Below code will give you an idea.
    TYPE-POOLS: ixml. "iXML Library Types
    *TABLES : rbkp.
    TYPE DECLERATIION
    TYPES: BEGIN OF type_tabpo,
    ebeln TYPE ekko-ebeln, "PO document number
    ebelp TYPE ekpo-ebelp, "PO line item
    END OF type_tabpo.
    TYPES: BEGIN OF type_ekbe,
    belnr TYPE rbkp-belnr, "Invoice document
    gjahr TYPE rbkp-gjahr, "fiscal year
    END OF type_ekbe.
    TYPES: BEGIN OF type_invoice,
    belnr TYPE rbkp-belnr, "PO document number
    gjahr TYPE rbkp-gjahr, "Fiscal Year
    rbstat TYPE rbkp-rbstat, "invoice status
    END OF type_invoice.
    TYPES: BEGIN OF t_xml_line, "Structure for holding XML data
    data(256) TYPE x,
    END OF t_xml_line.
    INTERNAL TABLE DECLERATIION
    DATA: gi_tabpo TYPE STANDARD TABLE OF type_tabpo,
    gi_ekbe TYPE STANDARD TABLE OF type_ekbe,
    gi_invoice TYPE STANDARD TABLE OF type_invoice,
    gi_bapiret2 TYPE STANDARD TABLE OF bapiret2.
    DATA: l_ixml TYPE REF TO if_ixml,
    l_streamfactory TYPE REF TO if_ixml_stream_factory.
    DATA: l_xml_table TYPE TABLE OF t_xml_line, " XML Table of the structure
    l_xml_line TYPE t_xml_line, " Record of structure t_xml_line
    l_xml_table_size TYPE i. " XML table size
    DATA: l_filename TYPE string.
    WORK AREA DECLARATION
    DATA: gw_tabpo TYPE type_tabpo,
    gw_ekbe TYPE type_ekbe,
    gw_invoice TYPE type_invoice,
    gw_bapiret2 TYPE bapiret2.
    BEGIN OF SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: p_file TYPE pathintern LOWER CASE DEFAULT '/usr/sap/tmp/'.
    Validation of XML file: Only DTD included in XML document is supported
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN.
    To validate p_file is not initial
    PERFORM sub_validate_file.
    PERFORM sub_validate_path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Request for filename for xml file from the application server
    PERFORM sub_get_filename_appl USING p_file.
    START OF SELECTION SCREEN
    START-OF-SELECTION.
    PERFORM sub_fetch_po_details.
    PERFORM sub_get_invoice.
    PERFORM sub_rel_invoice.
    END OF SELECTION SCREEN
    END-OF-SELECTION.
    *& Form sub_validate_file
    To Validate the file
    FORM sub_validate_file .
    IF p_file IS INITIAL.
    MESSAGE e000. "specify the file path
    ENDIF.
    ENDFORM. " sub_validate_file
    *& Form sub_get_filename_appl
    form sub_get_filename_appl USING l_fname TYPE any.
    DATA: l_fname TYPE filename-fileintern. " File name
    *GET THE FILENAME FROM THE APPLICATION SERVER
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
    directory = l_fname
    filemask = '*'
    IMPORTING
    serverfile = l_fname
    EXCEPTIONS
    canceled_by_user = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " sub_get_filename_appl
    *& Form sub_fetch_po_details
    To fetch the PO details from the application server
    Format of file is XML
    FORM sub_fetch_po_details .
    TYPE DECLERATIION
    l_ixml = cl_ixml=>create( ).
    Creating a stream factory
    l_streamfactory = l_ixml->create_stream_factory( ).
    PERFORM get_xml_table.
    LOOP AT gi_tabpo INTO gw_tabpo.
    WRITE:/ gw_tabpo.
    ENDLOOP.
    ENDFORM. " sub_fetch_po_details
    *& Form get_xml_table
    Read from the xml file
    FORM get_xml_table .
    Local variable declarations
    DATA: l_len TYPE i,
    l_len2 TYPE i,
    l_tab TYPE tsfixml,
    l_content TYPE string,
    l_str1 TYPE string,
    c_conv TYPE REF TO cl_abap_conv_in_ce,
    l_itab TYPE TABLE OF string.
    l_filename = p_file.
    code to upload data from application server
    OPEN DATASET l_filename FOR INPUT IN BINARY MODE.
    IF sy-subrc 0.
    WRITE:/ 'invalid file path'.
    ENDIF.
    DO.
    READ DATASET l_filename INTO l_xml_line.
    IF sy-subrc EQ 0.
    APPEND l_xml_line TO l_xml_table.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    CLOSE DATASET l_filename.
    code to find the table size
    DESCRIBE TABLE l_xml_table.
    l_xml_table_size = ( sy-tleng ) * ( sy-tfill ).
    *code to convert hexadecimal to XML
    LOOP AT l_xml_table INTO l_xml_line.
    c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    replacement
    = space ).
    c_conv->read( IMPORTING data = l_content len = l_len ).
    CONCATENATE l_str1 l_content INTO l_str1.
    ENDLOOP.
    l_str1 = l_str1+0(l_xml_table_size).
    SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
    LOOP AT l_itab INTO l_str1.
    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
    l_str1 WITH space.
    ENDLOOP.
    CALL TRANSFORMATION ('ID') " code to put in internal table
    SOURCE XML l_str1
    RESULT tab = gi_tabpo[].
    ENDFORM. " get_xml_table

Maybe you are looking for

  • How many iPhones & iPads can I run from the same Apple ID

    My family now have 2 iPhones 2 iPads & an iTouch - I only have 1 apple ID and up until now have linked all the devices to this ID but now the iMessage & Facetime are all linked together so when I text my wife it also comes up in my sons iPad mini & a

  • Error while invoking the client

    Hello guys , I'm new to web services . i created a service call HelloWorld using apache axis2 and its working fine and later i created a client and when i try to invoke it . i'm getting a error which says null pointer exception . this is my client co

  • Why is my mail program so slow with Yosemite

    I am running 10.10.1 on my G5 (2010). Mail program is not running as before I upgraded. Everything in my mail is slow: typing, incoming, outgoing... Any ideas?

  • How can i restore the files which are important to me which i suddenly delete the files in download?

    i nid to restore the file which i suddenly delete in download.. i was about to delete the files which are not important but i suddenly delete the files which are important... how can i restore it??

  • X11vnc not working

    I had made a thread a long time ago here:  https://bbs.archlinux.org/viewtopic.php?id=52538  however I reinstalled since some times and haven't used VNC in a while, and now can't get it to start... What I am doing is ssh'ing into a screen session to