RAISING EXCEPTION AND SHOWING TO USERS IN FORM BASED ON STORED PROCEDURE

I have a form based on stored procedure.
I want to handle exceptions in the stored procedure and show it to users.
Here is what i want to do.
I have a sku# field in the form and i want to validate it(against the database
table) in the procedure before inserting into the database.
I want to give a message to users when the validation fails.
How is this possible with the forms based on stored procedure?
Can i use javascript to do the same?
Thanks in Advance

I have a form based on stored procedure.
I want to handle exceptions in the stored procedure and show it to users.
Here is what i want to do.
I have a sku# field in the form and i want to validate it(against the database
table) in the procedure before inserting into the database.
I want to give a message to users when the validation fails.
How is this possible with the forms based on stored procedure?
Can i use javascript to do the same?
Thanks in Advance

Similar Messages

  • Help: FORMS based on stored procedures

    I am working on a FORM based on stored procedures. This particular FORM performs a query and generates say,
    customer_name, item1_sale, item2_sale and sum of the item1_sale and item2_sale.
    I'd like to know if there are ways that the query procedure returns to reference cursors that one with multiple records and one with the sums? The FORM will then be able to show rows of sales and the bottom row with show the sale totals.
    Thank you in advance.
    Jimmy

    Francois,
    I just tried another way of getting the totals. I manually created a data block and add two items tot_1 and tot_2. I the item properties: I set calculation:
    calculation Mode: Summary
    Summary Function: Sum
    Sumary Block: BLOCK_A
    Summary Item: item1_sale etc.,
    I got a compile error:
    FRM-30377: Summary item must reside in single-record block or in same block as summarized item.
    Where do I catch this error?
    Thanks.
    Jimmy

  • Would like to create a file upload facility in a form based on stored procedure

    Hello,
    I would like to create a 'File Upload' in a 'form based on stored procedure'. The version of portal that I am running is 3.0.7.6.2. In this version, only 'form based on table' has the ability to upload files. Or is it that I am missing something?
    Please let me know if this is possible in higher versions of portal.
    Thank you for your help.
    Jayasree

    I have kin od fdone this by using the additem fucntion, if you look at the HTML of the add file page, you can see the parameter that are required for the form.

  • Help: FRM-40505 for a FORM based on stored procedures

    Hi,
    I am working on a FORM based on stored procedures. When it performs a query, it actually returns record, but still comes with the message FRM-40505: ORACLE error: unable to perform query. Any recommendations on the possible coding area to check?
    Thank you in advance.
    Jimmy

    Jimmy,
    To base a block on a stored procedure is not a simple task because it depends on the .....
    .... stored procedure !
    If you do not provide much information (like the famous stored procedure), we could not do anything for you.
    As much information you provide, as much chance we have to understand the problem.
    Francois

  • Form Based on Stored Procedure

    I have an application (STAR_PORTAL) that is owned by the 'STARS3' schema. I want to create a form based on a stored procedure. The procedure ('select_empname') is stored in a package ('star_portal') that is owned by the portal30 user. When I get to the point where I link the form to the procedure, it does not see it. I have tried granting execute on star_portal to public and stars3.

    We will checkup this issue why you do not see the procedure (most probably because it is a packaged procedure).
    Meanwhile, you can continue creating the form by typing in:-
    portal30.star_portal.select_empname
    where you need to specify the procedure name.

  • Default value type - validation option form based on stored procedure

    Please could somebody explain and provide an example of what the option :-
    default value type - in the validation options for a field in the editor for a form based on a stored procedure ?
    Thanks in anticipation.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitry Nonkin([email protected]):
    Absolutely, you can use SQL query to return the value like in the example above:
    Default Value = select 5 from dual
    Default Value Type = 'SQL query returns number'
    or
    Thanks,
    Dmitry<HR></BLOCKQUOTE>
    Hi,
    and what about:
    Default Value = select max(salary) from emp_salaries
    Default Value Type = 'SQL query returns number'
    Will it work? We go some troubles with this.
    Thanx
    Marcin

  • Adding fields to a form based on stored procedure

    I have a store procedure and a form based on it. I'd added a new parameter to the store procedure. How can I do to add a field in the form which takes the new parameter. I'd tried adding a new field with the same name of the parameter but it didn't work.
    Thanx

    Hi,
    It should work fine. What is the problem you are facing? Are you getting any error?
    Thanks,
    Sharmila

  • Problem passing OUT parameters form based on stored procedure to another form?

    Hello,
    I am unable to pass parameters of type OUT from a form based on a stored procedure to another form.
    However, I am able to pass parameters of the type IN to the other form.
    This is the code that I have under the heading
    On successful submission of a form, execute this PL/SQL block or PL/SQL procedure:
    declare
    v_partno varchar2(100);
    v_partdesc varchar2(200);
    blk varchar2(10):='DEFAULT';
    v_names varchar2(1000);
    v_values varchar2(1000);
    begin
    v_partno:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_NO');
    v_partdesc:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_DESC');
    v_names := '_moduleid:_show_header:pnumber:pdescription';
    v_values := '1325575336:YES:' || LTRIM(TO_CHAR(v_partno)) || ':' || LTRIM(TO_CHAR(v_partdesc)) ;
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2(v_names),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2(v_values));
    end
    Info:
    1. Passing PART_NO (IN parameter) and PART_DESC (OUT paramter) to another form.
    2. After hitting the submit button, the second form comes up, but with only the PART_NO(type IN) field completed. The PART_DESC(type OUT) field did not get passed to the second form.
    3. The corresponding fields in the second form are pnumber & pdescription.
    4. FYI - I can see all the OUT parameters correctly, if I don't try to pass control to the second form.
    5. Portal 9.0.2 ( the version that ships with IAS 9.0.2)
    Any help would be greatly appreciated. I have been stuck here for a while now!
    Dev

    Re: Error
    Passing OUT parameter to another form.
    You cannot retrieve the value of the OUT parameter from the session object because after executing your procedure,
    the value passed out using the OUT parameter is not loaded in the session object.
    But you can still achieve what you are trying in the following way.
    Let's assume that your procedure has the following str :-
    procedure proc1 (p_in in varchar2,
    p_out out varchar2)
    is
    begin
    /* your processing statements
    end;
    Say, the name of the field, in the 2nd form, where you need to pass the out parameter value is VALUE_FROM_OUT.
    1> Edit the form on procedure proc1
    2> Select the submit button in the left frame and for the PL/SQL button handler choose Submit action.
    3> In the adjacent textarea, comment out the doSubmit statement and use code given below :-
    declare
    l_p_in varchar2(32767);
    l_p_out varchar2(32767);
    l_url varchar2(2000);
    begin
    l_p_in := p_session.get_value_as_varchar2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_P_IN');
    execute immediate
    'begin <schema>.proc1(:b_in,:b_out); end;'
    using in l_p_in, out l_p_out;
    l_url := 'http://<host>:<port>/pls/<dad>/<portal-schema>.wwa_app_module.link?p_arg_name=_moduleid&p_arg_values=<module_id>&p_arg_names=VALUE_FROM_OUT&p_arg_values='||
    <portal-schema>.wwv_standard_util.url_encode(l_p_out);
    <portal-schema>.wwa_app_module.set_target(l_url,'CALL');
    end;
    NOTE :
    ======
    In the code given above, replace
    <schema> with the schema name that owns the procedure proc1
    <host> with webserver host
    <port> with the port of your webserver
    <dad> with the portal dad
    <portal-schema> with the name of the portal-schema
    <module_id> with the module of the 2nd form i.e. where you need to pass the value of the out variable.
    You will have to grant execute privilege on procedure proc1 to your application schema,
    if the procedure proc1 lies in a schema other than the application schema.
    4> Finish editing the form.

  • How to verify the user information pass by the form with a stored procedure?

    Hi,
    I would like to know how to verify user information pass by the form with a stored procedure.
    I want make a portal which accepts to new user registration, but I want verify the new user's informations (like the name don't contain a number etc).
    Thanks for your help
    regards
    jla

    Hi Samson,
    You can use the UI API to do this. You can catch the form_ADD event and then validate the input from the users. You can even block the event from completing (and stop the document from being added) if your code finds some incorrect data using the bubbleEvent functionality.
    I don't have one specific example to show you, but if you look at some of the SDK samples (for example C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\02.CatchingEvents) to see how to work with events, you can then create your own validation to ensure the users data is valid.
    Regards,
    Niall

  • Calling a form based on a procedure from a report

    I have a report and want the user to link to a form based on a stored procedure passing params from the report record. That I can do using the link option. But to complicate matters I have more than one form based on a procedure and depending on values in the reports data depends on which form will be called (passing values to the form (all based on stored procedures).
    How can I do this ?
    Any advice would be really appreciated.

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='&#0124; &#0124;l_dept;
    go(l_url);
    end;
    null

  • Return values for a Form based on a procedure

    Hi,
    I am fairly new to Portal Applications.
    I have a form based on a procedure.
    The procedure has an IN OUT parameter and what happens at the moment is that once the submit button is pressed the IN OUT parameter is displayed on a new page.
    My question is...
    How do I display the returned value in a field on the form?
    Please help
    Thanks

    Hi,
    This is how it works right now. It is not possible to show it in the same form.
    Thanks,
    Sharmila

  • How to display errror message in a form based on a procedure

    I created a single-level form based on a procedure. In this form, I would like to generate an error message inside of a custom button, so I used the following inside of that button:
    p_session.set_value (p_block_name => 'DEFAULT',
    p_attribute_name => '_STATUS',
    p_value => 'Please choose a valid chair from the popup icon.');
    Unfortunately, it returned a WWV-0000 error code without any error messages. I use that code in another single-level form based on a table/view, and it works fine, but I need a single-level form based on a procedure. Therefore, I want to know if that code snippet can be used in a form based on a procedure or not? Do we have any other ways to display error messages in pl/sql besides p_session.set_value(...);
    Thanks in advance.

    Somebody please response.

  • ORA-04020 Deadlock when trying to create form based on stored proceure

    Hi,
    I'm trying to create a form based on a stored procedure, and I'm getting " Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.WARRENP (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300) " when I try to generate the form. I have created a new database provider (warrenp), and I've given it the same privs as the PORTAL_DEMO provider.
    GRANT EXECUTE ON PORTAL.WWCTX_API TO WARRENP;
    GRANT EXECUTE ON WWPRO_API_PARAMETERS TO WARRENP;
    GRANT EXECUTE ON WWPRO_API_INVALIDATION TO WARRENP;
    GRANT SELECT ON WWV_USER_CORNERS TO WARRENP;
    GRANT EXECUTE ON WWPOB_PAGE_UTIL TO WARRENP;
    I create a stored procedure
    CREATE OR REPLACE PROCEDURE sp_test (foo IN number) AS
    BEGIN
    NULL;
    END;
    GRANT EXECUTE ON sp_test TO PUBLIC;
    Then I try to create a form based on this procedure and it fails with the above error. I can create this procedure in the PORTAL_DEMO schema without problems. I can also create a form in the WARRENP provider based on PORTAL_DEMO.GIVE_RAISE and that works also.
    I'm on Portal 10G (9.0.4) on Linux, infrastructure database is 9.0.1.5.0.
    Can anyone tell me what I've missed in my setup?
    Thanks

    I've been informed that this is caused by database bug 2651669.

  • Forms [32 Bit] Version 6.0.5.0.2 :: BLock based on stored procedure

    Trying to develop a form having a block based
    on stored procedure. My form works fine if
    the stored procedure having REF CURSOR as one
    of the argument but if I am using dynamic SQL
    in my procedure I can not use Strong REF CURSOR, so I had to use Pl/Sql Table as one of the parameter in the proceudre.
    In that case when I run my form and Execute the query it just comes out of the form without displaying anything and also it doesn't throw any error.
    Don't know what I am doing wrong.
    Pl. Help...
    null

    I drilled down the proble further and identified that i can
    recreatr the problem in any 7.3.4 database ....
    But in 8.0.5 it's working fine .....
    Is developer 6.0 is going to support Oracle 7.3.4
    it'll be highly appreciated if any one from Oracle development
    team can give me a response
    Thanks in advance...
    Lebon Mathew (guest) wrote:
    : Problem : If a block value is refered in
    : a LOv - record group query
    : the form cannot adjust the out put .. and
    : is not generating.....
    : Record group query which works :
    : select security_role, sec_role_desc, database_role
    : from security_role
    : where wnd_appln = 'XXXXXXXXX'
    : order by security_role, database_role
    : Record group query which is not working :
    : select security_role, sec_role_desc, database_role
    : from security_role
    : where wnd_appln = :APP_ROLES_BK.wnd_appln
    : order by security_role, database_role
    : Error Generated :
    : FRM-30064: Unable to parse statement icrgg/icrggc: hicrg.
    : Record Group SECURITY_ROLE_LOV
    : Form: EMPLOYEE
    : FRM-30085: Unable to adjust form for output.
    : Table structure :
    : CREATE TABLE security_role
    : security_role VARCHAR2(15) NOT NULL,
    : sec_role_desc VARCHAR2(20) NOT NULL,
    : open_nsr VARCHAR2(1),
    : open_pkt VARCHAR2(1),
    : chg_wk_grp VARCHAR2(10),
    : asgn_anlst VARCHAR2(10),
    : updt_oth_wkgp_pkt VARCHAR2(1),
    : admin_tasks VARCHAR2(1),
    : create_po VARCHAR2(1),
    : billing_changes VARCHAR2(1),
    : invoice_changes VARCHAR2(1),
    : change_owner VARCHAR2(1),
    : wnd_appln VARCHAR2(15),
    : database_role VARCHAR2(20)
    : PCTFREE 10
    : PCTUSED 40
    : INITRANS 1
    : MAXTRANS 255
    : TABLESPACE wa0dat0t01
    : STORAGE (
    : INITIAL 32768
    : NEXT 8192
    : PCTINCREASE 0
    : MINEXTENTS 1
    : MAXEXTENTS 121
    : w@w Lebon Mathew
    : WellsFargo - Telecom Applications
    : (415)-477 6445
    null

  • How to trigger and change password for AD user after form based login

    Hello,
    We are authenticating against Active Directory with Weblogic 10.3 using FORM based security. Everything is working. I need to now change a password for an authenticated user. For example, I have set a user to have their password expire on next logon from the AD side. The user logs in but somehow I need to trap some info from Active Directory (or an LDAP conversation) to figure out if I need to force the user to change password.
    Do I need to start looking at custom code with LDAP Java SDK's or can I use a canned MBean from Weblogic Server.
    I am looking at http://www.mozilla.org/directory/ for LDAP.
    Can I set/reset an AD user's password with an MBean like the following link?
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/javadocs/index.html?weblogic/management/security/authentication/UserPasswordEditorMBean.html
    If anyone has any experience with this or can point me in the right direction let me know.
    If anyone else is interested please add to the tread and I'll be sure to keep the found solution(s) updated here.
    Thanks...........
    JJ Everett

    Hello JJ
    Please see document ID 403484.1 in http://metalink.oracle.com. This may help to understand what you are aiming to do. Cheers
    -- Nathan

Maybe you are looking for

  • Has anyone reported that the calendar crashes on entering March and have we got an answer why?

    Every time I try to access March in 2013 calendar it crashes.

  • How to see photos edited on iphone on your pc?

    I clicked and edited these photos before setting icloud. And as of now, I see an unedited version on laptop and an edited version on phone. help me so that i could download those photos on my pc>>windows 7

  • HT2589 Apple ID not recognised in App Store

    My apple ID is registered to the UK.  I can purchase books and music without any problem but I cannot upgrade any previously downloaded apps as I get a message saying my Apple ID is registered to the Emirati store.  How can I resolve this.  I have do

  • SRM 7.0 Advanced Search Object Type

    Dear All, We use SRM 7.0, I want to remove some object types from Advanced Search options in Portal. For example, in standard advanced search, you can select shopping card, confirmation, purchase order, contract... etc. And i dont want some emplyees

  • Global Parameters in SEM

    I see where the User's optional parameters, like group, unit, version, fiscperiod, and fiscyear can be accessed in Table UCMP020. Where can the hard configured values, ie currency, cons chart of acct, dimension, and fiscal year variant be seen? Are t