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

Similar Messages

  • 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

  • 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

  • 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

  • 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.

  • 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.

  • 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

  • Block based on Stored Procedures & Locking_Mode

    Hello,
    I'm creating a block in Forms 6.0.8 based on Stored Procedures. I'm using the example given in Metalink doc 52778.1. Updates to data work fine if locking_mode = 'Immediate'. If I set locking_mode to 'Delayed' and run the form, when I try to update and commit something, then the IF condition in lock-procedure (grp_lock) always returns TRUE and I run into the exception trapped there. It appears that Forms is passing NEW values in p_grp_data if locking_mode is Delayed and this is causing the problem. Is there any thing I could do in the form or procedure (preferably in the procedure) to solve this problem ? I'm trying to write procedures that will work with both Immediate and Delayed locking_modes
    thanks in advance..
    -- Table and package source:
    -- GRP
    create sequence grp_s
    create table grp
    id number constraint grp_pk primary key,
    name varchar2(10) not null constraint grp_uk unique,
    description varchar2(30) not null,
    active varchar2(1) default 'Y'
    create or replace trigger grp_bri before insert on grp for each row
    begin
    select grp_s.nextval
    into :new.id
    from dual ;
    end ;
    CREATE OR REPLACE PACKAGE grp_pkg AS
    TYPE grpidrec IS RECORD( id grp.id%TYPE ) ;
    TYPE grprec IS RECORD ( id grp.id%type, name grp.name%type, description grp.description%type, active grp.active%type ) ;
    TYPE grp_cursor IS REF CURSOR RETURN grp%rowtype ;
    TYPE grp_tab IS TABLE OF grp%rowtype INDEX BY BINARY_INTEGER ;
    TYPE grp_id_tab IS TABLE OF grpidrec INDEX BY BINARY_INTEGER ;
    PROCEDURE grp_refcur( p_grp_data IN OUT grp_cursor,
    p_group_name IN grp.name%type ) ; -- use if a ref cursor is required
    PROCEDURE grp_query( p_grp_data IN OUT grp_tab, p_group_name IN grp.name%TYPE ) ;
    PROCEDURE grp_insert( p_grp_data IN grp_tab ) ;
    PROCEDURE grp_update( p_grp_data IN grp_tab ) ;
    PROCEDURE grp_delete( p_grp_data IN grp_id_tab ) ;
    PROCEDURE grp_lock( p_grp_data IN grp_tab ) ;
    END grp_pkg ;
    sho err
    create or replace package body grp_pkg as
    -- ================================================================================
    PROCEDURE grp_refcur( p_grp_data IN OUT grp_cursor, p_group_name IN grp.name%type ) AS
    begin
    open p_grp_data FOR select id, name, description, active
    from grp
    where name = nvl( p_group_name, name ) ;
    end ;
    -- ================================================================================
    PROCEDURE grp_query( p_grp_data IN OUT grp_tab, p_group_name IN grp.name%TYPE ) AS
    i number ;
    CURSOR grp_select IS
    SELECT id, name, description, active
    FROM grp
    WHERE name = nvl( p_group_name, name ) ;
    begin
    OPEN grp_select ;
    i := 1 ;
    LOOP
    FETCH grp_select INTO p_grp_data(i).id, p_grp_data(i).name, p_grp_data(i).description, p_grp_data(i).active ;
    EXIT WHEN grp_select%NOTFOUND ;
    i := i + 1 ;
    END LOOP ;
    end ;
    -- ================================================================================
    PROCEDURE grp_insert( p_grp_data IN grp_tab ) AS
    i NUMBER ;
    begin
    FOR i in p_grp_data.FIRST .. p_grp_data.LAST
    LOOP
    INSERT INTO grp( name, description, active )
    VALUES ( p_grp_data(i).name, p_grp_data(i).description, p_grp_data(i).active ) ;
    END LOOP ;
    end ;
    -- ================================================================================
    PROCEDURE grp_update( p_grp_data in grp_tab ) AS
    i binary_integer ;
    rec_modified exception ;
    BEGIN
    FOR i in p_grp_data.first .. p_grp_data.last LOOP
    UPDATE grp
    SET name = p_grp_data(i).name,
    description = p_grp_data(i).description,
    active = p_grp_data(i).active
    WHERE id = p_grp_data(i).id ;
    if sql%rowcount = 0 then
    raise rec_modified ;
    else
    -- success
    null ;
    end if ;
    END LOOP ;
    exception
    when rec_modified then
    raise_application_error(-20006, 'Record already modified' ) ;
    when others then
    raise_application_error(-20007, 'Other error : ' || sqlerrm ) ;
    END ;
    -- ================================================================================
    PROCEDURE grp_delete( p_grp_data IN grp_id_tab ) AS
    i BINARY_INTEGER ;
    begin
    FOR i IN p_grp_data.FIRST .. p_grp_data.LAST LOOP
    DELETE FROM grp
    WHERE name = p_grp_data(i).id ;
    END LOOP ;
    end grp_delete ;
    -- ================================================================================
    PROCEDURE grp_lock( p_grp_data IN grp_tab ) AS
    i BINARY_INTEGER ;
    grec grprec ;
    err varchar2(255) ;
    errcd number ;
    rec_modified exception ;
    begin
    FOR i in p_grp_data.FIRST .. p_grp_data.LAST LOOP
    begin
    SELECT id, name, description, active
    INTO grec
    FROM grp
    WHERE id = p_grp_data(i).id
    FOR UPDATE OF description NOWAIT ;
    -- this part returns true
    -- if locking_mode = 'Delayed'
    -- Forms is passing NEW values in p_grp_data if mode is Delayed
    -- and OLD values if mode is Immediate
    if ( grec.name != p_grp_data(i).name
    OR grec.description != p_grp_data(i).description
    OR grec.active != p_grp_data(i).active ) THEN
    raise rec_modified ;
    end if ;
    exception
    when no_data_found then
    raise_application_error( -20007, 'Record deleted by another user' ) ;
    when rec_modified then
    raise_application_error(-20006, 'Record modified by another user' ) ;
    when others then
    raise_application_error(-20009, 'Others' ) ;
    end ;
    END LOOP ;
    end ;
    -- ================================================================================
    end grp_pkg ;
    show error package body grp_pkg

    Yes, I was hoping to use these procedures to map the collection type returned to the database to the block data. I guess I was wrong. Except for the initial query and reading some other information from the database, I don't have to use these procedures as I do not write anything to it.
    Thank you for your help, I will go on from there.
    So, it means that I will have to iterate through my collection inside Forms and manipulate my data row by row. Or, is there a way to pass an Oracle collection type between the database and the Forms client and have it displayed without having to iterate through the rows and mapping each field?
    adsm

  • Forms9i, data block based on stored procedures, refresh on update ?

    Hi,
    I am using
    Forms [32 Bit] Version 9.0.2.9.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
         With the Partitioning, OLAP and Oracle Data Mining options
         JServer Release 9.2.0.5.0 - Production
    Oracle Toolkit Version 9.0.4.0.23 (Production)
    PL/SQL Version 9.0.1.3.1 (Production)
    Oracle Procedure Builder V9.0.2.0.7 Build #1022 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle Query Builder 9.0.2.0.0 - Production
    Oracle Virtual Graphics System Version 9.0.1.5.0 (Production)
    Oracle Tools GUI Utilities Version 9.0.4.0.9 (Production)
    Oracle Multimedia Version 9.0.4.0.9 (Production)
    Oracle Tools Integration Version 9.0.2.0.0 (Production)
    Oracle Tools Common Area Version 9.0.1.0.0
    Oracle CORE     9.0.1.2.0     ProductionI have a module based on stored procedures. I have defined query, lock and update procedure. All of them are working as they should, I mean that when looking at the input and output from these procedures I don't see anything blatantly wrong.
    Now, when I update a table field in the form and call the update stored procedure, this procedure takes the updated values in considerations, updates some more fields, and remove some records.
    It is working as it should, except for two details :
    1- I don't see the values updated by the procedure in the Form;
    2- even though some records were removed from the table by the procedure, I still see all my records.
    Is there a way to display the returned table?
    And, is there any documentation about data block based on stored procedures, what are the required signatures and limitations of those stored procedures, what a lock procedure is supposed to do (mine does 'null;' ...), how to map a collection type defined in Oracle to a Form data block ? Any link will be appreciated, I have found half a dozen page vaguely detailing this on Google, but nothing that can compare to a usual Oracle manual. Maybe I have missed something.
    Thank you for your help.
    adsm

    Yes, I was hoping to use these procedures to map the collection type returned to the database to the block data. I guess I was wrong. Except for the initial query and reading some other information from the database, I don't have to use these procedures as I do not write anything to it.
    Thank you for your help, I will go on from there.
    So, it means that I will have to iterate through my collection inside Forms and manipulate my data row by row. Or, is there a way to pass an Oracle collection type between the database and the Forms client and have it displayed without having to iterate through the rows and mapping each field?
    adsm

  • 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 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

Maybe you are looking for

  • SSO to J2EE application from SAP Portal

    Hi I am trying to do SSO from SAP Portal to a J2EE engine which runs on SAP Web AS. Here are my queries 1. When I deploy a J2EE application on Web AS , I dont get any login screen. How can I make sure that if a user wants to access this J2EE applicat

  • SInstance=Param not working for sap bw query based reports (FWM 02020)

    Has anyone else tried linking to instances using sInstance=Param from a webi to webi or webi to crystal document? We have attempted the following using the build hyperlink function in webi. 1. Select the crystal report. 2. We have 2 variables, the va

  • Module could not be found: VersionCue.dll

    Currently, whenever I attempt to start Photoshop CS4 Extended, it launches fine. However, when I try to open a document (doesn't matter whether it's an old photo or a new blank one), I get an error: The specified module could not be found. C:\Program

  • HELP!! Installation of OS X Panther 10.3 stops at Asian Languages Support

    I had trouble trying to move the user directory onto another harddrive so I have had to reinstall from scratch. I have a clean harddrive that has been formatted (extended journalled) twice, and written over with zeros... When the installer get to 'Pr

  • Help with faces please

    I recently "converted" from iPhoto to Aperture.  I have used Aperture's faces to find 11 family members, both in the converted iPhoto library and in new projects. It has worked fairly well, but I am having one problem.  In the last two projects there