Cursor-pasing multiple values as a cursor parameter

declare
credit_amount number:=0;
debit_amount number:=0;
v1 number:=0;
v2 number:=0;
v3 varchar2(500);
v4 varchar2(500);
v5 varchar2(240);
v6 varchar2(240);
v7 number;
v8 varchar2(240);
v9 varchar2(240);
v10 number;
v11 number;
v12 varchar2(240);
v13 varchar2(240);
v14 varchar2(240);
v15 number;
v16 number;
--This cursor is for liability records which are in GL not in AP
cursor c1(p_header_id number,p_reference_2 varchar2,p_reference_4 varchar2)
is
(select
jl.je_header_id "JE_HEADER_ID"
,jl.period_name "PERIOD"
,glcc.concatenated_segments "ACCOUNT_CODE"
,DECODE(jl.accounted_dr,null,0,jl.accounted_dr)"ACCOUNTED_DEBIT"
,DECODE(jl.accounted_cr,null,0,jl.accounted_cr) "ACCOUNTED_CREDIT"
,DECODE(jl.accounted_dr,null,0,jl.accounted_dr) - DECODE(jl.accounted_cr,null,0,jl.accounted_cr) "NET"
,glcc.CODE_COMBINATION_ID "CODE_COMBINATION_ID"
,jl.SET_OF_BOOKS_ID "SET_OF_BOOKS_ID"
,jl.PERIOD_NAME "PERIOD_NAME"
,DECODE(Jl.entered_dr,null,0,Jl.entered_dr)"ENTERED_DEBIT"
,DECODE(Jl.entered_cr,null,0,Jl.entered_cr) "ENTERED_CREDIT"
,jl.reference_1 "SUPPLIER"
,jl.reference_2 "INVOICE_ID"
,jl.reference_3 "CHECK_ID"
,jl.reference_4 "CHECK_NUMBER"
,jl.reference_5 "INVOICE_NUM"
,jl.reference_6 "'AP_PAYMT_JUST_INSERTED'"
,jl.reference_7 "set_of_books_id"
,jl.GL_SL_LINK_ID "GL_SL_LINK_ID"
,jl.REFERENCE_8 "INVOICE_DIST_LINE_NUMBER"
,jl.reference_9 "INVOICE_PAYMENT_ID"
,jl.REFERENCE_10 "LIABILITY"
,jl.TAX_CODE_ID "TAX_CODE_ID"
,jl.TAX_GROUP_ID "TAX_GROUP_ID"
FROM
gl_je_lines jl
, apps.gl_code_combinations_KFV glcc
, gl_je_headers jh
WHERE
jl.period_name='Mar-10'
and glcc. code_combination_id in (1016,1296,1298)
and jh.je_header_id = jl.je_header_id
AND glcc.code_combination_id = jl.code_combination_id
and jh.je_source = 'Payables'
AND jl.je_header_id = p_header_id
and jl.reference_2 = p_reference_2
and jl.reference_4 = p_reference_4
MINUS
select
ir.je_header_id
, h.period_name "APPERIOD"
,g.CONCATENATED_SEGMENTS "AP ACCOUNT CODE"
,DECODE(l.accounted_dr,null,0,l.accounted_dr) "AP ACCOUNTED_DR"
,DECODE(l.accounted_cr,null,0,l.accounted_cr) "AP ACCOUNTED_CR"
,DECODE(l.accounted_dr,null,0,l.accounted_dr) - DECODE(l.accounted_cr,null,0,l.accounted_cr) "NET"
,l.CODE_COMBINATION_ID "AP_CCID"
,h.set_of_books_id
,h.PERIOD_NAME "PERIOD_NAME"
,DECODE(l.entered_dr,null,0,l.entered_dr)"ENTERED_DEBIT"
,DECODE(l.entered_cr,null,0,l.entered_cr) "ENTERED_CREDIT"
,l.reference1 "SUPPLIER"
,l.reference2 "INVOICE_Id"
,l.reference3 "reference_3"
,l.reference4 "reference_4"
,l.reference5 "INVOICE_NUM"
,l.reference6 "reference_6"
,l.reference7 "reference_7"
,l.GL_SL_LINK_ID "GL_SL_LINK_ID"
,l.REFERENCE8 "REFERENCE_8"
,l.reference9 "reference_9"
,l.REFERENCE10 "REFERENCE_10"
,l.TAX_CODE_ID "TAX_CODE_ID"
,l.TAX_LINK_ID "TAX_LINK_ID"
from
ap_ae_lines_all l,
ap_ae_headers_all h,
gl_code_combinations_kfv g
,gl_import_references ir
where
ir.gl_sl_link_id=l.gl_sl_link_id
AND g.CODE_COMBINATION_ID = l.CODE_COMBINATION_ID
and h.ae_header_id = l.ae_header_id
AND h.period_name ='Mar-10'
AND g.CODE_COMBINATION_ID in (1016,1296,1298)
AND ir.JE_HEADER_ID = p_header_id
and l.reference2 = p_reference_2
and l.reference4 = p_reference_4);
--This cursor is for writeoff records
cursor c2
is
(select * from gl_je_lines
where period_name='Mar-10'
and reference_10='WRITEOFF'
and reference_2 in ('525706','525600'));
credit number:=0;
debit number:=0;
j varchar2(240);
i varchar2(4000):='0';
cursor c3 (p_invoice_id varchar2)
is
(select
jl.je_header_id "JE_HEADER_ID"
,jl.period_name "PERIOD"
,glcc.concatenated_segments "ACCOUNT_CODE"
,DECODE(jl.accounted_dr,null,0,jl.accounted_dr)"ACCOUNTED_DEBIT"
,DECODE(jl.accounted_cr,null,0,jl.accounted_cr) "ACCOUNTED_CREDIT"
,DECODE(jl.accounted_dr,null,0,jl.accounted_dr) - DECODE(jl.accounted_cr,null,0,jl.accounted_cr) "NET"
,glcc.CODE_COMBINATION_ID "CODE_COMBINATION_ID"
,jl.SET_OF_BOOKS_ID "SET_OF_BOOKS_ID"
,jl.PERIOD_NAME "PERIOD_NAME"
,DECODE(Jl.entered_dr,null,0,Jl.entered_dr)"ENTERED_DEBIT"
,DECODE(Jl.entered_cr,null,0,Jl.entered_cr) "ENTERED_CREDIT"
,jl.reference_1 "SUPPLIER"
,jl.reference_2 "INVOICE_ID"
,jl.reference_3 "CHECK_ID"
,jl.reference_4 "CHECK_NUMBER"
,jl.reference_5 "INVOICE_NUM"
,jl.reference_6 "'AP_PAYMT_JUST_INSERTED'"
,jl.reference_7 "set_of_books_id"
,jl.GL_SL_LINK_ID "GL_SL_LINK_ID"
,jl.REFERENCE_8 "INVOICE_DIST_LINE_NUMBER"
,jl.reference_9 "INVOICE_PAYMENT_ID"
,jl.REFERENCE_10 "LIABILITY"
,jl.TAX_CODE_ID "TAX_CODE_ID"
,jl.TAX_GROUP_ID "TAX_GROUP_ID"
FROM
gl_je_lines jl
, apps.gl_code_combinations_KFV glcc
, gl_je_headers jh
WHERE
jl.period_name='Mar-10'
and glcc. code_combination_id in (1016,1296,1298)
and jh.je_header_id = jl.je_header_id
AND glcc.code_combination_id = jl.code_combination_id
and jh.je_source = 'Payables'
and jl.reference_2 in (p_invoice_id)
MINUS
select
ir.je_header_id
, h.period_name "AP PERIOD"
,g.CONCATENATED_SEGMENTS "AP ACCOUNT CODE"
,DECODE(l.accounted_dr,null,0,l.accounted_dr) "AP ACCOUNTED_DR"
,DECODE(l.accounted_cr,null,0,l.accounted_cr) "AP ACCOUNTED_CR"
,DECODE(l.accounted_dr,null,0,l.accounted_dr) - DECODE(l.accounted_cr,null,0,l.accounted_cr) "NET"
,l.CODE_COMBINATION_ID "AP_CCID"
,h.set_of_books_id
,h.PERIOD_NAME "PERIOD_NAME"
,DECODE(l.entered_dr,null,0,l.entered_dr)"ENTERED_DEBIT"
,DECODE(l.entered_cr,null,0,l.entered_cr) "ENTERED_CREDIT"
,l.reference1 "SUPPLIER"
,l.reference2 "INVOICE_Id"
,l.reference3 "reference_3"
,l.reference4 "reference_4"
,l.reference5 "INVOICE_NUM"
,l.reference6 "reference_6"
,l.reference7 "reference_7"
,l.GL_SL_LINK_ID "GL_SL_LINK_ID"
,l.REFERENCE8 "REFERENCE_8"
,l.reference9 "reference_9"
,l.REFERENCE10 "REFERENCE_10"
,l.TAX_CODE_ID "TAX_CODE_ID"
,l.TAX_LINK_ID "TAX_LINK_ID"
from
ap_ae_lines_all l,
ap_ae_headers_all h,
gl_code_combinations_kfv g
,gl_import_references ir
where
ir.gl_sl_link_id=l.gl_sl_link_id
AND g.CODE_COMBINATION_ID = l.CODE_COMBINATION_ID
and h.ae_header_id = l.ae_header_id
AND h.period_name ='Mar-10'
AND g.CODE_COMBINATION_ID in (1016,1296,1298)
and l.reference2 in (p_invoice_id)); --here if i put l.reference2  in (p_invoice_id)) it must show the details of
-- of all.but it doesnot display sir
--here if i put l.reference2 not in (p_invoice_id)) it shows that id also sir
BEGIN
for writeoff_rec in c2
LOOP
FOR Main_cur in c1(writeoff_rec.je_header_id,writeoff_rec.reference_2,writeoff_rec.reference_4)
LOOP
j:='0';
IF writeoff_rec.accounted_dr is not null AND Main_cur.ACCOUNTED_CREDIT<>0
THEN
v10:=Main_cur.ACCOUNTED_CREDIT;
credit_amount:= credit_amount+Main_cur.ACCOUNTED_CREDIT;
ELSIF writeoff_rec.accounted_cr is not null AND Main_cur.ACCOUNTED_DEBIT<>0
THEN
v11:=Main_cur.ACCOUNTED_DEBIT;
debit_amount:= debit_amount+Main_cur.ACCOUNTED_DEBIT;
END IF;
if c1%found then
j:=Main_cur.INVOICE_ID;
end if;
END LOOP;
-- i:=i||','||j;
i:= i||','''||j||'''';
END LOOP;
dbms_output.put_line(i); --Here i got all invoiceids of varchar2 records without single qutations
--its look like '0','23232','2324234' etc.
for cash_clearing_cur in c3(i)--Here is the problem ..is it correct way here i am passing parameter to cursor
loop
v3:=0;
v4:=0;
v5:=0;
v6:=0;
v7:=0;
v8:=0;
v9:=0;
v10:=0;
v11:=0;
v12:=0;
v13:=0;
v14:=0;
v15:=0;
v16:=0;
credit:=credit+cash_clearing_cur.ACCOUNTED_CREDIT;
debit:=debit+cash_clearing_cur.ACCOUNTED_DEBIT;
v3:=cash_clearing_cur.JE_HEADER_ID;
v4:=cash_clearing_cur.INVOICE_ID;
v5:=cash_clearing_cur.CHECK_NUMBER;
v6:=cash_clearing_cur.LIABILITY;
v7:=cash_clearing_cur.CODE_COMBINATION_ID;
v8:=cash_clearing_cur.PERIOD;
v9:=cash_clearing_cur.ACCOUNT_CODE;
v10:=cash_clearing_cur.ACCOUNTED_CREDIT;
v11:=cash_clearing_cur.ACCOUNTED_DEBIT;
v12:=cash_clearing_cur.SUPPLIER;
v13:=cash_clearing_cur.CHECK_ID;
v14:=cash_clearing_cur.INVOICE_NUM;
v15:=cash_clearing_cur.GL_SL_LINK_ID;
v16:=cash_clearing_cur.SET_OF_BOOKS_ID;
DBMS_OUTPUT.PUT_LINE('HEAd '||v3||','||'inv_id '||v4||','||
'chk_num '||v5||','||'ref10 '||v6||','||'CCID '||V7||','||'PED '||V8
||','||'acctcode '||v9||','||'acct_Ct '||V10
||','||'acct_Dt '||v11||','||'chk_id '||v13||','||'inv_num '||V14
||','||'link '||v15||','||'sob '||v16||','||'suplir '||V12);
end loop;
DBMS_OUTPUT.PUT_LINE( 'Dr Amt ' ||debit || 'Cr amt ' || credit );
EXCEPTION
when too_many_rows then
dbms_output.put_line('Invalid no of rows');
when no_data_found then
dbms_output.put_line('no data found exception');
when others then
dbms_output.put_line('Other than Invalid no of rows');
dbms_output.put_line(SQLERRM);
END;
ouutput was
0,0 that means cursor c3 is not compiled because i am passing multiple values in parametr .is there any solution

Whats wrong with your previous thread passing variable which has multiple values to cursor as parameter
Opening a new thread doesn't mean that you will get more responses. Did you carefully studied the hints given by Justin Cave ? I guess no, because you ignored the first point itself to format your code with tag.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to pass multiple values to a single parameter in BW report URL

    Hi Experts,
    I am new to EP and learning .... i am stuck at one point where we need to pass multiple parameters to a BW report URL, this is the URL that we launch from BSP.... Suppose i have to pass different multiple values to a single parameter, how to do it....
    i m getting many answers to pass parameters to iviews, reports, but not specific to my case.. can u plz help me....
    Thanks in advance
    Priya Rai

    What is the prolem you are facing if you split the single date param as two parameters say startdate and enddate?
    If you pass as single string then you might have to split the same at reciever end.
    Are you trying any thing specific?

  • 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

  • LRM-00112: multiple values not allowed for parameter 'query'

    Hello,
    I am getting below error while trying to execute below query...please help:
    exp username/password file=query.dmp log=query.log tables=schema_name.tablename query=\"where PRODUCT_KEY IN\'4541450,4541455,4541475,4541504,
    4541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008'/"
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully

    yeah i have tried using paranthesis as well...it has given below error then:
    exp schema/password file=query.dmp log=query.log tables=schema_name.table_name query="where PRODUCT_KEY IN (4541450,4541455,4541475,4541504,4
    541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008)"
    ./export.ksh: syntax error at line 1 : `(' unexpected

  • Passing single/multiple values to stored proc parameter from crystal report

    I tried below solution posted on this forum to pass either a single value or multi-value to a sql server stored procedure parameter (varchar datatype) from crystal report XI R2.
    In my crystal report , I am displaying all the available parameter values to the user  and the user will select either a single value or multi value.
    This worked when I select single value and when I say show sql query in my subreport  I see the following:
    {CALL "XYZ"."dbo"."storedprocedurename";1('Product  1')}
    But this did not worked when I selected multiple values and when I say show sql query in my subreport  I see the following:
    {CALL "XYZ"."dbo"."storedprocedurename";1('Product 1,Product 2')}
    I think it might work if it is as below:*
    For multiple values:
    {CALL "xyz"."dbo"."storedprocedurename";1('Product 1', 'Product 2')}
    Please advise.
    Solution Posted on this forum is as follows:
    Hi,
    As you must be aware of that a crystal report created of a stored procedure will allow only a single value for inserting a multiple value as a parameter in your report and pass those values to your stored procedure please follow the below work around which will be helpful for you.
    Symptom
    In Crystal Reports, you want to pass a multi-value parameter to a stored procedure. The problem with doing so is that Crystal Reports considers the multi-value parameter to be an array.
    How can you pass a multi-value parameter to a stored procedure?
    Resolution
    Here are the steps to pass a multi-value parameter to a stored procedure:
    1. Create a Crystal report, and add a multi-value parameter.
    2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
    //Formula: @JoinFormula
    Join ({?Multi-value parameter array},";")
    ====================
    NOTE:
    In the formula above, a semi-colon (";") is the delimiter.
    ====================
    3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
    4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
    Doing so passes a multi-value parameter to the stored procedure.
    Regards,
    Vinay

    Hi Vinay,
    First you need to make sure the stored procedure accepts multiple values in the fashion 'a','b','c'.
    Then, create this formula in the Main Report:
    numbervar i;
    stringvar s;
    for i:= 1 to ubound({?Parameter}) do
        s := s + "'" + {?Parameter}<i> + "'" + ",";
    left(s,len(s)-1);
    Link this formula to the sub-report's parameter.
    Hope this helps!
    -Abhilash

  • How to pass checkbox multiple value in URL as parameter?

    Hello,
    I have a checkbox in two page. The checkbox is based on a LOV and user can check more than one value at a time. The return value of the checkbox is like "ID1:ID2".
    I want to call another page with the same checkbox item and want to pass the checked value via the URL.
    This cause problem because checked value are separated with : that not work in URL.
    So, how can I pass checkbox multiple value in parameter via an URL?
    Thanks
    Jean

    Jean,
    Why pass it in a URL instead of just using what's in session state? On your second page, set the Source Type of the check box item to ITEM and enter the name of the check box item on the first page.
    Sergio

  • Multiple Values in the Return Parameter

    Hi,
    My application has a decision table , with material group, division fields and has agent as the return parameter.
    I need to maintain more than 1 user for each material group/division combination?
    I even tried using return parameter 'agent' as structure and table too.
    Can I maintain multiple entries. I don't want to maintain multiple rows for multiple agents.
    Is this feasible? If yes, how can I do it?
    Regards,
    Hiranmayi
    Edited by: Hiranmayi Praturi on Dec 8, 2010 7:32 AM

    Thank you Carsten . I did as you suggested. But in the 2nd decision table (result decision table) , it gives me an error saying it has no condition columns.
    Does this have anything to do with the SP , we have SAP_BASIS 701    .
    PS: Your blogs and pdfs have been great help to learn BRFPlus. Thank you.

  • LRM-00112: multiple values not allowed for parameter 'control' - SQL Loader

    Hi,
    Please can someone help me identify why the below SQL* Loader test doesn't work and i get the error in the subject header?
    ctl file (load.ctl)
    load data
    infile 'C:\Documents and Settings\My Documents\loader\TEST.csv'
    into table XXCPP.SQL_LOADER_TEST
    fields terminated by "," optionally enclosed by '"'
    ( PERSON_ID, EMP_NAME, EMP_NUMBER )
    command line prompt
    sqlldr thompsos/generate control='C:\Documents and Settings\My Documents\loader\load.ctl' log='C:\Documents and Settings\My Documents\loader\load.log'
    I'm obviously missing a key piece of code, but can't locate it?
    Many Thanks

    Thanks, unforunately it's still the same. What i have done is move the file to the c drive rather than using a location which has spaces on it.
    I no longer have the same issue as before, but Now i get a different message that would imply my directory isn't correct. I've double checked and everthing seems in order and files are where i've selected.
    Error:
    sqlldr thompsos/generate control='C:\loader\load.ctl' log='C:\loader\load.log'
    SQL*Loader: Release 8.0.6.3.0 - Production on Wed Jan 12 13:31:50 2011
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    SQL*Loader-500: Unable to open file (C:loaderload.ctl)
    Linux Error: 2: No such file or directory
    ctl file (load.ctl)
    load data
    infile 'C:\loader\TEST.csv'
    into table XXCPP.SQL_LOADER_TEST
    fields terminated by "," optionally enclosed by '"'
    ( PERSON_ID, EMP_NAME, EMP_NUMBER )
    Command Line
    sqlldr thompsos/generate control='C:\loader\load.ctl' log='C:\loader\load.log'

  • Passing multiple values to a single input parameter

    Hi folks,
    I have a Microstrategy query successfully passing input parameter to a calculation view.  For example I can pass a movement type to a material movements calculation view input parameter.  However if I try to pick more than one movement type the query then fails; 
    Generated SQL that works looks like this;
    select
    sum(a11.TOTALQUANTITY)  WJXBFS1
    from
    "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', '101')
    a11
    When choosing more than one value in Microstrategy the SQL now fails and looks like this;
    select
    sum(a11.TOTALQUANTITY)  WJXBFS1
    from
    "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', '101'),
    'PLACEHOLDER' = ('$$MoveType$$', '103'))
    a11
    If I cut and paste the SQL and run directly in HANA studio the error is;
    Could not execute 'select sum(a11.TOTALQUANTITY) WJXBFS1 from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER" ...' in 66 ms 361 µs .
    SAP DBTech JDBC: [2048]: column store error: search parameter error:  [2018] A received argument has an invalid value;TABLE/VIEW parameter: ( 'PLACEHOLDER'='$$MoveType$$, 103') not supported
    Is it possible to pass multiple values in a single parameter?  I'm using SP67 for this test.
    Thanks,
    -Patrick

    Ravi, also to answer one of your questions about how this will work in Microstrategy; I just heard back from my Microstrategy developer and he is trying MSTR Freeform SQL query with syntax like this;
    select (sumPAR_TEST.TOTALQUANTITY TOTALQUANTITY
    from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' =('$$MoveType$$', '[Movement Type]')) PAR_TEST
    In this example [Movement Type] is the microstrategy prompt.  Unfortunately though it translates like this which is missing extra single quotes around each value;
    select     sum(PAR_TEST.TOTALQUANTITY)  TOTALQUANTITY
    from     "_SYS_BIC"."development.pr1959/CA_TEST_PASS_PARAMETER"
    ('PLACEHOLDER' = ('$$MoveType$$', ''101', '102''))   PAR_TEST
    instead of what we need which is;
    ('PLACEHOLDER' = ('$$MoveType$$', '''101'', ''102'''))   PAR_TEST
    So at this point we are not sure if this will be possible or not.
    -Patrick

  • How to Display values in order when Multiple values are selected in the Parameter List

    <p>Hi</p><p>I have a report which runs on the parameter(SalesPersonName) selected.<br />Report has a group section where for each SalesPersonName we have different actions(Lead,Prospect,Active and so on) he had performed which is the basis for the group.</p><p>Now if i need multiple Value selection in the parameter,which i am able to acheive but the order in which it gets printed is not the right one.</p><p>I want intially all the actions performed by one sales person printed and then the second one should start.</p><p>Can any one help me in this aspect.</p><p>Thanks in advance</p>

    <p>If I understand your report structure correctly - you have one Grouping on Actions.  So could you not add another grouping on SalesPersonName above the Actions grouping that you currently have?</p><p>So the new structure would be:</p><p>G1 - SalesPersonName</p><p>G2 - Actions (current grouping you have)</p><p> </p><p>Whether or not you suppress or don&#39;t suppress the new grouping is your choice, but it will then force the ordering that you are asking about (assuming I understood) </p>

  • Passing multiple values in a parameter through IN operator

    hello everyone,
    i want to know wheather it is possible to pass multiple values to a report parameter and use the parameter in the query with the IN operator.
    I feel this should be possible but dont know the way.
    Pls help

    i have also suffered from this problem. you can solve it by creating a table like
    create table abc
    id number,
    value number;
    then follow the steps.
    1) insert all the values in this table by incrementing id and values
    2) then pass lowest id and larget id to the report
    3) now in report use the select statement like
    SELECT * FROM AAA WHERE ABC IN (SELECT VALUE FROM ABC WHERE ID BETWEEN V_MAX AND V_MIN)
    4) IN THE REPORT'S AFTER TRIGGER, YOU HAVE TO DELETE
    THESE TEMPORARILY CREATED ROWS
    LIKE
    DELETE ABC
    WHERE ID BETWEEN V_MAX AND V_MIN;
    SO THIS WILL SOLVE YOUR PROBLEM.

  • 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

  • Passing multiple values for a single field in URL to call sap Transaction

    Hi All,
    I need to pass multiple values for a single field to SAP transaction .
    means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
    Let me know pls.
    Regards,
    Sirisha.R.S.

    Hi Satyajit,
    I need to call a transaction with multiple values which gives me the report based on those values.
    So I need to pass multiple values for a single parameter.
    I hope u got it.
    Regards,
    Sirisha.R.S.

  • Cast error message when discovering ref cursor parameter from stored proced

    We are today using Microsoft's Oracle provider with some code from the old Data Application Block (from MSDN) to discover parameters from the stored procedures. This code uses the OracleCommandBuilder.DeriveParameters to get the parameters from the stored procedure and command.Parameters.CopyTo copies the discovered parameters into the command object.
    If I test with a simple function returning a ref cursor I get one parameter with type refCursor and ParameterDirection.OutPut. This is working fine as long we where using Microsoft's Oracle provider. But using Oracle ODP .NET I get the following error message on datadapter.Fill (I fill a dataset with the result from the reference cursor)
    Unable to cast object of Type 'Oracle.DataAccess.Client.OracleDataReader' to type 'Oracle.DataAccess.Types.OracleRefCursor.
    If I create a ref parameter manualy like this:
    OracleParameter myrefCursor = new OracleParameter();
    myrefCursor .OracleDbType = OracleDbType.RefCursor;
    myrefCursor .ParameterName = "myParameterName";
    myrefCursor .Direction = ParameterDirection.ReturnValue;
    and add it to the command object this is working OK. So it seems to be a problem with discovering ref cursor parameters from the database, other parameter types is OK.. I have compared the properties of my manual ref cursor parameter with the one discovered from the stored procedure, but I cannot see any difference. (I see the Value property has some values for the discovered one, but I have set this to DBNull.Value without any result)
    Any ideas why I get this error code? Is there any other code blocks I can use to discover the parameters? We send in params object[] with the different values into the helper class and the value is added to the parameter. (Se I don't need to set the data type etc for each parameter, I just need to have the correct order of the parameters)

    For accuracy's sake, just wanted to let everyone know that this is actually a bug. The correct bug number is 8423178.
    Christian
    Mark_Williams wrote:
    Just to follow-up on this issue...
    The bug has been closed as "not a bug" as it seems undocumented behavior was relied upon for this to work in earlier releases.
    Note from the documentation on DeriveParameters:
    "The output values of derived parameters return as .NET Types by default. To obtain output parameters as provider types, the OracleDbType property of the parameter must be set explicitly by the application to override this default behavior. One quick way to do this is to set the OracleDbType to itself for all output parameters that should be returned as provider types." (emphasis added)
    The issue, as you might already know, is that there is no corresponding .NET Framework Type for an Oracle Ref Cursor and the type is, therefore, set to Object. So, explicitly setting the type to OracleDbType.RefCursor should work.
    Regards,
    Mark

  • Printing report that has a parameter with multiple values crashes jvm

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

Maybe you are looking for