How to use value from Custom Select tag

Hi,
I have made a custom tag for html element select. It is a very basic tag with the selection of one vaule. I am able to populate the list using custom tag in JSP but i am not able to optain the value from that. Kindly see my jsp code.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Expenses Report</title>
</head>
<body>
<center>
<table summary="layout">
<tr>
<td>Month:</td>
<td>
<tt:Select name="month" from="${ExpensesDBO}"/>
</td>
</tr>
</table>
<c:if test="${fn:length(param.month) > 0}">
<table summary="layout" border="1">
<tr>
<td align="center">Year</td>
<td align="center">Month</td>
<td align="center">Shopping</td>
<td align="center">Groceries</td>
<td align="center">Fixed Expenses</td>
<td align="center">Transportation</td>
</tr>
<tt:Expenses var="exp" username="${sessionScope.user}" from="${ExpensesDBO}">
<tr>
<td>${exp.year}</td>
<td>${exp.month}</td>
<td>${exp.shopping}</td>
<td>${exp.groceries}</td>
<td>${exp.fixedExpenses}</td>
<td>${exp.transportation}</td>
</tr>
</tt:Expenses>
</table>
</c:if>
</center>
</body>
</html>
Basically based on the selected value I want to show the same page with the details including page with the default value in select list.
I have made a generic select custom tag to be used within the application.
Regards,
Rahul.

If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'

Similar Messages

  • How to use value from one data set in other data set SQL select.

    Hello all, i have one data set, and i need to get value from that data set into other data set. Something like '?' but without input. I will try to explain it with screenshots:

    If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'

  • How to use results from first select to run from second select w/subselect?

    -- I create a table with three fields: Name, Amount, and a Trans_Date.
    CREATE TABLE TEST
    NAME VARCHAR2(19) NULL,
    AMOUNT VARCHAR2(8) NULL,
    TRANS_DATE DATE NULL
    -- I insert a few rows into my table:
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '110', TO_DATE('06/01/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '20', TO_DATE('06/02/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '110', TO_DATE('06/03/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '21', TO_DATE('06/04/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '68', TO_DATE('06/04/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '110', TO_DATE('06/05/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '20', TO_DATE('06/06/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '43', TO_DATE('06/07/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '77', TO_DATE('06/08/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '221', TO_DATE('06/09/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '43', TO_DATE('06/10/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    INSERT INTO TEST ( TEST.NAME, TEST.AMOUNT, TEST.TRANS_DATE ) VALUES ( 'Bill', '73', TO_DATE('06/10/2005 08:00:00 PM', 'MM/DD/YYYY HH12:MI:SS PM') );
    commit;
    -- These are the current select statements I am using:
    -- Last 10 days
    SELECT SUM(t.AMOUNT) AMOUNT10, NULL AMOUNT5, NULL AMOUNT3
    FROM test t
    WHERE t.NAME = 'Bill'
    AND t.TRANS_DATE >= TO_DATE('06/01/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    UNION ALL
    -- Last 5 days
    SELECT NULL AMOUNT10, SUM(t.AMOUNT) AMOUNT5, NULL AMOUNT3
    FROM test t
    WHERE t.NAME = 'Bill'
    AND t.TRANS_DATE >= TO_DATE('06/06/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    UNION ALL
    -- Last 3 days
    SELECT NULL AMOUNT10, NULL AMOUNT5, SUM(t.AMOUNT) AMOUNT3
    FROM test t
    WHERE t.NAME = 'Bill'
    AND t.TRANS_DATE >= TO_DATE('06/08/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am');
    -- This is the current output:
    AMOUNT10 AMOUNT5 AMOUNT3
    916 NULL NULL
    NULL 477 NULL
    NULL NULL 414
    Is there a way to combine these statements to speed up performance?
    I'm thinking there should be a way to select all the rows in the last tens days, and then just from those results, run another select to get the results for the last 2, 3, or 5 days using subselects in some way. Any help is appreciated. Thanks.
    I don't mind getting results in one row like this:
    AMOUNT10 AMOUNT5 AMOUNT3
    916 477 414

    Thank you for providing create table and insert scripts, along with the query so far. It makes providing an answer so much easier.
    Does this help?
    SQL> select sum(amount10) amount10, sum(amount5) amount5, sum(amount3) amount3
      2  from
      3      (
      4      select
      5          case when
      6              t.TRANS_DATE >= TO_DATE('06/01/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
      7              AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
      8          then
      9              amount
    10          end amount10,
    11          case when
    12              t.TRANS_DATE >= TO_DATE('06/06/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    13              AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    14          then
    15              amount
    16          end amount5,
    17          case when
    18              t.TRANS_DATE >= TO_DATE('06/08/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    19              AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    20          then
    21              amount
    22          end amount3
    23      from
    24          test t
    25      where
    26          t.name = 'Bill'
    27      AND t.TRANS_DATE >= TO_DATE('06/01/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    28      AND t.TRANS_DATE <= TO_DATE('06/10/2005 08:00:00 PM','mm/dd/yyyy hh12:mi:ss am')
    29      );
      AMOUNT10    AMOUNT5    AMOUNT3
           916        477        414
    SQL>Message was edited by:
    3360
    Durn, pipped by flakey forums and the return of v garcia.

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

  • Table look up using value from customer exit variable

    I have a customer exit variable, CURRMON, which the user enters in the format MM/YYYY. From this entry, I would like to do the following to calculate and display the number of business days in the selected month:
    Do the following to get Business Days in month.
    Use the KF "FBA Day"  (CTAFBAD) from the CTA_M01 infocube and write ABAP routine.
    1. Based on user entry cal month get the last calendar day .
    2. Do a master data look up (CTAFBAC is the master data object), using the last calendar day from step 1.
    3. CTAFBAD is the attribute of CTAFBAC so move the value of CTAFBAD to the result, and display this result
    Can anyone help me with this?

    Hello,
    You can use i step = 1 in SMOD transaction and write the code there.
    l_s_range-low = sy-uname.
    append ls_range to e_t_range.
    regds,
    Shashank

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • Getting Tag and value from the selected Xml element value

    Hi All,
    I have an xml file which i import to the Indesign CS3 .From the structure view , i drag and drop the root node on to the page. Now i select an xml value from the page. Now i need to get the element tag and value from the selected value.
    For example
    File Name : sample1.xml
    <Root>
    <employeeName> A</employeeName>
    <employeeEmail>[email protected]</employeeEmail>
    </Root>
    Now i import this sample.xml in my indesign CS3 and from the structure view i drag the Root  tag and drop it on the page.Now the values of the element tag are displayed.
    Now i select "[email protected]" from the page and i have a menu "Get Selected XML" on clicking which  i should get element tag with value.(i.e <employeeEmail>[email protected]</employeeEmail>)
    How to go about it.?
    Thanks
    Sakthi

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • Need help in extracting value from an xml tag.

    Hi ALL,
    Good Morning to all, i have problem in fetching a value from a xml tag. I have created a xml schema based on the schema i have created a xmltype table and inserted a value to the table. When i am trying to fetch a value from a particular tag i am unable to do so.. Kindly help me to solve this. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml.xsd"
    version="1.0">
    <element name="Field1">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>          
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable1 (
    id number, XMLDATA XmlType)
    XMLTYPE XMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml.xsd"
    ELEMENT "Field1";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable VALUES(
    xmltype.createxml('<?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    </samp:Field1>'));
    To show the data as a field with structure:
    1. Query:
    Select * from chipsxmltable1;
    Output:
    ID XMLDATA
    1 <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    2. Query: (Both the query displays the same Output)
         SELECT X.xmldata.getClobVal() "XMLDATA" FROM chipsxmltable1 X;
         select extract(XMLDATA, '/Field1').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    XMLDATA
    <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    To show the data as a single string without structure using "getstringval()":
    3. Query
         select extract(XMLDATA, '//text()').getstringval() "CHIPS - XML" from chipsxmltable1 x;
    OUtput:
    CHIPS - XML
    NoNoYYYYYY
    To show the data as a single string without structure using "getclobval()":
    4.Query
         select extract(XMLDATA, '//text()').getClobVal() "CHIPS - XML" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    NoNoYYYYYY
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACT" function:
    6.Query:
         select extract(XMLDATA, '/Field1/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    The above queries are not fetching the value.
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACTVALUE" function:
    7. Query:
         select extractValue(XMLDATA, '/Field1/UTI') "XMLDATA" from chipsxmltable1 x;
         select extractValue(XMLDATA, '/Field1/UTI/U01') "XMLDATA" from chipsxmltable1 x;
    Output:
    X
    The above queries are not fetching the value.
    My question is:
    How to fetch values from xml tag when the value are inserted through xml schema?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    You need to declare the namespace of each element used in the XPath expression, like this :
    SQL> select extractvalue( XMLDATA
      2                     , '/samp:Field1/UTI/U01'
      3                     , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
      4  from chipsxmltable1 x
      5  ;
    XMLDATA
    No
    SQL> select extract( XMLDATA
      2                , '/samp:Field1/UTI'
      3                , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
      4                ).getstringval() "XMLDATA"
      5  from chipsxmltable1 x
      6  ;
    XMLDATA
    <UTI>
      <U01>No</U01>
      <U02>Y</U02>
      <U03>Y</U03>
      <U03a>Y</U03a>
      <U03b>Y</U03b>
      <U03c>Y</U03c>
      <U04>Y</U04>
      <U05>Y</U05>
    </UTI>
    Please see EXTRACT and EXTRACTVALUE documentation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions051.htm#i1006712
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions052.htm#SQLRF06173
    BTW, "XMLDATA" is a pseudo-column used by Oracle. I don't know if it'll ever cause any conflict but maybe you should rename your column.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256
    Regards.

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • How to use a function in select clause

    hi gems...good evening...
    I want to write a select clause from a function. The scenario is like below:
    function parameters
    CREATE OR REPLACE FUNCTION FUNCTION_DEMO(p_pid IN NUMBER,
    p_bankerNum IN NUMBER,
    p_banker_name IN VARCHAR2,
    p_business_num IN NUMBER,
    p_businesses IN table_typ_businesses)
    return table_typ_bankers
    as .......
    global object and table types
    CREATE OR REPLACE TYPE obj_typ_businesses AS OBJECT (businesses NUMBER);
    CREATE OR REPLACE TYPE table_typ_businesses AS TABLE OF obj_typ_businesses;
    CREATE OR REPLACE TYPE obj_typ_bankers AS OBJECT (banker_num NUMBER(10,0));
    CREATE OR REPLACE TYPE table_typ_bankers IS TABLE OF obj_typ_bankers;
    The select query
    select * from
    table(cast(FUNCTION_DEMO(1,
    2,
    'ALEX',
    2,
    table(cast(select businesses_id from reference_businesses) as table_typ_businesses) as table_typ_bankers)But it is giving error with Missing expression.
    My function is compiled successfully. I just want to make the select query to view the output given by the function i.e the table type "table_typ_bankers".
    Please help...thanks in advance..

    Hi ,
    You can check this and change your code by taking this as an example. I just noted down with simple one input and return as collection type
    and how to use/call it in select statement.
    SQL> CREATE OR REPLACE TYPE obj_typ_businesses AS OBJECT (businesses NUMBER)
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE table_typ_businesses AS TABLE OF obj_typ_businesses
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE obj_typ_bankers AS OBJECT (banker_num NUMBER(10,2))
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE table_typ_bankers IS TABLE OF obj_typ_bankers
      2  /
    Type created.
    /* Now creating a demo function and just focusing on your one input as collection type  */
    SQL> create or replace function f11 ( tab_rec  IN table_typ_businesses)
      2  return table_typ_bankers
      3  is
      4  t_val table_typ_bankers:= table_typ_bankers();
      5  begin
      6        dbms_output.put_line('tab_rec count -'||tab_rec.count);
      7
      8  for i in 1..tab_rec.count
      9              loop
    10               dbms_output.put_line ('tab_rec value ('||i||')'||tab_rec(i).businesses);
    11                       t_val.EXTEND;
    12                    t_val(i) := obj_typ_bankers(tab_rec(i).businesses * 12.50);
    13              end loop;
    14              return t_val;
    15  end;
    16  /
    Function created.
    /* To run your function by a select statement */
    SQL> SELECT * FROM TABLE(f11(table_typ_businesses(obj_typ_businesses(5),
      2                          obj_typ_businesses(12),
      3                                         obj_typ_businesses(18))
      4                                             ) )
      5  /
    BANKER_NUM
          62.5
           150
           225
    tab_rec count -3
    tab_rec value (1)5
    tab_rec value (2)12
    tab_rec value (3)18Hope this will help you... :)
    Thanks!
    Ashutosh

  • How to move value from one tlist to another tlist in same form?

    how to move value from one tlist to another tlist in same form on button press?
    Same like in data block wizard when we select value from 1st list it will go to 2nd list and can be move back. Please help i am new to forms .
    Regards

    just call the following proc in your add & add all buttons. Reverse the code for REMOVEs
    this proc will move one item at a time from list_item1 to list_item2.
    PROCEDURE add_an_item
    IS
      v_list_count    NUMBER;
      v_item1_label  VARCHAR2(60);
    BEGIN
      IF :list_item1 IS NOT NULL THEN v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
          IF v_list_count >= 1 THEN FOR i IN 1..v_list_count
          LOOP
             IF   :list_item1    = Get_List_Element_Value('list_item1', i)
             THEN
                  v_item1_label := Get_List_Element_label('list_item1', i);                 
                  Add_List_Element('list_item2',1,v_item_label,:list_item1);         
               Delete_List_Element('list_item1',i);
               Exit;
             END IF;
          END LOOP;
           END IF;
       END IF;
    END;
    *********************************************************************************this proc will move all items from list_item1 to list_item2.
    PROCEDURE add_all_items
    IS
      v_list_count NUMBER;
      v_item_label VARCHAR2(60);
      v_item_value VARCHAR2(60);
    BEGIN
    v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
    IF    v_list_count = 1 AND Get_List_Element_Value('list_item1', 1) IS NULL THEN NULL;
    ELSIF v_list_count >= 1 THEN
           FOR i IN 1..v_list_count
           LOOP
            v_item_value  := Get_List_Element_Value('list_item1', i);
            v_item_label  := Get_List_Element_label('list_item1', i);       
            Add_List_Element('list_item2',i,v_item_label,v_item_value);
           END LOOP;
           clear_list('list_item1');
    END IF;
    END;I added [ code ] tags to make this easier to read.
    Message was edited by:
    Jan Carlin

  • How to pass value from jsp to java bean

    I have huge problem . How to pass value from jsp value to java bean.Please replay me soon

    Use the <jsp:setProperty> tag. There are several ways to use it. The one you probably want is:
    <jsp:setProperty name="bean_name"  property="property_name"  value="the_value_you_want_to_set"/>

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

Maybe you are looking for