Passing Multiple Values from a worksheet to PL/SQL function.

Hi All,
Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
I will try to explain the scenario:
We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
Or any other work arounds for the scenario explained?
Reagrds,
Jeneesh

Hi Russ,
Thanks for the response.
Russ Proudman wrote:
1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
Russ Proudman wrote:
2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
Russ Proudman wrote:
3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
Regards,
Jeneesh

Similar Messages

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • Pass multiple values as single input parameter into pipelined function

    Hi all,
    My need is to pass multiple values as single input parameter into pipelined function.
    For example - "2" and "3" are values of input parameter "t":
    with data as (
    select 1 as t from dual union all
    select 2 as t from dual union all
    select 3 as t from dual union all
    select 4 as t from dual union all
    select 5 as t from dual
    select * from data where t in (2,3)Is it possible at all?

    Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
    See:
    SQL> create table data as
      2  select 1 as t from dual union all
      3  select 2 as t from dual union all
      4  select 3 as t from dual union all
      5  select 4 as t from dual union all
      6  select 5 as t from dual;
    Table created.
    SQL> --
    SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list  IN  VARCHAR2)
      2  RETURN sys.odcivarchar2list PIPELINED
      3  AS
      4    l_text  VARCHAR2(32767) := p_in_list || ',';
      5    l_idx   NUMBER;
      6  BEGIN
      7    LOOP
      8      l_idx := INSTR(l_text, ',');
      9      EXIT WHEN NVL(l_idx, 0) = 0;
    10      PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    11      l_text := SUBSTR(l_text, l_idx + 1);
    12    END LOOP;
    13 
    14    RETURN;
    15  END;
    16  /
    Function created.
    SQL> --
    SQL> select *
      2  from   data
      3  where  t in ( select *
      4                from   table(in_list('1,2'))
      5              );
             T
             1
             2
    2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
    or
    http://tkyte.blogspot.nl/2006/06/varying-in-lists.html

  • Passing Multiple Values from Multi Select

    Hi,
    My requirement is simple. I have created a simple Multi Select Option in parameter form and i want to send multiple selected values from the multi select option (in parameter form) to reports.
    eg:
    I want to send multiple countries code as input .........'US', 'CA', 'IND', 'UK'
    Can i do it in Oracle 6i reports, Thanks in Advance.
    Regards,
    Asgar

    Hi Thanks Again,
    For such a nice response. I got the Lexical Where condition properly running but still getting problems in catching the multiple values to be passed from form. just i will give u an insight of wat i have done:
    SQL:
    SELECT ALL FROM EMPLOYEES &cond_1* -- Working FIne
    in my Html Parameter Form i have an Multi Select component (the Problem is here) it is not passing more than i value from the form once i am accessing it from web or running it in paper report. In paper report layout it is not allowing me to select more than one value. but in HTML it is allowing to select multiple values but at the server end (After Parameter Form Trigger) it is giving a single value not multiple values.
    In PL/SQL when i checking the length of country_id i m getting it as one.
    Here is my SQL code
    srw.message(10, LENGTH(:country_id_1));
    :cond_1 := 'where country_id = '''|| :country_id_1 ||'''';
    This is passing the condition properly to SQL but only with single value but i want to pass multiple values
    I am struck in this+_
    WHERE CONTRY_COLUMN IN ('USA','UAE') -- This variable you have to pass from you form...
    Here as you said you gave multiple selection in your parameter form to generate report. So before generation report just prepare variable like this as it is bold above.
    and pass parameter through your runtime form to the report as you pass the normal parameter...liket this i gave you example...
    ADD_PARAMETER(PARAMETER_LIST_NAME,'P_CONT_PARAM',TEXT_PARAMETER,vString);
    Sorry for troubling you for a small thing but please help me to solve this issue.
    Thanks Again............
    Asgar.

  • How to pass multiple values from master to child report

    Hello,
    How would I pass multiple prompts from the master to child report? So for example, say I want to pass a 'Country' value along with a 'City' value
    Would it be?
    ="<a href=\"../../opendoc/openDocument.jsp?iDocID=ASQlgCemIOlEid1HHUlzyPs&sDocName=DocTest&sIDType=CUID&sType=wid&sWindow=Same&lsSCountry="+[Country]+"&lsSCity="+[City]+"\</a>"
    Thanks,
    Carter

    Carter,
    what is the syntax for this?
    It is exactly how you have posted in your original note.
    "&lsSCountry="+[Country]+"&lsSCity="[City]
    This will work providing the target report has a prompt called "Country" and another prompt called "City".  Note that your prompt and what you pass between the &lsS and the equal (=) must match exactly, otherwise OpenDocument will not communicate the prompt title to InfoView properly and InfoView will stop and execute the prompt to get the info it needs before running the report.  Have you tried what you've posted originally to see if it executes without a problem?
    Thanks,
    John

  • Passing multiple values to another page via a sql report

    Having trouble passing multiple values to another page via a popup SQL report
    I have two fields one called "descr" and another called "Met"
    when I use the code below all works fine and the value of "descr" is passed
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE:'
    || descr
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    I appeciate your help looking into this
    FYI (Here is the entire SQL for reference)
    With t
    as
    (SELECT
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_CPT &gt; :P940_METRIC_1_WCS_CPT1 then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_CPT,'FML999G999G999G999G990D00')||'&lt;/span&gt;' end "WCSCPT",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TOI_PER_FTE &lt; :P940_METRIC_2_WCS_TOI_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TOI_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTOIPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_SIO_PER_FTE &lt; :P940_METRIC_3_WCS_SIO_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_SIO_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSSIOPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_TC_PER_FTE &lt; :P940_METRIC_4_WCS_TC_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_TC_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSTCPERFTE",
    CASE WHEN KEY = 2 then
    CASE WHEN WCS_ADSL_PER_FTE &lt; :P940_METRIC_5_WCS_DSL_PER_FTE then
    '&lt;span style="color:Red; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' else
    '&lt;span style="color:#399304; "&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end
    else '&lt;span style="color:#180c8b;"&gt;'||TO_CHAR(WCS_ADSL_PER_FTE,'999G999G999G999G990')||'&lt;/span&gt;' end "WCSADSLPERFTE",
    CASE WHEN KEY = 2 THEN
    TO_CHAR(MONTH,'MON-YY')
    else
    'METRICS'
    end "MONTH"
    FROM (
    SELECT DISTINCT
    ROW_NUMBER() OVER (ORDER BY KEY DESC) AS ROW_NUM, KEY, WCS_CPT, WCS_TOI_PER_FTE, WCS_SIO_PER_FTE, WCS_TC_PER_FTE, WCS_ADSL_PER_FTE, MONTH
    from TW_M_KEYMETRICS
    WHERE TO_DATE(UPPER(MONTH),'DD/MON/YY') &gt;= TO_DATE(UPPER(:P940_START_OF_THIS_FIN_YEAR),'DD/MON/YY')
    ORDER BY KEY ASC, ROW_NUM, MONTH)
    WHERE ROW_NUM &lt;= :P940_MONTHS_SINCE_FIN_START)
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_METRIC_TYPE,P950_METRIC_VALUE:descr,MET'
    || ''
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    , max(Met) METRICS, max(Jul) Jul08, max(Aug) Aug08, max(Sep) Sep08, max(Oct) Oct08, max(Nov) Nov08, max(Dec)Dec08, max(Jan) Jan08, max(Feb) Feb08, max(Mar) Mar08, max(Apr) Apr08, max(May) May08, max(Jun) Jun08
    from (
    Select 'Cost Per Transaction' descr,
    decode (MONTH, 'METRICS', WCSCPT) MET,
    decode (MONTH, 'JUL-08', WCSCPT) Jul,
    decode (MONTH, 'AUG-08', WCSCPT) Aug,
    decode (MONTH, 'SEP-08', WCSCPT) Sep,
    decode (MONTH, 'OCT-08', WCSCPT) Oct,
    decode (MONTH, 'NOV-08', WCSCPT) Nov,
    decode (MONTH, 'DEC-08', WCSCPT) Dec,
    decode (MONTH, 'JAN-08', WCSCPT) Jan,
    decode (MONTH, 'FEB-08', WCSCPT) Feb,
    decode (MONTH, 'MAR-08', WCSCPT) Mar,
    decode (MONTH, 'APR-08', WCSCPT) Apr,
    decode (MONTH, 'MAY-08', WCSCPT) May,
    decode (MONTH, 'JUN-08', WCSCPT) Jun
    from t
    union all
    Select 'Total Orders Issued Per FTE' descr,
    decode (MONTH, 'METRICS', WCSTOIPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTOIPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTOIPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTOIPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTOIPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTOIPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTOIPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTOIPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTOIPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTOIPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTOIPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTOIPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTOIPERFTE) Jun
    from t
    union all
    Select 'SIOs Per Billing FTE' descr,
    decode (MONTH, 'METRICS', WCSSIOPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSSIOPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSSIOPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSSIOPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSSIOPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSSIOPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSSIOPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSSIOPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSSIOPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSSIOPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSSIOPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSSIOPERFTE) May,
    decode (MONTH, 'JUN-08', WCSSIOPERFTE) Jun
    from t
    union all
    Select 'Total Calls Answered per FTE' descr,
    decode (MONTH, 'METRICS', WCSTCPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSTCPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSTCPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSTCPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSTCPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSTCPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSTCPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSTCPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSTCPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSTCPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSTCPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSTCPERFTE) May,
    decode (MONTH, 'JUN-08', WCSTCPERFTE) Jun
    from t
    union all
    Select 'ADSL Orders per FTE' descr,
    decode (MONTH, 'METRICS', WCSADSLPERFTE) MET,
    decode (MONTH, 'JUL-08', WCSADSLPERFTE) Jul,
    decode (MONTH, 'AUG-08', WCSADSLPERFTE) Aug,
    decode (MONTH, 'SEP-08', WCSADSLPERFTE) Sep,
    decode (MONTH, 'OCT-08', WCSADSLPERFTE) Oct,
    decode (MONTH, 'NOV-08', WCSADSLPERFTE) Nov,
    decode (MONTH, 'DEC-08', WCSADSLPERFTE) Dec,
    decode (MONTH, 'JAN-08', WCSADSLPERFTE) Jan,
    decode (MONTH, 'FEB-08', WCSADSLPERFTE) Feb,
    decode (MONTH, 'MAR-08', WCSADSLPERFTE) Mar,
    decode (MONTH, 'APR-08', WCSADSLPERFTE) Apr,
    decode (MONTH, 'MAY-08', WCSADSLPERFTE) May,
    decode (MONTH, 'JUN-08', WCSADSLPERFTE) Jun
    from t
    GROUP by descr
    Frank

    Borg Species 5618 wrote:
    Having trouble passing multiple values to another page via a popup SQL report
    But when I want to pass another value, all goes bonkers and instead of the value of the field being passed the literal text is passed.
    can someone look at my code below and see what may be wrong
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    || descr, Met
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hi Frank,
    You should close this parameters with single quotation. Try this -
    Select '&lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:950:&SESSION.::&DEBUG.::'
    || 'P950_TYPE,P950_CODE:'
    *|| 'descr, Met'*
    || ''', 790, 460);"style="color:darkred; font-weight: bold;font-size: 90%"&gt;'
    || descr
    || '&lt;/a&gt;' "Note"
    Hope this helps.
    Regards,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • Passing multiple select value from BI publisher to PL/SQL functions

    Hi - I have designed a report which pass parameters (Multi select) into a function to get the output result. When a single parameter value is passed to the function, report is being displayed. When multi select value is passed to the function it is returning the error `wrong number or types of arguments in call to 'F_PROCESS_WAVE_DATA'. When i checked the parameters passed to the function, i can see each multi select value is treated as different value and is assigned to different parameter in the function.
    Any help on passing the multi select parameter into function will be helpful.
    Regards,
    Vikram.

    All - Issue was resolved. I followed the following steps to resolve the issue
    1. Create a PL/SQL table type variable as VARCHAR2 in the database - Say as Larray
    2. Create PL/SQL type record and table for the record in database. Lrec, Ltable
    3. In BI report pass multiple select LOV variable as Larray(variable).
    4. In DB function, Parameter should be defined as LARRAY.
    5. Return PL/SQL table type Ltable from the function.
    Regards,
    Vikram.

  • How do I pass multiple values from a text box to an update statement

    I hope this does not sound to lame. I am trying to update multiple values Like this:
    Code|| Computer Desc || Computer Price || Computer Name
    SEL1 || Apple macbook || 1564 || Apple Macbook Basic
    SEL2 || Dell 630 || 1470 || Dell Latitude
    I want to change all six values at once in one update statement based on the Code, I can't find a good tutorial/example to help me.
    Can anyone point me in the right direction?
    Thanks so much,
    Laura

    You can do conditional updates with decode or case statements e.g.
    SQL> create table t as
      2  select 'SEL1' as code, 'Apple macbook' as comp_desc, 1564 as comp_price, 'Apple Maxbook Basic' as comp_name from dual union
      3  select 'SEL2', 'Dell 630', 1470, 'Dell Latitude' from dual
      4  /
    Table created.
    SQL>
    SQL> update t
      2  set comp_desc = CASE code WHEN 'SEL1' THEN 'Test1' Else 'Test2' END,
      3      comp_price = CASE code WHEN 'SEL1' THEN 1234 Else 2345 END,
      4      comp_name = CASE code WHEN 'SEL1' THEN 'Test1 Name' Else 'Test2 Name' END
      5  /
    2 rows updated.
    SQL>
    SQL> select * from t
      2  /
    CODE COMP_DESC     COMP_PRICE COMP_NAME
    SEL1 Test1               1234 Test1 Name
    SEL2 Test2               2345 Test2 Name
    SQL>

  • How do I pass selected values from dynamic LOV to Command SQL in Oracle

    My environment:
    Crystal 11
    Oracle 10
    I've created and tuned a SQL script for a report.  In the Database Expert, I've copied the SQL into a Command.   I've modified the Command to create 3 parameters. 
    I need help with the following:
    1) How do I create a dynamic, cascading LOV and associated prompt group for the three parameters defined in the Command?
    2) How do I pass the user selected valueS from the prompt group into the Command SQL as limits applied to the query executed against the database?

    I have the same problem with same environment .
    The main report is having a  2 level cascading dynamic parameters.
    I created a sub report with a command as below.
    *select * from (*
    select DATUM,MSEC,CNT,B1_NAME,B2_NAME,B3_NAME,ELEM_NAME,INFO_NAME,m.INFOTYPE,V.NAME,rank()
    over (partition by B1_NAME,B2_NAME,B3_NAME order by DATUM desc ,MSEC desc,CNT desc) currentRank
    from MESSAGES m,INTYDE i,VANAME v
    where  DATUM <=SYSDATE  and trim(B1_NAME)='{?B1Name}'
    and trim(B2_NAME)='{?B2Name}'
    and m.INFOTYPE=i.INFOTYPE
    and i.VALUE_NAME_NUMBER = v.VALNUM) where currentRank=1
    I needs to pass cmbination of B1Name and B2Name from main report. I created a formula like
    formula=Join({?B1Name},{?B2Name}),'|');  But this is showing some error.
    and How I will substitute this in my command . As I new to Crystal XI  help expected.

  • Method to pass multiple values from jsp

    Hi All,
    There are multiple rows in the jsp form with each having a unique id.
    I want to update some fields in all the rows. Then pass all the data to the controller. From the controller all the data should go to the database one row at a time .How do i do this........
    Any help would be appreciated
    Thanks

    You can make use of ArrayList
    In CO
    OAApplicationModlue am = pageContext.getApplicationModule(webBean);
    ArrayList values = (ArrayList) am.invokeMethod("PassArray");In AM
    public ArrayList PassArray
    ArrayList values = new ArrayList();
    values.add("value")
    values.trimToSize();
    return values;
    }Thanks
    AJ

  • Passing Multiple values from jsp to servlet

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

  • Passing multiple values to a parmeters in Discoverer 4i

    Hi Friends,
    I have a requirement of passing multiple values (Operating Unit Names) to the parameter(P_Opr_Unit) in Discoverer.
    I am using PL/SQL function to get the data in Discoverer.Function is working fine for multiple values from Database(SQL Developer).
    When i am trying to pass multiple values from discoverer ...it is accepting only the first parameter value of Operating Unit.
    Need your Expertise on this issue.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi,
    You can only pass one parameter value into a function. When you have a multi-valued parameter it enables you to create the condition: item IN (:param) which Discoverer expands to the condition: item IN ('val1', 'val2', 'val3') where these are the values the user has picked from the list of values.
    Now if you have a calculation containing a function and a parameter: my_func(:param) then Discoverer has to map the parameter in the function an item in the worksheet. So if the param is from a multi-valued list it can only pass one value and so expands the calculation to my_func('val1') where val1 is the first item picked from the list.
    Rod West

  • I am facing a problem in passing multiple values as out parameters from fo

    Hi All,
    i am facing a problem in passing multiple values as out parameters from for loop.
    EX:
    i have a select statment inside a loop like.....
    PACKAGE SPEC:
    create or replace PACKAGE EMP_PKG AS
    TYPE TAB_NUM IS TABLE OF SCOTT.EMP.EMPNO%TYPE;
    TYPE TAB_NAME IS TABLE OF SCOTT.EMP.ENAME%TYPE;
    TYPE TAB_JOB IS TABLE OF SCOTT.EMP.JOB%TYPE;
    temp_table TAB_NUM;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB);
    END EMP_PKG;
    PACKAGE BODY:
    create or replace PACKAGE BODY EMP_PKG AS
    v_e_no NUMBER;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB) IS
    BEGIN
    select EMPNO bulk collect into temp_table from emp;
    for i in 1..temp_table.count loop
    v_e_no := temp_table(i);
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    end loop;
    end test;
    END EMP_PKG;
    PROBLEM FACING IS:
    I am expecting all rows returning from bellow select statment ...
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    But,while running the SP , i am getting error like
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at "SCOTT.EMP_PKG", line 16
    why i am not getting all values as out parameters.please provide a solution for me.
    Thanks in advance my friend.

    user9041629 wrote:
    Hi All,
    i am facing a problem in passing multiple values as out parameters from for loop.
    EX:
    i have a select statment inside a loop like.....
    PACKAGE SPEC:
    create or replace PACKAGE EMP_PKG AS
    TYPE TAB_NUM IS TABLE OF SCOTT.EMP.EMPNO%TYPE;
    TYPE TAB_NAME IS TABLE OF SCOTT.EMP.ENAME%TYPE;
    TYPE TAB_JOB IS TABLE OF SCOTT.EMP.JOB%TYPE;
    temp_table TAB_NUM;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB);
    END EMP_PKG;
    PACKAGE BODY:
    create or replace PACKAGE BODY EMP_PKG AS
    v_e_no NUMBER;
    procedure test(temp_TAB_e_no OUT TAB_NUM,
    temp_TAB_e_name OUT TAB_NAME,
    temp_TAB_e_job OUT TAB_JOB) IS
    BEGIN
    select EMPNO bulk collect into temp_table from emp;
    for i in 1..temp_table.count loop
    v_e_no := temp_table(i);
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    end loop;
    end test;
    END EMP_PKG;
    PROBLEM FACING IS:
    I am expecting all rows returning from bellow select statment ...
    select empno,
    ename,
    job
    into temp_TAB_e_no(i),
    temp_TAB_e_name(i),
    temp_TAB_e_job(i)
    from emp
    where empno = v_e_no;
    But,while running the SP , i am getting error like
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at "SCOTT.EMP_PKG", line 16
    why i am not getting all values as out parameters.please provide a solution for me.
    Thanks in advance my friend.Probably not a bad thing that this isn't working for you.
    This is a horrible way to return the contents of a table.
    Are you doing this for educational purpose, or ... what is your goal here? If you just want to return a result set to a client you'd want to look in to using a REF CURSOR and not a bunch of arrays combined with horribly procedural (slow) code.

  • How to Pass Multiple Value Range From Query ?

    Hi,
    I have searched over SDN to find about how do we pass multiple value ranges from Query to SAP ODATA?
    But I have not found suitable answers so I am posting it here.
    If we need to pass a date parameter in Query which has a multiple range like  sales orders created date between 03/02/2014 to 05/07/2014.
    How do we phrase it in Query ?
    I tried as below but the IT_FILTER_SELECT_OPTIONS of /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET does not get filled up with the parameters
    How do we pass multiple values in Query?
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and B_st_dt gt datetime'2015-02-01T00:00:00' and B_st_dt lt datetime'2015-02-28T00:00:00'
    Thanks in Advance.
    KC.

    Hi,
    I Have Found solution to the Query posted above.
    Please find the URL's below for more clarifications.
    Revert for any suggestions please.
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and ( B_st_dt ge (datetime'2015-02-01T00:00:00') or  B_st_dt le (datetime'2015-02-27T00:00:00'))
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and ( B_st_dt ge (datetime'2015-02-01T00:00:00') and  B_st_dt le (datetime'2015-02-27T00:00:00'))
    Thanks KC.

  • Selecting multiple values from a search help

    Hi Experts
    Anyone knows if it is possible to select multiple values from a search help?
    Thanks
    Gaurav

    Hi,
    You cannot select mutiple values from search help as it is linked to inputfield and hence it will accept single value only. But at the same time, you may able to pass row of values to different inputfields.
    Refer http://help.sap.com/saphelp_dm40/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm
    Thanks,
    Chandra

Maybe you are looking for

  • How do i look at my photo stream on osx 10.6

    Jsut wondering if i could look at my photo stream using osx 10.6 and iphoto '09

  • Solaris upgrade from 2.8 to 10

    Hi We are starting with the upgrade project soon, and it involves several phases. The first is to upgrade the operating system from Solaris 2.8 to Solaris 10. I have searched the support portal for an upgrade guide for this process and have found not

  • Unwanted characters are printed at line start and line end in Smartforms

    Hi All, When we print a document on Dot matrix server printer, there are lot junk characters are printed. But we print the same on the Dotmatrix locl printer, the print seems to be very prefect. Could any one help us to over this problem. Advance tha

  • Client isolation - Apple Airplay

    hello there! Wonder if you guys can help me? Currently running 7.4 on WLC 5508. Wireless is working perfectly one one subnet and SSID throughout the building. However, how can I enable client isolation? I have enabled P2P Blocking action = Drop But w

  • How to keep the format on IBR?

    when I create the rendition with the image magick. The extParameters is <ïnFile$> <$ImageMagick_DefaultSet_Thumbnail$> "<$outFile$>.jpg" The extension of the out file is hard code. I only want to resize the image and does not change the format. How t