WITH clause in a stored procedure

Hi, i have the following code for a stored procedure:
create or replace
PROCEDURE DISP_ORDER
( param1 IN VARCHAR2
, param2 OUT Types.cursor_type
) AS
BEGIN
WITH itemall as (select * from rep_order)
open param2 for select * from itemall;
END DISP_ORDER;
this produce an error
PL/SQL:SQL statement ignored
Question: Is the WITH clause not allowed in stored procedure?
Thanks
PS: cursor_type is defined, the code is only a example!

WITH comes after the OPEN
SQL> var c refcursor
SQL> begin
  2      open :c for
  3          with test_data as
  4              (
  5              select 1 n from dual union all
  6              select 2 n from dual union all
  7              select 3 n from dual
  8              )
  9          select * from test_data;
10  end;
11  /
PL/SQL procedure successfully completed.
SQL> print c
         N
         1
         2
         3
SQL>

Similar Messages

  • With clause in a stored procedure with update

    create table TEMP_STAGE as
    (select '111111' student_id, 'N' TMP_TEST FROM DUAL
    UNION
    select '111111' student_id, 'N' TMP_TEST FROM DUAL
    UNION
    select '222222' student_id, 'N' TMP_TEST FROM DUAL
    CREATE OR REPLACE PROCEDURE TEMP_SEC_TEST
    AS
    BEGIN
    UPDATE TEMP_STAGE S
    SET S.TMP_TEST = 'Y'
    WHERE STUDENT_ID IN
    WITH MARK AS
    SELECT '111111' STUDENT_ID FROM DUAL
    select STUDENT_ID from MARK
    END;
    I have a huge sql statement with several 'with' tables in the statement...It works if I execute it as a script but it does not work when I put it in a stored procedure.
    When I execute the above it gives me an error...
    Error Syntax Check (8:9)
    Found 'MARK' expecting .....
    It gives me an error at the wth Mark as line....
    I have to do it in the stored procedure as the statement is very complicated...
    Please help.

    What tool are you using to create the procedure? Error Syntax Check (8:9) is not an Oracle error, nor as far as I know from any Oracle product.
    It works just fine in sqlplus.
    SQL> CREATE procedure my_p AS
      2  BEGIN
      3     UPDATE t
      4     SET descr = 'Un'
      5     WHERE id IN (WITH tmp AS (
      6                     SELECT 1 x FROM dual)
      7                  SELECT x FROM tmp);
      8  END;
      9  /
    Procedure created.
    SQL> SELECT * FROM t;
            ID DESCR
             1 One
    SQL> exec my_p;
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t;
            ID DESCR
             1 UnJohn

  • Using an IN Clause in a Stored Procedure

    Hello All:
    I have come to the conclusion that my stored procedure is having a problem with the use of an IN clause using a parameterized query.
    I have in my Stored Procedure the following: AND oh.status_flag IN (p_OrderStatus)
    The p_OrderStatus will contain values along the lines of:
    1). p_OrderStatus = 'X'
    2). p_OrderStatus = 'X', 'S', 'W'
    In my .Net code, I am setting the parameter value as being:
    oCommand.Parameters.Add("p_OrderStatus", OracleDbType.Varchar2).Value = Status;
    However: this isn't working as something in the IN clause doesn't seem to work as I expected, but if I do the same query through a TORA window, it brings back values.
    What is causing this to stop working once I move it to a Stored Procedure and how do I fix it (either the .Net side or the Oracle Side, which I assume it would be something on the Oracle side of things).
    Any help is greatly appreciated
    Thanks
    Andy

    One way I've found to get around this is to have .net pass in a comma seperated list of values into the procedure, then have the procedure split it up into a table and use that in the IN. There's probably a better way to do it, but this works:
    create or replace
    TYPE "STRINGTABLETYPE" AS TABLE OF VARCHAR2(30);
    create or replace
    FUNCTION "FUNC_STR2STRTBL"
    ( p_str in varchar2 ) return
    stringTableType
    as
    l_str long default p_str || ',';
    l_n number;
    l_data stringTableType := stringTabletype();
    begin
    loop
    l_n := instr( l_str, ',' );
    exit when (nvl(l_n,0) = 0);
    l_data.extend;
    l_data( l_data.count ) := ltrim(rtrim(substr(l_str,1,l_n-1)));
    l_str := substr( l_str, l_n+1 );
    end loop;
    return l_data;
    end;
    Then in your actual query procedure, you can do something like this:
    SELECT * FROM table WHERE column IN (select * from THE (select cast(FUNC_STR2TBL(parameter) as STRINGTABLETYPE) from dual))

  • Problem with Update Select in Stored procedure

    I am using Oracle 8. I'm writing a StoredProcedure and Oracle doesn't like the statement:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + (select Rate_Monthly from Leave_coverages where Leave_Coverage_ID = 10800)
    where
    Leave_Coverage_ID = 10799;
    When I run the above statement from the command line - I have no problem. This statement in the stored procedure works:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + 4
    where
    Leave_Coverage_ID = 10799;
    So essentially, I'm having trouble using a select in an update statement, but only in a Stored Procedure.

    Denis,
    This question was answered on this forum in the last week or so but I wasn't quickly able to locate this post.
    Basically Oracle prior to version 9 had an SQL parser and a separate PL/SQL parser. The PL/SQL parser had to be updated each time new features were added to the SQL parser; often it lagged behind so that there were things you could do in plain SQL but weren't supported when using the same SQL in a cursor or directly in PL/SQL (with an INTO clause or RETURNING ... INTO clause).
    From Oracle 9 these two parsers have been rolled into one so that new features introduced into SQL automatically also become available when used from PL/SQL.
    So the answer to your curiousity on whether it will work in 9 or 10 is: if it works in SQL it should work just fine from PL/SQL.
    Cheerio,
    Colin

  • With JDBC, calling a stored procedure with ARRAY as out parameter

    Hi,
    I want to use the data type ARRAY as an out parameter in an Oracle stored procedure. I want to call the stored procedure from
    my java program using JDBC.
    The problem it's i use a 8.1.7 client to acces with oci to a 7.1.3 Database.
    With this configuration I can get back a Cursor but not an Array.
    Does it's possible ?
    Thanks for your help !
    Michakl

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • How to get all parameter names along with their values in stored procedure which is being executed

    Im using sql server 2012, is there any possible way to get all the parameters of a stored procedure along with the values passed to it.
    I need these things to build a xml. I mean this should happen in the procedure which being executed and it should be common for all the procedures.
    For example, let us suppose we have to procedures,
    uspSave, @name='test' @age=20
    uspDelete @id=2
    now in uspSave procedure, i need to get @name, @age and the values 'test', 20 and in uspDelete, i should get @id with value 2.
    For getting the column names, i tried this,
    select parameter_name from information_schema.PARAMETERS where specific_name=OBJECT_NAME(@@procid)
    now is it possible to loop through the result of above query and can we get the values.

    I think  you need running SQL Server Profiler to capture this info even in SQL Server 2012.
    Best Regards,Uri Dimant SQL Server MVP,http://sqlblog.com/blogs/uri_dimant/
    Blog : MS SQL Development and Optimization
    Blog : Large
    scale of database and cleansing

  • ORA-01031 with materialized view in stored procedure

    USER1 has created a materialized view (MV). The MV is owned by USER2. USER1 needs to query the MV from within a stored procedure. How do I avoid the ORA-01031?
    Here's the illustration:
    SQL> show user
    USER is "USER1"
    SQL> CREATE MATERIALIZED VIEW USER2.ROLL
    2 BUILD IMMEDIATE
    3 REFRESH COMPLETE WITH ROWID
    4 ON DEMAND
    5 AS
    6 select * from user2.test_roll;
    Materialized view created.
    SQL> select status,owner,object_name,object_type where OBJECT_TYPE='MATERIALIZED VIEW';
    STATUS OWNER OBJECT_NAME OBJECT_TYPE
    VALID USER2 ROLL MATERIALIZED VIEW
    SQL> select count(*) from user2.roll;
    COUNT(*)
    959485
    SQL> declare
    2 n number;
    3 begin
    4 select count(*)
    5 into n
    6 from user2.roll
    7 where rownum<100;
    8 dbms_output.put_line(n);
    9* end;
    SQL> /
    99
    PL/SQL procedure successfully completed.
    SQL> create procedure test_mv is
    2 n number;
    3 begin
    4 select count(*)
    5 into n
    6 from as400_snpsht.roll
    7 where rownum<100;
    8 dbms_output.put_line(n);
    9 end;
    10 /
    Warning: Procedure created with compilation errors.
    SQL> select text from user_errors where name like 'TEST_MV';
    TEXT
    PL/SQL: ORA-01031: insufficient privileges
    PL/SQL: SQL Statement ignored
    So the point is:
    * Ad hoc sql works on the MV
    * Anonymous pl/sql works on the MV
    * Stored procedure fails compilation with ora-01031
    Any suggestions are appreciated.

    Sorry; In may example 'as400_snpsht' should have been 'USER2' (the owner of the MV). I changed the real user names to USER1, USER2 to make the example clearer but missed that one.
    I meant to say...
    SQL> create procedure test_mv is
    2 n number;
    3 begin
    4 select count(*)
    5 into n
    6 from user2.roll
    7 where rownum<100;
    8 dbms_output.put_line(n);
    9 end;
    10 /
    Warning: Procedure created with compilation errors.
    SQL> select text from user_errors where name like 'TEST_MV';
    TEXT
    PL/SQL: ORA-01031: insufficient privileges
    PL/SQL: SQL Statement ignored

  • IE problem with img tag calling stored procedure

    I have an img tag in my JSP which looks like this (it has a very long src value):
    <img src="http://www.enetrix.com/cores/net_charts.display_temp_chart?vChartDef_in=ChartType%20=%20DIALCHART;Chart
    . . . and so on and so on . . .
    26,%2075.0);&vChartType_in=PNG&vChartURL_in=http://333.333.33.333/j2ee/servlet/chart"/>
    In short, the img calls a stored procedure and passes it a servlet among many other things. The procedure passes back an image to the browser.
    The image shows up in Firefox but not IE 7. I don't think its an issue with the stored procedure but I can't understand why IE doesn't show the image. Is there something I'm missing? I've tried both jpeg and png.
    Thanks
    Eric

    As the related posts suggest, you will need to use direct JDBC code for this.
    Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types.

  • DAC task with Informatica mapping and stored procedure (very slow)

    Hello,
    We have a DAC task that launch an Informatica Workflow with a simple query and stored procedure, like this:
    SQL QUERY
    ==========================
    SELECT
    W_ACTIVITY_F.ROW_WID,
    W_AGREE_D.AGREE_NUM,
    W_PRODUCT_D.ATTRIB_51,
    W_SRVREQ_D.ATTRIB_05,
    W_ORG_DH.TOP_LVL_NAME,
    W_ORG_D.ATTRIB_06,
    W_PRODUCT_GROUPS_D.PRODUCT_LINE,
    W_PRODUCT_D.PROD_NAME
    FROM
    W_AGREE_D,
    W_SRVREQ_F,
    W_ACTIVITY_F,
    W_PRODUCT_D LEFT OUTER JOIN W_PRODUCT_GROUPS_D ON W_PRODUCT_D.PR_PROD_LN = W_PRODUCT_GROUPS_D.PRODUCT_LINE,
    W_ORG_D,
    W_SRVREQ_D,
    W_ORG_DH
    WHERE
    W_SRVREQ_F.AGREEMENT_WID = W_AGREE_D.ROW_WID AND
    W_SRVREQ_F.SR_WID = W_ACTIVITY_F.SR_WID AND
    W_SRVREQ_F.PROD_WID = W_PRODUCT_D.ROW_WID AND
    W_SRVREQ_F.ACCNT_WID = W_ORG_D.ROW_WID AND
    W_SRVREQ_F.SR_WID = W_SRVREQ_D.ROW_WID AND
    W_ORG_D.ROW_WID = W_ORG_DH.ROW_WID
    STORED PROCEDURE
    ===========================
    ConvSubProy(W_AGREE_D.AGREE_NUM,
    W_PRODUCT_D.ATTRIB_51,
    W_SRVREQ_D.ATTRIB_05,
    W_ORG_DH.TOP_LVL_NAME,
    W_ORG_D.ATTRIB_06,
    W_PRODUCT_GROUPS_D.PRODUCT_LINE,
    W_PRODUCT_D.PROD_NAME)
    The mapping is very simple:
    Source Qualifier -> Stored procedure -> Update strategy (only two ports: ROW_WID and custom column) -> Target Table
    When I launch the DAC Execution Plan the corresponding task take much time (40 minuts). But when I launch the corresponding Workflow from Informatica PowerCenter Workflow Manager this only take 50 seconds... when I see the log session for the task I can see that much time is spent on the time of the updates. For example, when DAC is running the writer updates 10000 records every 6/7 minuts, but when Workflow Manager is running thw writer updates 10000 records every 8/9 seconds.
    So, what happens (in the DAC) to that so much time difference? Is there a way to reduce the execution time when the task is launched from DAC?
    Thanks
    Best Regards
    Benjamin Tey

    Have you tried using bulk load type?
    In Workflow Manager can you open the associated task, navigate to the mapping tab and seled the target table.
    What is the value for "Target load type" and which of the following boxes are checked: Insert, Update as Update, Update as Insert, Update else Insert, Delete?

  • Cursor with nested query in stored procedure problem

    Hello
    I'm trying to declare the folowing (example) cursor in a stored procedure in Oracle 8i:
    CURSOR RECORDS IS SELECT d.DUMMY, (SELECT dd.DUMMY FROM dual dd) FROM dual d;
    The nested part "(SELECT d.DUMMY FROM dual)" is not alowed, while the same query runs outside the stored procedure. Can someone explain why this is not alowed and how to solve the problem whitout rewriting the query?
    Tom

    When i run the same code in SQL plus:
    SQL> declare
    2 CURSOR RECORDS IS SELECT d.DUMMY, (SELECT dd.DUMMY FROM dual dd) FROM dual d;
    3 begin
    4 null;
    5 end;
    6 /
    CURSOR RECORDS IS SELECT d.DUMMY, (SELECT dd.DUMMY FROM dual dd) FROM dual d;
    FOUT in regel 2:
    .ORA-06550: line 2, column 36:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    ORA-06550: line 2, column 66:
    PLS-00103: Encountered the symbol "FROM" when expecting one of the following:
    ; return returning and or
    Different versions of Oracle?

  • OSB with database adapter using stored procedure

    Hi All,
    We have a following requirement, in OSB while using the DB adapter with stored procedure.
    1) the store procedure has custome datatype as inout parameter
    2) send reference cursor as input to stored procedure
    Can you please let me know how to do this.
    Thanks,
    Vinoth

    Please go through below links -
    Section "9.7 Stored Procedure and Function Support" of Tech Adapter user guide - http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10231/adptr_db.htm#CHDFBBCD
    http://blogs.oracle.com/middleware/2010/05/using_jca_adapter_with_osb_11113.html
    Regards,
    Anuj

  • Convert Informix "with resume" feature in stored procedures to Oracle PL/SQL

    I am trying to convert an Informix stored procedure with the "return value with resume"
    feature into Oracle PL/SQL.
    So far, all I have gathered is that I need to use packages and reference cursors.
    What is hazy is that how and when does this value get returned? Is it on the execution of the FETCH statement or do I need to specify a RETURN statement.
    If anybody has any ideas or better yet any
    concrete examples, please email me.
    Thank you.

    This is a small example of the use of ref cursor , for further details see the Oracle documentation
    PL/SQL User's Guide and Reference
    Release 8.1.6
    A77069-01 . The stored procedure converter for informix (downloadable from Oracle Technology Network) does not unfortunately cover this situation.
    Turloch
    create or replace PACKAGE BYROYALTYPkg AS
    TYPE RT1 IS RECORD (
    val MTG_VERSION.VERSION%TYPE
    TYPE RCT1 IS REF CURSOR RETURN RT1;
    PROCEDURE byroyalty(
    RC1 IN OUT BYROYALTYPkg.RCT1);
    END;
    create or replace PACKAGE BODY BYROYALTYPkg AS
    PROCEDURE byroyalty(
    RC1 IN OUT BYROYALTYPkg.RCT1)
    AS
    BEGIN
    OPEN RC1 FOR
    SELECT VERSION FROM MTG_VERSION;
    END byroyalty;
    END;

  • Help with use of Java Stored Procedures to invoke Java Code within Applicat

    Good afternoon everyone
    Our development team is looking for some assistance/validation of a design strategy we are deploying for a client. Let me first layout the environment and then the design issue at hand:
    Business User Workstation component: Oracle SQL*Developer 1.5.x
    Reporting Tool: Actuate e.Spreadsheet A10
    Application Web UI: J2EE application developed with Eclipse
    Application Scripting: Application has a scripting component whereby business users can write Oracle PL/SQL to perform many of the functions that are available in the Web UI, but can be batched up or repeated several times.
    Application Server WebLogic 9.2.3 (client constraint)
    Database Serve: Oracle 11g, Release 11.1.0.7
    Lots of other stuff included but irrelevant for this conversation.
    Here's the scenario in question:
    1.     Through the scripting solution, the application user must use PL/SQL to invoke functionality within the Web UI. All PL/SQL that the application user creates does not contain any SQL. Instead our security model mandates that “pre-defined” routines will perform all of the SQL operations against the database; the application user simply invokes the stored procedures of functions to perform activities in the database.
    2.     There is a component of the scripting application that facilitates the creation of reports. In our application, we are using Actuate’s e.Spreadsheet Engine to create the report and format the report based on a template. The template is provided as input, as well as other data items, into Actuate for processing. The net result is the report is created by the Actuate e.Spreadsheet engine in pdf format and then sent back to the user for distribution to other users in the company.
    3.     The Actuate e.Spreadsheet engine consists of one or more JAR files within the Application Server framework. The Web UI utilizes these JAR files as well to perform report generation and data manipulation activities. In the case of the reporting functionality, the pdf report that is generated by Actuate is returned into either the Web UI or into the scripting component for persistence in the database. The mechanism exists to create multi-step jobs that can create multiple reports in one run.
    4.     So to facilitate the above, we are creating one or more Java Stored Procedures that will mediate the communication between the PL/SQL the user’s create and the Java components that are required for business processing. PL/SQL will invoke one or more Java Stored Procedures. Then the Java Stored Procedures invoke Actuate e.Spreadsheet, generate the report, saves the report in the database and returns control back to the invoking procedure.
    So the question is: Is this a viable and correct use of Oracle Java Stored Procedures. What are the advantages/disadvantages of doing so? Any security issues or potholes that you can think of? Tuning issues for the JVMs? Any white papers that you can think of?
    For any Oracle employees that respond, material such as Oracle Whitepapers, etc. would be great.
    I can be contacted at (313) 227-4350 or at [email protected]
    Thanks in advance.

    So are you planning on loading the entire e.Spreadsheet engine into the database server's JVM?
    If so, I would expect that to work, but I expect that you'd have some performance issues. I'd expect that the process of building these PDFs is going to be relatively expensive. Tuning the database server's JVM tends to be rather more challenging than tuning JVM's in an app server.
    If not, I'm not sure how the Java stored procedure would invoke the e.Spreadsheet engine on the application server. It is possible to use Oracle AQ to send a JMS message, but I don't think you can use the standard J2EE JMS APIs-- I think you'd have to use Oracle's AQ interface.
    Justin

  • Weird behaviour with Variables of a Stored Procedure

    Hello All,
       I'm writing following stored procedure and it is failing with following error
    "Conversion failed when converting from a character string to uniqueidentifier"
     What's Happening?
      I've created
    Create Procedure usp_Sample
    AS
    Declare @Var Int
    Select @Var = Key From MyKeyTable Where Name = 'XYZ'
    Select * From BaseTable A
    LEFT JOIN JoinTable B
    ON A.UniqueIdentifierField = CONVERT(UNIQUEIDENTIFIER,B.VarcharField)
    AND B.Key = @Var
    GO
    Procedure got created and when you execute it you see the above error...
    If I remove the Variable and HardCode it with any value then it runs fine...
    Could someone tell me what is wrong with the variable here? (I Can't hardcode the Variable Value In the Proc).
    "BaseTable" has a field that is UniqueIdentifier and "JoinTable" has a NVARCHAR (1020) Field. But JoinTable has proper UniqueIdentifier data. 
    Let me know if you need anymore info...
    --Roger
    Unknown

    Could someone tell me what is wrong with the variable here? (I Can't hardcode the Variable Value In the Proc).
    You are making the mistake to assume that just because is no error message, nothing is wrong.
    Apparently there are values in the varchar column which are not GUIDs, so saying
       CONVERT(UNIQUEIDENTIFIER,B.VarcharField)
    is an accident waiting to happen. But it does not have to blow up, just like you don't have to crash when you drive on the wrong side of the road. If you are lucky, there are no cars there in that moment.
    There is no defined order in which operands are evaluated in SQL Server, and using a variable or a constant is very likely to give you diffeent query plan.
    If you are on SQL 2012, use try_convert instead which will return NULL if the value does not convert. But Naomi is probably right when she suggest that you should convert the GUID to string, given the structure of the query.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Crystal Report with Optional Parameters from Stored Procedure

    I have a client who created a Crystal Report. This report is linked to a Stored Procedure which allows for input on two criteria. Both of these critera are static values. However, the second of these parameters is setup to allow the user to enter up to 20 values. For example, the Stored Procedure needs the CARDCODE, and a set of DOCUMENTS. So the parameters/prompts would look like this...
    BP CardCode:
    Document1:
    Document2:
    Document3:
    ...etc...
    The report will just display basic document information for those documents that were entered.
    With 8.8, these parameters were changed to be REQUIRED.... not OPTIONAL. According to SAP note 1500777, this is a known bug and will be fixed in future versions. This note also states to change the criteria for the filter. However, when using a Stored Procedure, this does not appear to be an option, as the selection is defined by the data connection (and the parameters defined in the SP).
    Am I missing something? Is there a way to make the suggetion in the above note work with my Stored Procedure?
    Or, is there another way to make these parameters optional? (Do I need to change the SP?)
    Thanks!
    ~ terry.

    I have a client who created a Crystal Report. This report is linked to a Stored Procedure which allows for input on two criteria. Both of these critera are static values. However, the second of these parameters is setup to allow the user to enter up to 20 values. For example, the Stored Procedure needs the CARDCODE, and a set of DOCUMENTS. So the parameters/prompts would look like this...
    BP CardCode:
    Document1:
    Document2:
    Document3:
    ...etc...
    The report will just display basic document information for those documents that were entered.
    With 8.8, these parameters were changed to be REQUIRED.... not OPTIONAL. According to SAP note 1500777, this is a known bug and will be fixed in future versions. This note also states to change the criteria for the filter. However, when using a Stored Procedure, this does not appear to be an option, as the selection is defined by the data connection (and the parameters defined in the SP).
    Am I missing something? Is there a way to make the suggetion in the above note work with my Stored Procedure?
    Or, is there another way to make these parameters optional? (Do I need to change the SP?)
    Thanks!
    ~ terry.

Maybe you are looking for