Owa_util.calendarprint

I am trying to create a simple calendar on my app home page. Thought this package would work fine for it but I keep getting the following error:
ORA-06550: line 1, column 40: PLS-00103: Encountered the symbol "DATE" when expecting one of the following: (
Debug:
1: begin
2: owa_util.calendarprint(inDate in date DEFAULT SYSDATE)
3: end;
Can anybody help or tell me what I am doing wrong?

I am having a similar problem. I keep getting a message that table or view is not found. Did you find a solution for your problem?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Chuck Salerno ():
owa_util.calendarprint()
Anybody ever get this function to work? I know the syntax as :
owa_util.calendarprint( 'Select trxdate, product from CalendarTranx Order By trxdate ', 'N' ); But it keeps returning a "Variable not in Select list" error ORA1006.
Any help would be greatly appreciated.
<HR></BLOCKQUOTE>
null

Similar Messages

  • Problems with the function owa_util.calendarprint

    Hi,
    I am trying to use the package owa_util.calendarprint but when I prove it not it shows nothing.
    The code that I use is:
    sys.owa_util.calendarprint('SELECT FEC_CALENDAR,COD_LOCALIZA FROM SA_FESTIVOS Order By fec_calendar ', 'N');
    It is necessary to do something more?
    Any help would be appreciated.
    Thanks you

    I think you need a third column in your query (click on link below for documentation):
    http://technet.oracle.com/doc/windows/was.301/admdoc/docs/cart/psutil.htm#431582

  • Ora-06502:pl/sql and ora-06512 at sys.owa_util errors

    Greetings -
    I have just installed APEX 2.2 in my 9.2.0.7 database and am going through the exercises in the "2 Day+ Application Express Developer's Guide." I was making good progress, until I got to Chapter 5, How to Control Form Layout. I created the script "ht_emp", as instructed. Everything in the script works, except for the "create or replace trigger bi_ht_emp" part. It fails with the following errors:
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", lone 328 ORA-06512: at "SYS.HTP", line 862 ORA-06512: at "SYS.HTP", line 977 ORA-06512: at "SYS.HTP", line 995 ORA-06512: at "FLOWS_020200.WWV_FLOW_SW_API", line 428 ORA-01003: no statement parsed. I have confirmed that nls_length_semantics = BYTE
    Any suggestions?
    Thanks in advance - Gail

    Scott -
    Here's the part of the script that chokes --
    CREATE OR REPLACE TRIGGER bi_ht_emp
    BEFORE INSERT ON ht_emp
    FOR EACH ROW
    BEGIN
    SELECT ht_emp_seq.nextval
    INTO :new.emp_id
    FROM DUAL;
    :new.rec_create_date := SYSDATE;
    END;
    Thanks fro helping -
    Gail

  • Error while setting Owa_Util.Mime_Header

    Hi.....
    I have to make code to download BLOB file from my custom table Oracle APEX.
    I am setting MIME Header using the following statement.
    owa_util.mime_header(nvl( v_mime,'application/octet'), FALSE );
    htp.p('Content-type: ' || v_mime);
    htp.p('Content-length: ' || v_length);
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    owa_util.http_header_close;
    I am using this code to download BLOB file from table.
    But i am getting following error:
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 354
    ORA-06512: at "SYS.OWA_UTIL", line 413
    ORA-06512: at line 10
    06502. 00000 - "PL/SQL: numeric or value error%s"
    Can anyone tell me how to come out of this error.
    I am not able to understand this error.
    Thanks in advance.
    Edited by: user639262 on Sep 4, 2008 11:06 AM

    tward wrote:
    I'm trying to use:
    owa_util.mime_header('application/vnd.ms-excel', FALSE)
    htp.p('Content-Disposition: filename="test.xls"');
    owa_util.http_header_close;
    htp.htmlopen;
    htp.bodyopen;
    htp.tableopen(cattributes=>'border="1" width="100%" align="CENTER"');
    htp.tablerowopen;--(cattributes => 'align="LEFT", bgcolor="LIGHTGRAY"');
    htp.tableheader(cattributes=>'width="10%"', cvalue => 'Header 1');
    htp.tableheader(cattributes=>'width="15%"', cvalue => 'Header 2');
    htp.tableheader(cattributes=>'width="20%"', cvalue => 'Header 3');
    htp.tableheader(cattributes=>'width="10%"', cvalue => 'Header 4');
    htp.tableheader(cattributes=>'width="20%"', cvalue => 'Header 5');
    htp.tableheader(cattributes=>'width="25%"', cvalue => 'Header 6');
    htp.tablerowclose;
    htp.tableclose;
    htp.bodyclose;
    htp.htmlclose;
    My understanding is that this will open the window to Open/Save/Cancel the output in Excel.....
    But for some reason, it simply displays in a browser window.....
    The first line in the windows is:
    Content-type: application/vnd.ms-excel Content-Disposition: filename="test.xls"
    followed by the HTML Table....
    Why will it not open in Excel for me?Something is not getting recognized properly.
    Try hard-coding the functionality you want into a static HTML document. Then work on using owa_util.mime_header or Like MichaelS suggested htp.p surrounded by any needed tags w/options to duplicate the working static document's functionality.

  • Owa_util.mime_header not working like it should

    I have written a PL/SQL procedure that functions as a report using htp and htf tags. I wish to give the user the option to display the report in MS Excel. In the procedure, I have the following line:
    OWA_UTIL.MIME_HEADER('application/vnd.ms-excel');
    This has worked fine for me on several previous occasions, but at this particular client all I get is an output of
    Content-type: application/vnd.ms-excel
    in the browser, without Excel being opened.
    Is there a server/DB/Portal setting that may be restricting Portal from sending this report to Excel? I'm using portal 9.0.2.6.18 on a Sun/Unix platform.

    I've been struggling with this too. I've ceated a test procedure which includes:
    htp.init;
    owa_util.mime_header('application/excel');
    htp.p('ID;ORACLE;N;E');
    htp.p('line 1 col 1');
    htp.p('line 1 col 2');
    htp.p('line 1 col 1');
    htp.p('line 2 col 2');
    but when I open it in Excel I get:
    "Error reading record 5"
    Can anyone suggest what I'm doing wrong?

  • ORA-06502/ORA-06512 at execution owa_util.mime_header

    Hi, APEX gurus!
    I try to write a procedure to display bfile contention /images/ into APEX page.
    I have a table :
    -TEMP_FLAGS (ID NUMBER(3) NOT NULL, NAME BFILE)
    - procedure display_country_flags_bfile
    display_country_flags_bfile (p_id NUMBER) is
    CURSOR c_flags(p_flag NUMBER) IS
    SELECT name
    FROM temp_flags_bfile
    WHERE id = p_flag;
    r_flags c_flags%ROWTYPE;
    v_bfile bfile;
    lgh_file number;
    v_dir_alias varchar2(256);
    v_filename varchar2(256);
    v_mime varchar2(255);
    begin
    open c_flags(p_id);
    fetch c_flags INTO r_flags;
    CLOSE c_flags;
    v_bfile := r_flags.name;
    dbms_lob.filegetname(v_bfile, v_dir_alias, v_filename);
    lgh_file := dbms_lob.getlength(v_bfile);
    Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    htp.p('Content-length: '||lgh_file);
    htp.p('Content-Disposition: attachment; filename="'||v_filename||'"');
    owa_util.http_header_close;
    wpg_docload.download_file(v_bfile);
    Dbms_Lob.Fileclose(v_bfile);
    end display_country_flags_bfile;
    If i execute directly in Toad i get error below:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 354
    ORA-06512: at "SYS.OWA_UTIL", line 413
    ORA-06512: at "STAT.DISPLAY_COUNTRY_FLAGS_BFILE", line 20
    ORA-06512: at line 1
    In Report attributes of APEX page, i use HTML expression to populate column value as call this procedure with appropriate parameter but image just not showing.
    I appreciate any help and opinion.
    P.S. I'm a newbie in APEX and have minimal experience.
    P.S.2 I forgot - Oracle 10g XE and APEX 2.1 built-in
    Thanks, Rado
    Edited by: user7637288 on 16-Dec-2008 05:12

    Thanks, rafix.
    But i'm using Oracle XE with storage limit /1GB/ and i don't want store any images in database. I prefer to use bfile type with link to files on OS level.
    By the way , just for tests, i try to use blobs on my own table with simular procedure, which throws the same error - with owa_util.mime_header. And think that the problem is related to owa_util package.
    My APEX version is 2.1 - built-in in Oracle XE, not 3.1

  • Owa_util.get_cgi_env( 'REMOTE_ADDR' ) fails with PLSQL numeric error

    APEX Listener 2.0.1
    APEX 4.2.2
    Oracle 11gR2
    Linux RHEL 6.3
    Glassfish 3.1.2
    =============
    After upgrading from APEX Listener 1.1.4 -> 2.0.1 the procedure owa_util.get_cgi_env( 'REMOTE_ADDR' ) fails to return the remote IP Address and instead I get the error
    ORA-06502: PL/SQL: numeric or value error
    Has something changed with the new APEX Listener 2.0.1?  Is there a configuration element in the config or web.xml file that has to be changed before deploying the APEX Listener to GlassFish?
    Thanks.

    Hi I cannot reproduce this issue, here's the test case I used, can you try this and report the output generated:
    create or replace procedure test_cgi as
    begin
    owa_util.print_cgi_env;
    htp.prn(owa_util.get_cgi_env( 'REMOTE_ADDR' ));
    end;
    grant execute on test_cgi to apex_public_user
    Then I invoke the above procedure as follows:
    http://localhost:8080/apex/<workspace-schema-name>.test_cgi
    where <workspace-schema-name> is the database schema that the APEX workspace is using.
    Which produces output like the following:
    host = localhost:8080
    user-agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Firefox/17.0
    accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    accept-language = en-US,en;q=0.5
    accept-encoding = gzip, deflate
    dnt = 1
    connection = keep-alive
    cookie = ORA_WWV_REMEMBER_UN=RESTEASY_ADMIN:resteasy; ORA_WWV_USER_61813546913094=461E06966F3D10A956FC84806D0CFF22
    APEX_LISTENER_VERSION = 2.0.3.199.09.35
    DAD_NAME =
    DOC_ACCESS_PATH =
    DOCUMENT_TABLE =
    GATEWAY_IVERSION = 3
    GATEWAY_INTERFACE = CGI/1.1
    HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_ENCODING = gzip, deflate
    HTTP_ACCEPT_LANGUAGE = en-US,en;q=0.5
    HTTP_ACCEPT_CHARSET =
    HTTP_IF_MODIFIED_SINCE =
    HTTP_IF_NONE_MATCH =
    HTTP_HOST = localhost:8080
    HTTP_ORACLE_ECID =
    HTTP_PORT = 8080
    HTTP_REFERER =
    HTTP_USER_AGENT = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Firefox/17.0
    PATH_ALIAS =
    PATH_INFO = /resteasy.test_cgi
    PLSQL_GATEWAY = WebDb
    QUERY_STRING =
    REMOTE_ADDR = 0:0:0:0:0:0:0:1
    REMOTE_USER = apex
    REQUEST_CHARSET = AL32UTF8
    REQUEST_IANA_CHARSET = UTF-8
    REQUEST_METHOD = GET
    REQUEST_PROTOCOL = http
    REQUEST_SCHEME = http
    SCRIPT_NAME = /apex
    SCRIPT_PREFIX =
    SERVER_NAME = localhost
    SERVER_PORT = 8080
    SERVER_PROTOCOL = HTTP/1.1
    SERVER_SOFTWARE = Mod-Apex
    WEB_AUTHENT_PREFIX =
    HTTP_COOKIE = ORA_WWV_REMEMBER_UN=RESTEASY_ADMIN:resteasy; ORA_WWV_USER_61813546913094=461E06966F3D10A956FC84806D0CFF22
    0:0:0:0:0:0:0:1

  • Reg. owa_util.ident_arr

    Hi Experts,
    I'm stuck up with a procedure where i need to pass multiple checkbox values. So, i'm using owa_util.ident_arr.
    But i'm not able to pass any default value for the same (required when 1st time loading the page).
    Please consider this a bit urgent.
    Help really appreciated.
    Best Regards,
    Ranit B.

    ranitB wrote:
    Hi Experts,
    I'm stuck up with a procedure where i need to pass multiple checkbox values. So, i'm using owa_util.ident_arr.
    But i'm not able to pass any default value for the same (required when 1st time loading the page).
    Please consider this a bit urgent.
    Help really appreciated.
    Best Regards,
    Ranit B.Urgent issues should be raised with Oracle Support. Urgent issues typically relate to commercially live systems, so posting urgent issues here is a breach of the terms of use of the forums...
    >
    You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle.
    >
    It is also considered very rude to expect the volunteers of these forums to ignore all other things they are doing or other posts they are answering to help you with your urgent issue, and it is also rude to all the other people posting questions to assume that your question is somehow more important than theirs.
    Read the FAQ: {message:id=9360002} especially point 2.
    Also, consider that SQL and PL/SQL does not have checkboxes, so your question isn't likely to be relevant to this particular forum, so read that FAQ and ensure you either a) provide sufficient information so that people can help you or b) post sufficient information in the correct forum.

  • Owa_util.ident_arr

    Does anyone know how to use this datatype? From what I understand, I use this to capture multiple selections from a drop list. That's all well and good, but is there any way to convert that into a string (delimited) that I can stick into a database column of type varchar2? Help! Please!

    You should define an empty variable for the package where you will use this type as a default and for the procedure that will read the array. The code should look something like this...
    create package test_package as
    empty_array owa_util.ident_arr;
    procedure read_proc (the_array owa_util.ident_arr default empty_array);
    procedure read_proc is
    end;
    To grab the data from the array you can then have the procedure perform a loop through the array and reads the values as follows:
    create procedure read_proc (the_array owa_util.ident_arr default empty_array) is
    begin
    for i in 1..the_array loop
    htp.p('Value at '&#0124; &#0124;i&#0124; &#0124;'= '&#0124; &#0124;the_array(i));
    end loop;
    (This is pretty much a high level example). Hope this helps,
    - Alex
    null

  • Unable to run procedure due to error in package OWA_UTIL

    Hi,
    I have written a nice PL/SQL procedure called 'send_notification'.. My procedure begins like this :
    create or replace
    procedure             send_notification
    is
    ws_id               number;
    l_body              clob;
    l_url               varchar2(256);
    l_cgi_var_name      varchar2(100) default 'SERVER_NAME'; 
    l_server_name       varchar2(2000) ;
    begin
    l_server_name := owa_util.get_cgi_env(l_cgi_var_name) ;
    The procedure is nicely compiled without errors. When I run the procedure "send_notification", I get these error messages :
    ORA-06502: PL/SQL : erreur numérique ou erreur sur une valeur
    ORA-06512: à "SYS.OWA_UTIL", ligne 356
    ORA-06512: à "SIVOA.SEND_NOTIFICATION", ligne 10
    ORA-06512: à ligne 2
    The lines 354-356 of the package OWA.UTIL shows this :
    function get_cgi_env(param_name in varchar2) return varchar2 is
    upper_param_name varchar2(2000) := upper(param_name);
    begin
    I have successfully compiled the package OWA_UTIL.
    Thank you for your kind help.
    Christian

    Thierry,
    Your solution is working nicely.
    create or replace
    procedure                   send_notification
    is
    ws_id               number;
    l_body              clob;
    l_url               varchar2(256);
    l_cgi_var_name      varchar2(100) default 'SERVER_NAME'; 
    l_server_name       varchar2(2000) ;
    nm owa.vc_arr;
    vl owa.vc_arr;
    begin
    nm(1) := 'X';
    vl(1) := 'Y';
    owa.init_cgi_env( nm.count, nm, vl );
    l_server_name := owa_util.get_cgi_env(l_cgi_var_name) ;
    select max(workspace_id) into ws_id from apex_applications ;
    wwv_flow_api.set_security_group_id(ws_id);
    FOR C1 IN ( SELECT id, email, nature_contrat
                 from   contrats_maintenance
                 where  email is not null
                 and    alert = 1
                 and    DATE_ENVOI_PROCHAIN_MAIL <= SYSDATE
                 and    (email_sended IS NULL OR email_sended = 0)
    loop
          l_url := 'http://'||l_server_name||':7777/pls/apex/f?p=109:29:::NO::P29_ID:'||C1.ID ;     
          l_body := l_body ||chr(13)||'Bonjour,'||chr(13)||chr(13);
          l_body := l_body ||chr(13)||'Un contrat de maintenance arrivera à échéance -> '||l_url;
          l_body := l_body ||chr(13)||'Cliquez sur le lien pour y accéder.';
          l_body := l_body ||chr(13)||'Cordialement.'||chr(13)||chr(13);
          l_body := l_body ||chr(13)||'Le robot Oracle.';
          APEX_MAIL.SEND(
          P_TO       => c1.email,
          P_FROM     => '[email protected]',
          P_BODY     => l_body,
          P_SUBJ     => 'Notification d''échéance d''un contrat de maintenance : '|| c1.Nature_contrat );
          APEX_MAIL.PUSH_QUEUE;
          update contrats_maintenance
                 set    email_sended = 1, email_send_date = sysdate
                 where  ID = C1.ID;
      end loop;
    end send_notification;Thank you very much !
    Edited by: Christian on Jan 19, 2011 2:51 AM

  • Cannot Pass owa_util.ident_arr variable to function

    I have the following procedure using a cursor with a where clause that depends on a function. The function uses an owa_util.ident_arr type variable. For some reason the package fails to compile due to PLS-00382: Expression is of wrong type. If the function is stripped from the cursor and placed in the body of the package it will compile and execute as expected. Anyone have any ideas what I'm doing wrong?
    Compilation errors for PACKAGE BODY WSANDBOX
    Error: PLS-00382: expression is of wrong type
    Line: 86
    Text: WHERE f_ms_val(pv_select , my_table.column1) = 1;
    Error: PLS-00306: wrong number or types of arguments in call to 'F_MS_VAL'
    Line: 86
    Text: WHERE f_ms_val(pv_select , my_table.column1) = 1;
    Yada, yada, yada ...
    CREATE OR REPLACE PACKAGE wsandbox IS
    PROCEDURE p_print(pv_select IN owa_util.ident_arr);
    FUNCTION f_ms_val (pv_choice IN owa_util.ident_arr , pv_compare VARCHAR2) RETURN NUMBER;
    END wsandbox;
    CREATE OR REPLACE PACKAGE BODY wsandbox IS
    PROCEDURE p_print(pv_select IN owa_util.ident_arr) IS
    CURSOR c_rpt IS
    SELECT *
    FROM my_table
    WHERE f_ms_val(pv_select , my_table.column1) = 1; --<<<pv_select causes error
    lv_rpt c_rpt%ROWTYPE;
    BEGIN
    OPEN c_rpt;
    LOOP
    FETCH c_rpt
    INTO lv_rpt;
    EXIT WHEN c_rpt%NOTFOUND;
    htp.print(lv_rpt.column2);
    htp.nl;
    END LOOP;
    END p_print;
    FUNCTION f_ms_val (pv_choice IN owa_util.ident_arr , pv_compare VARCHAR2) RETURN NUMBER IS
    lv_result NUMBER;
    lv_select VARCHAR2(10000);
    BEGIN
    FOR i IN 1.. pv_choice.COUNT LOOP
    lv_select := lv_select || ' : ' || pv_choice(i);
    lv_result := instr( ' : ' || lv_select || ' : ',
    ' : ' || pv_compare || ' : ');
    IF lv_result > 0 THEN
    RETURN 1;
    END IF;
    END LOOP;
    RETURN 0;
    END f_ms_val;
    END wsandbox;

    owa_util.ident_array is defined as
    type ident_arr is table of varchar2(30) index by binary_integer;and as such a plsql array and as such not recognizable by the sql engine. You need to convert to a proper sql type (e.g. to sys.dbms_debug_vc2coll) to be utilizable by a select statement.

  • ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL"

    Was working on tutorial from the:
    Oracle Database Express Edition 2 Day Plus Application Express Developer Guide
    Working on the section 4: How to Control Form Layout.
    Ran into a problem trying to compile the Create HT-EMP Table script.
    keep getting this error for this particular segment creating the bu_ht_emp trigger:
    pp. 4-2 and 4-3
    CREATE OR REPLACE TRIGGER bi_ht_emp
    BEFORE INSERT ON ht_emp
    FOR EACH ROW
    BEGIN
    SELECT ht_emp_seq.nextval
    INTO :new.emp_id
    FROM DUAL;
    :new.rec_create_date := SYSDATE;
    END;
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 354....etc
    I've check the syntax for the entire script and it all checks out. Does anyone have a clue why this is failing?

    If I'm looking at the same DDL, not seeing where it would throw an owa_util error, are you running it in the apex script editor?
    Just plain sqlplus doesn't like the empty line stuck in with the list of check constraints on the emp_dept column, after fixing that up (and dropping the sequence that got created on the first pass) the DDL and insert runs fine-

  • Can you set username and password when using OWA_UTIL.REDIRECT_URL?

    If you have a PSP that runs under a DAD that includes username and password and therefore doesn't require users to log in and you want it to do OWA_UTIL.REDIRECT_URL to another PSP that runs under another DAD that normally requires login using basic database authentication and the first PSP already "knows" the user's username and password, is there any way to use them to skip the login dialog of the second page? Maybe hack into the request and use UTL_HTTP.SET_AUTHENTICATION somehow...?

    That doesn't seem to work, and trying that kind of url directly from the browser says "invalid syntax error", so maybe Oracle appserver just doesn't let you do that.
    I got the idea of trying to add an authorization header:
    OWA_UTIL.MIME_HEADER(BCLOSE_HEADER => FALSE);
    HTP.P( 'Authorization: Basic mybase64encodedcredentials' );
    OWA_UTIL.REDIRECT_URL('myurl', FALSE);
    OWA_UTIL.HTTP_HEADER_CLOSE;
    ...but it didn't work either and with a little further thought I guess it's obvious why: any code here modifies the response header for this request, not the request header for the redirect.
    Message was edited by:
    psalmu

  • Using owa_util.showpage

    Hi,
    I just learning how the package owa_util works in my db 10g and I don't Know why the code that I describe below give me a few errors:
    CREATE TABLE feds_data (
    tid       NUMBER(9),
    serial_no VARCHAR2(30),
    mfg_abbr  VARCHAR2(8),
    type_code VARCHAR2(5),
    mod_dt    DATE,
    mod_by    VARCHAR2(30));
    INSERT INTO feds_data
    (tid, serial_no, mfg_abbr, type_code, mod_dt, mod_by)
    VALUES
    (1, '42', 'BCAG', 'ABC', SYSDATE, USER);
    INSERT INTO feds_data
    (tid, serial_no, mfg_abbr, type_code, mod_dt, mod_by)
    VALUES
    (1, '666', 'MSC', 'XXX', SYSDATE, USER);
    commit;
    CREATE OR REPLACE PACKAGE feds_pkg IS
    PROCEDURE get_data;
    END feds_pkg;
    CREATE OR REPLACE PACKAGE BODY feds_pkg IS
    PROCEDURE get_data IS
    CURSOR gmi_cur IS
    SELECT tid, serial_no, mfg_abbr,
    type_code, mod_dt, mod_by
    FROM feds_data
    ORDER BY tid;
    ProcName VARCHAR2(61) := 'feds_pkg.get_data';
    HeadText VARCHAR2(2000) := 'Demo Page Header';
    FootText VARCHAR2(500) := 'Demo Page Footer';
    BEGIN
      htp.p(HeadText);
      htp.p('<form method="POST"><center>');
      htp.p('<table border="1" width="30%">');
      FOR i IN gmi_cur LOOP
        htp.p('<tr>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=3 maxlength=3 name="tid"');
        htp.p('value = ' || i.tid || '></font>');
        htp.p('</td>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=8 maxlength=8 name="serial_no"');
        htp.p('value = ' || i.serial_no || '></font>');
        htp.p('</td>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=6 maxlength=6 name="serial_no"');
        htp.p('value = ' || i.mfg_abbr || '></font>');
        htp.p('</td>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=1 maxlength=1 name="serial_no"');
        htp.p('value = ' || i.type_code || '></font>');
        htp.p('</td>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=7 maxlength=7 name="serial_no"');
        htp.p('value = ' || TO_CHAR(i.mod_dt, 'MM-DD-YYYY') ||'></font>');
        htp.p('</td>');
        htp.p('<td align="center">');
        htp.p('<font face="Arial" color=#000000">');
        htp.p('<input type=text size=6 maxlength=6 name="serial_no"');
        htp.p('value = ' || i.mod_by || '></font>');
        htp.p('</td>');
        htp.p('</tr>');
      END LOOP;
      htp.p('<p align=center>');
      htp.p('<input type=submit name="Submit" value="Save"></p>');
      htp.p('</form></center>');
      htp.p('</table>');
      htp.p(FootText);
    END get_data;
    END feds_pkg;
    set serveroutput on
    spool c:\PLSQL\demopage.html
    exec feds_pkg.get_data;
    exec owa_util.showpage;
    spool offthe output error is:
    ORA-06502: PL/SQL: error numérico o de valor
    ORA-06512: en "SYS.OWA_UTIL",
    línea 356 ORA-06512: en "SYS.HTP",
    línea 1368 ORA-06512: en "SYS.HTP",
    línea 1443 ORA-06512: en "SYS.HTP",
    línea 1735 ORA-06512: en "HR.FEDS_PKG",
    línea 15 ORA-06512: en línea 1Thanks in advance....

    The htp package is meant for procedures that you call from the browser, not from sqlplus. Try this procedure call from your browser.
    There is a way to get a preview via sqlplus, but you need to fake a CGI environment. Search this forum, I know this topic has been addressed before.
    Here is one link:
    Re: HTML not working in PL/SQL block..Help me ASAP
    Edited by: InoL on May 20, 2011 3:40 PM

  • Owa_util.redirect_url not working

    Hi
    I created proces ON Submit:
    BEGIN
    apex_application.g_unrecoverable_error := true;
    owa_util.redirect_url('http://www.psoug.org', TRUE);
    END;
    After fired it I had
    404 Not found
    The requested URL /apex/wwv_flow.accept was not found on this server
    when I change On Load it work.
    is it posible to use it On Submit ??
    I'm use Oracle XE and APEX 3.2.1
    Edited by: AndyPol on 2010-06-17 16:24

    Hi,
    I tried your exact code in an On-Demand pl/sql page process on page 0. Currently, it is tied to an HTML button on page 0 which results in request = Go. When I log in to the application and land on page 1, I can see the button on the page in the page 0 section (top).
    Eventually I would like to set a value in a drop down list, also on page 0, then click the "Go" button to be redirected to various internal and external web sites. For the moment I have excluded any use of the values in the drop down and am only testing whether clicking the go button will execute the code you indicated to take me to the psoug.org website. However, no matter how I configure the page process, whether On Submit (any option) or On Demand, clicking it just redirects me to the same page I am on (page 1).
    I am currently using APEX 4.0. The Page process is defined as follows:
    Sequence          0
    Process Point     On Demand: Run this application process when requesyed by a page process.
    Name          Redirect to product page
    Type          PL/SQL Anonymous Block
    Source
    Process Text
         begin
              apex_application.g_unrecoverable_error := true;
              htp.init();
              owa_util.redirect_url('http://www.psoug.org', true);
              end;
    Process Error Message     could not process request
    Conditions
    Condition Type     Request = Expression 1
    Expression 1      Go (Have tried 'Go' and "Go" to no avail)
    Authorization     
    Authorization Scheme     No Authorization Required
    Configuration     No Build Option
    I am fairly new to APEX and I'm sure this is something I am defining incorrectly, but I just can't seem to figure out what it is.
    Any ideas? This is the only thing currently keeping from completing a project so any help would be greatly appreciated.
    Thanks in advance,
    Milo

Maybe you are looking for

  • Alv grid to download option is giving some problem

    hi, I am using grid display. from there am exporting the list to excel sheet using standard button. But in material last letter is missing. for example..if i see material in grid like 12345678, it will come into excel sheet like 1234567....what could

  • Screen Sequence for Mov Type 301

    Dear All, I am doing two step transfer from one plant to another plant belonging to two diff company codes. When I use 301 movement type, the item detail data is coming at the top and the header data is showing at the bottom of the screen. Please sug

  • Need complete Configuration steps for creating Shipment & Shipment costs.

    Hi, Can anybody explain the Configuration steps in IMG required to create Shipment (T Code - VT01) & Shipment costs (VI01). Thanks in advance. Manjunath.

  • Inspecting the current selection using the HTML5 SDK

    I have been banging my head against the wall trying to get what I thought would be something very simple working. What I want to do is have an InDesign panel, the contents of which changes based on the current selection on the page. Now, I can access

  • Issue in creating formula using atributes

    Hi All, I have issues in creating formula using attributes of characteristic. I need to create a formula using attributes of charactertic customer & key figure. Ex. Formula Key figure / attribute of char customer Please suggest. Thanks, Mamata