List of Open SQL Function

Can anybody provide me a list of all the Open SQL Functions?
I know some of it like Minimum,Maximum,etc. but I'm looking for a complete list of it.

Hi
How to process strings check the below link
http://help.sap.com/saphelp_nw04/helpdata/en/79/c55479b3dc11d5993800508b6b8b11/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3357358411d1829f0000e829fbfe/frameset.htm
Regards
Pavan

Similar Messages

  • PL/SQL function returning a colon delimited list of headings

    Hello,
    Apex version 4.1.0.23. I am editing an existing classic report which has the column heading option set to 'PL/SQL function returning a colon delimited list of headings'. I have been looking for some time but I cannot find where this PL/SQL function is defined. Can any one point me to the right direction? I do not see anything in the documentation either.
    Thanks,
    Usman

    Hi Usman,
    I looked into this issue and found that there's some JavaScript code executed when opening the page with the PL/SQL headings option enabled, or when selecting that option after loading the page, and this JavaScript attempts to set a background color for the column heading fields. Since we only display attributes for up to 100 columns, this JavaScript fails once you have more than 100 columns.
    I would certainly agree with Tony that 60 or 100 columns are a bit much. But there should be some indication why something is not working, even if it's only a message stating that there's only a certain number of columns supported. So I'll log a bug to improve this in APEX 5.0.
    Thanks,
    Marc

  • How to use a select list value in a PL/SQL function body returning SQLquery

    Hi Friends,
    I have a select list P6_TEST with values 'nav' anf 'jyo'. I am trying to create a report using "SQL Query (PL/SQL
    function body returning SQL query)". In my report query can i check if P6_TEST='nav' and do something like the
    code shown below.How can i do that.
    DECLARE
    v_sql VARCHAR2(3000);
    BEGIN
    IF :P6_TEST = 'nav' THEN
    v_sql :=
    'SELECT
    * from department';
    ........................Thanks,
    Nav

    Nav:
    What you have should work. Give it a go. Post back if you run into issues.
    Varad

  • Multiple Select List looping thru PL/SQL function body returning SQL query

    Hi,
    I have a Multiple Select List. I want to loop through the values from the Select List and process them in a PL/SQL function body returning a SQL query. Currently, my code only returns the SQL SELECT results of one item in the select list. How do I change my code to make it return the results of all of the items in the select list? (I tested it and it is definitely picking up all the values in the select list).
    <b>
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s   VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
      FOR i in 1..selected_items.count LOOP
      s := TO_CHAR(selected_items(i));
    -- htp.p('First: '||s);
    -- htp.p('Second: '||:s);
    -- htp.p('Third: '||TO_CHAR(selected_items(i)));
      q:= 'SELECT  '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
      RETURN q;
      END LOOP;
    END;</b>
    Thank you,
    Laura

    Laura,
    First, I would be careful of introducing SQL Injection possibilities. Any time I see
    'Select ... ' || :P123_FOO || ' ... '
    I worry about sql injection. In your case you are converting :P50_SELECTED_INSTRUMENTS into selected_items and then selected_items into s. So when I see
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    I think, "I could use sql Injection and hack this."
    So, I would do some validation on :P50_SELECTED_INSTRUMENTS or some other method to avoid this.
    I'm not certain I understand your query. Do you really intend to allow the user to select the beginning of a string and then find all rows that start with that string? Or, do you just want to let them find when it matches the string. This is one way if you want to do matching:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(32767);
    q varchar2(32767);
    BEGIN
    -- Change the : separate string to be comma separated with quoted strings
    s := '''' || replace(:P50_SELECTED_INSTRUMENTS, ',', ''',''')|| '''' ;
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) in (' || s ||' ) '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    If you want to do something more like you originally stated, try this:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE 1=1 ';
    FOR i in 1..selected_items.count LOOP
    s := TO_CHAR(selected_items(i));
    q := q || ' and TO_CHAR(orig_geo_loc_sys) LIKE '''|| s ||'%'' ' ;
    END LOOP;
    q := q || ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    Hope this helps...
    Anton

  • Using HANA SQL Functions in select list of CDS Views

    Dear Expert,
    Kindly please let me know if we can use the HANA SQL Function (Ex: ADD_DAYS, SECONDS_BETWEEN) in the select list of CDS Views?
    If I create a CDS like below I get error that timestamp is not supported.
    For Example:
    @AbapCatalog.sqlViewName: 'ZMR_H_CA'
    @EndUserText.label: 'CAG A'
    define view viewname
    with parameters start_ts:abap.dec( 15, 0 ) , end_ts:abap.dec( 15, 0 )
    as select from table {
    key resource_key,
    TO_TIMESTAMP(begtstmp) as start_tmp,
    TO_TIMESTAMP(begtstmp) as end_tmp
    where
    (begtstmp > $parameters.start_ts or endtstmp > $parameters.start_ts )
    and
    (begtstmp < $parameters.end_ts or endtstmp < $parameters.end_ts )
    Thanks,
    Giri

    Hi Giri,
    the list of provided features can be found in the ABAP Language Documentation (F1 in the CDS View).
    As CDS in ABAP is abstracted from the database layer, the database features are not directly accessible. That means, you cannot use any HANA or MaxDB feature available. So the answer to your question is no. The reason for this is, that ABAP CDS views can be created on all SAP-supported databases, hence, we can only provide those features, supported by all databases.
    Having said this, there are some exception, e.g. the CDS views with input parameters, which are not supported by all databases. In these cases, you'd have to additionally use the utility class CL_ABAP_DBFEATURES (see http://scn.sap.com/community/abap/blog/2014/10/10/abap-news-for-740-sp08--abap-core-data-services-cds) for more details.
    Best,
      Jasmin

  • Pass a list of number values to a pl/sql function

    I would like to pass a list of number values to a pl/sql function where the list will be used in an IN clause. Ideally I would like to do the following:
    CREATE OR REPLACE FUNCTION ( dept_list in varchar2) is
    begin
    select ... where dept in (dept_list) ;
    usage: process_list ( '7730,7735,7740,7745') ;
    I can not find an example of doing this in pl/sql function but it seems feasible.
    Is there a way to do this?

    user12088323 wrote:
    I would like to pass a list of number values to a pl/sql function where the list will be used in an IN clause.
    usage: process_list ( '7730,7735,7740,7745') ;The first thing is you need an appropriate data type to store a list of numbers. A single character value that looks to you like a list of numbers, is not in fact a list of numbers but a single character value.
    This example uses the built in data type odcinumberlist in a procedure, you can do the same in function
    Re: Passing an array to an Oracle stored procedure
    If you have an old version of the database you may need to create your own type with the same definition of odcinumberlist.

  • SQL function column in drop down list's data provider's query

    Just wondering, if it is somehow possible to use SQL function column for drop down list through data provider.
    At the moment, I am using id column as return value and name as display value from this query through CachedRowSetDataProvider:
    SELECT ALL someTable.Id,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    However, I want to change display to use calculated column as display value, for example Name_PostalCode from below mentioned changed query:
    SELECT ALL someTable.Id,
    CONCAT(someTable.Name, ' - Pin Code: ',someTable.Postal_Code) Name_PostalCode ,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    But JSC doesn't seem to like this.
    Is it someway possible to achieve this?
    Thanks.

    >
    But JSC doesn't seem to like this. Can you explain more. When doesn't it like it, in the design view, in the query editor, when your run it? What is the error you are seeing?
    See http://blogs.sun.com/divas/entry/displaying_multiple_fields_in_a

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

  • Integration Kit for SAP - Open SQL access to tables. List incomplete.

    After we install the BO integration kit for SAP and CR 2008 we were able to connect to SAP and open SAP Data Dictionnary tables (Open SQL access).
    I have a problem however:
    when I display the list of available tables, the is not showing all the tables in the SAP system. I believe it stops at some point.
    I see all tables with low letters or starting with /BIC...
    I have custom tables with names ranging from ZR1 to ZR5.
    Of these I only see tables up to ZR2*.
    My guess is :
    either that the table list displayed is limited to a certain mumber of tables
    or that there are some authorisations issues to be solved to view all tables (but the same SAP User sees all tables in SE11)
    or there is a table related setting in the Data dictionnary that makes some tables visible by CR and other not
    Thanks in advance for any answer.
    Claudio Ciardelli

    correct - it stops at one point because showing you more than 30.000 tables doesn't really help. Right click on your connection (server entry), select the menu options, there is an entry called Table name like. in your case enter Z% and hit F5 for a refresh and you will only get tables shown starting with Z
    Ingo

  • How to find listing of modules which has used xyz PL/SQL function?

    Hi,
    How I can find the list of forms/reports which has used xyz pl/sql function?
    I want to delete a pl/sql function but before that I would like to
    make sure this function is not being used by any forms/report.
    Thanks for your help!!
    D

    There are many tools available for finding out the particular string across many forms in one shot.
    One such utility is forms apimaster.
    You can download it's 30 days free trial from the internet.

  • Open SQL (difference between 2 dates) - DATEDIFF function

    Hello Experts,
    In my DB I created a TABLE with a column "<b>GIORNO</b>" that contains dates (in format 'yyyy-mm-dd'). I need to get the difference between the current day and the most recent date inserted into the table.
    I'm using a Java DAO class to execute a query.
    My problem is that the function <b>DATEDIFF(a,b)</b> explained in help.sap.com (http://help.sap.com/saphelp_nw70/helpdata/en/d2/f61996bb5e11d2a97100a0c9449261/content.htm) is not accepted by my portal..
    I wrote a query that contains <b>DATEDIFF( MAX(GIORNO) , ? )</b> where '?' is the current date..
    And my system return to me the error message:
    <i>SQL syntax error: the token "(" was not expected here</i> (referring to the <u>dateDiff '('</u> )
    In some forum I found that someone uses <b>DATEDIFF(a,b, getdate())</b> but it still does not work.....
    Any suggestion??
    Best Regards

    Hi Andy,
    thanks for your fast answer..
    SYSDATE does not work because is an Oracle SQL function..
    Anyway I think that the problem is the DATEDIFF function that is not recognised (infact the error message says that it does not expect the '('...
    I show to you the error message using <b>DATEDIFF(MAX(GIORNO), SYSDATE)</b> :
    <i>HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=UTF-8
    Date: Wed, 26 Sep 2007 13:29:02 GMT
    Set-Cookie: <value is hidden>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement "<b>SELECT NOMESETTORE, DATEDIFF(MAX(GIORNO),SYSDATE) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>" contains the syntax error[s]: - <u>1:29 - SQL syntax error: the token "(" was not expected here</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>

  • How to distinguish built-in SQL functions of PL/SQL?

    I m having a hard time to figure out which functions are used ONLY in SQL statements and which are used in regular expr(ie, variable assignment,). Can anyone show me a list of each or perhaps a URL to look for?
    I have searched through either the developer's guide and reference but couldn't find any appropriate indication in one place that make it clear.
    For instance, I thought I can use CAST function in a variable assginment like the following:
    declare
    cursor myCur is SELECT Value_varchar2(1) FROM table WHERE id = 1;
    myRec myCur%ROWTYPE;
    var_a NUMBER(1);
    begin
    OPEN myCur;
    FETCH myCur INTO myRec;
    CLOSE myCur;
    var_a := CAST(myCur.Value_varchar2(1) AS NUMBER(1));
    DBMS_OUTPUT.PUT_LINE('var_a = ' || TO_CHAR(var_a));
    end;
    . It seems like CAST function can ONLY be used in SQL statement, but no doc so far states that?!
    Edited by: HappyJay on 2010/05/12 12:05

    Sorry to bother you, Bob!
    I think I might already found the list. Is it the following list?
    ---------------------- QUOTED FROM Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2)Part Number E10472-06
    SQL Functions in PL/SQL Expressions
    In PL/SQL expressions, you can use all SQL functions except:
    Aggregate functions (such as AVG and COUNT)
    Analytic functions (such as LAG and RATIO_TO_REPORT)
    Data mining functions (such as CLUSTER_ID and FEATURE_VALUE)
    Encoding and decoding functions (such as DECODE and DUMP)
    Model functions (such as ITERATION_NUMBER and PREVIOUS)
    Object reference functions (such as REF and VALUE)
    XML functions (such as APPENDCHILDXML and EXISTSNODE)
    These conversion functions:
    BIN_TO_NUM
    These miscellaneous functions:
    CUBE_TABLE
    DATAOBJ_TO_PARTITION
    LNNVL
    NVL2
    SYS_CONNECT_BY_PATH
    SYS_TYPEID
    WIDTH_BUCKET
    PL/SQL supports an overload of BITAND for which the arguments and result are BINARY_INTEGER.
    When used in a PL/SQL expression, the RAWTOHEX function accepts an argument of data type RAW and returns a VARCHAR2 value with the hexadecimal representation of bytes that comprise the value of the argument. Arguments of types other than RAW can be specified only if they can be implicitly converted to RAW. This conversion is possible for CHAR, VARCHAR2, and LONG values that are valid arguments of the HEXTORAW function, and for LONG RAW and BLOB values of up to 16380 bytes.
    ----------------------

  • Case insensitive search and "IN" Clause in Open SQL

    Hi,
    I have some doubts regarding Open SQL:
    - Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    - Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    I have checked the [Open SQL Grammer |http://help.sap.com/saphelp_nwce711/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm]also, but nothing found there.
    Thanks,
    Piyush
    P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.

    > I have some doubts regarding Open SQL:
    I believe that you've questions and not doubts...
    > - Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    Nope, there is nothing like that. By default all supported database use a bytewise equal operator - case insensitivness needs to be programmed by hand.
    E.G. using UPPER(x)/LOWER(x) functions.
    Be aware that this disables the possibilities of index usage.
    > - Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    Yes, there is a restriction and it differes between the different DBMS.
    Until recently you could have 2000 variables per statement with MaxDB.
    The current versions of DBSL and MaxDB Kernel now support up to 10000 variables per statement.
    Anyhow, in most cases, such a long in list can and should be avoided by using the FOR ALL ENTRIES construct. With this, the DBSL automatically splits the long IN list into smaller chunks and executes the statements several times.
    This is invisible to the ABAP report - it just gets the result set as usual.
    > P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.
    I guess in anyone of the DB forums is Ok.
    regards,
    Lars

  • Update VBKD table using open sql

    HI
    when i use BAPI_SALESORDER_CREATEFROMDAT2 to create SO!
    but some field i can't fill in BAPI_SALESORDER_CREATEFROMDAT2 of parameter. so i want update it using open SQL.
    so i want to use BAPI_SALESORDER_CREATEFROMDAT2 first. and next using
    open sql to update VBKD of field! VBKD-TRATY(Means-of-Transport Type)
    abap code:
       CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
      SALESDOCUMENTIN               =
            ORDER_HEADER_IN               = header
            ORDER_HEADER_INX              = headerx
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
         IMPORTING
           SALESDOCUMENT                 = saledocument
          TABLES
           RETURN                        = return
           ORDER_ITEMS_IN                = item
           ORDER_ITEMS_INX               = itemx
            ORDER_PARTNERS                = partner
      ORDER_SCHEDULES_IN            =
      ORDER_SCHEDULES_INX           =
           ORDER_CONDITIONS_IN           = condition
           ORDER_CONDITIONS_INX          = conditionx
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
    if sy-subrc = 0.
    update vbkd
    set TRATY = in_data-TRATY
    where vbeln = saledocument.
    if sy-subrc = 0.
      commit work.
    endif.
    endif.
    but i don't what affect if i use open sql to update sap VBKD table.
    who can help me to explain it!
    thank you!

    Hi,
       Try like thais
    *&      Form  SUB_READ_UPDATE_BSEG
          text
    FORM sub_read_update_bseg.
      IF NOT it_final[] IS INITIAL.
        LOOP AT it_final INTO wa_final.
          UPDATE bseg SET zuonr = wa_final-ccnum
                      WHERE bukrs EQ wa_final-bukrs
                      AND   belnr EQ wa_final-vbeln
                      AND   rfzei EQ wa_final-rfzei
                      AND   saknr NE ' '.
        ENDLOOP.
    *--Message data updated successfully
        MESSAGE i888 WITH text-002.
        LEAVE LIST-PROCESSING.
      ELSE.
    *--Message No data found
        MESSAGE i888 WITH text-003.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " SUB_READ_UPDATE_BSEG
    Regards,
    Prashant

  • 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

Maybe you are looking for

  • USPS  Click-N-Ship

    Hello, I am trying to figure out how to use the Post Office's Click-N-Ship to print labels for mailing packages. I have dowloaded Adobe Reader Ver 8.0.0. When I attemtp to print a label, I get a print dialogue box. Hit the print button and nothing ha

  • Installing Crystal Reports I get the following error "error applying t.....

    "error applying transforms. verify that the specified transform paths are valid" Installing on. Win Server 2003 SQL 2005 I had a trial version which I uninstalled last week and now can not  install.

  • How do you create a white fade to clear?

    I'm working in the first CS. I have an 8.5 x 11 box filled with a multi-colored blend (using the gradient tool). I want to draw a small thin white box over top of it that fades from 100% white to zero (clear). I cannot figure this one out. I know thi

  • How do I place a fixed image and show it between two pages like the Global on Page 3 (LOE)?

    How do I place a fixed image and show it between two pages like the Global on Page 3 (LOE)?

  • AS2 project

    Hi, I do have an assignemnt, deadline os tommorow 4pm. In this  assignment i should create interactive video in flash. I have choosen to  create game like Mortal Kombat. I have one video with 28 cue points. I  made buttons that take us to the right p