Program units at forms 10g

Hey friends,
I have a lot of user made procedures built in the program units of forms.
Since ia m in a process to make a web server of teh forms application, i wanted to know that would these program units cause any performance problems on the application server.
Since the processing of thses program units would occur at application server.
Do i have to create these procedures at database level?
thanks
Thanks

That depends on what they are doing. If there is any data processing, then, yes, put it into the database. If there is just controlling of the behaviour of the form going on, e.g. setting visual attributes, enabling/disabling items etc. then leave it there.

Similar Messages

  • Help plss Should a cursor be created in database or program unit in forms l

    Where can i create a cursor should it be in database i.e isql plus using internet explorer or should i create the cursor in forms
    forms can i create the cursor so that i can use the cursor in the post item trigger of the userid item of login page
    Can i create the cursor in a package specification and how can i call that cursor into a post_text item trigger
    details below
    Iam working on a Online exam for students Dummy project using forms
    The student 1st comes to a WELCOME page i.e form which asks him if he is a new student or registered stud
    If he clicks registered pushbutton it takes him to a LOGIN page where there are two items userid and password.I am using a Validate_item OR Post_item trigger to fire after the student enters his userid.
    I need to compare the entered userid with the userid stored in the database STUDENTS table which i created which consists of the registered students details.
    Our project Guide suggested that we create a cursor and fetch each userid everytime into the cursor and compare the entered userid with the cursor.

    hi Sqlstar,
    Regarding to your all questions , i prefered that you search for a simple document or book in order to understand much more more about creating cursors.
    however since this forum made to help people and to make a integerated community i would be glad to offer my help and going with you step bt step with your answers.
    as for beginning
    1) when you create the user_exists function in database , if you want to call it in the form level you would wirte a code like this
    ----WHEN-VALIDATE-ITEM------------user_id item---------
    IF scheme_name.procedure_name(:block1.userid)!='TURE' then
       message('User Name is not correct');
       raise form_trigger_failure;
    end if;
    2) it's not a waste of recourse to make 2 validation of both userid and password
    and as same you create a procedure for useris you should create a procedure for password where the user id is the outcomming of userid item in the form.
    3)you have all choices to create the 2 procedures on database side or in the program unit at design time for the form it's up to you and as a small hint for you ,
    when you create them in the program unit and want to call the procedures in the WHEN-VALIDATE-ITEM  trigger you should denote the procedure name with the name of package first as following
    -------[Package Spec Code]-------
    PACKAGE user_validation IS
    function user_exists (p_user_id number) return boolean;
    end ;
    --------------[Package Body Code]------
    PACKAGE BODY user_validation IS
    function user_exists (p_user_id number) return boolean
    is
    user_number number;
    cursor c_user_id is
    select user_id from <user_table>
    where user_id=p_user_id;
    begin
    open c_user_id ;
    loop
    fetch user_id  into user_number ;
    return (true);
    exit when c_user_id%NOTFOUND;
    end loop;
    execption  when others then
    return(false);
    end user_exists;
    end;
    -----Calling at Validation level-----------
    IF (user_validation.user_exists(:block1.userid))!=TURE then
       message('User Name is not correct');
       raise form_trigger_failure;
    end if;
    i hope this could be helpful engouh to start your application
    Good Luck .
    Regards
    Omar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Alert window on opening a form with dup. program unit in form and PLL

    Can anyone help here? I'm upgrading a large system from forms 4.5 to forms 6i (yes, we're behind). I use an attached library for about two dozen procedures. In some cases, some of the procedures have been overriden in the Form. When I open the form in the forms designer, I get the alert message: "A Program Unit XXXXX already exists. Continue creation?"
    This happens where the program unit in the library was overriden in the form. I presume since the form program unit will be found first at execution time that this message is nothing to worry about. Indeed, I have had no failures related to this yet.
    Can anyone verify that this is the normal functioning of Forms 6i? Or is there a way to turn this off?
    Thanks,
    Jim

    Hi
    If you are using SAP Business One PL 19 or above you can try the following for opening a form
    Dim formType As SAPbouiCOM.BoFormObjectEnum
                'default: fo_None
                Dim strUDOObjectType As String
                Dim strObjectKey As String
                'For UDO objects, set the system form enum to be "fo_UserDefinedObject" at first.
                formType = BoFormObjectEnum.fo_UserDefinedObject
                strUDOObjectType = "myUDO"
                'UDO type
                strObjectKey = "udoKey"
                'Code
                Dim oForm As SAPbouiCOM.Form = oApp.OpenForm(formType, strUDOObjectType, strObjectKey)
                'For system objects. set system form enum for "BusinessPartners" at first.
                formType = BoFormObjectEnum.fo_BusinessPartner
                strUDOObjectType = "testUDO"
                'Will be ignored in this case.
                strObjectKey = "C00001"
                'primary key of "BusinessPartners" object.
                oForm = oApp.OpenForm(formType, strUDOObjectType, strObjectKey)
                If oForm Is Nothing Then
                    'No form opened with the input parameters, add your own logics here...
                Else
                    'Form opened successfully, do your own work here...
                End If
    Summary Column is available in 8.81 only
    Hope this helps
    Regards
    Arun

  • Can not add new program unit in form

    We have a form developed using developer 6i in which we can not add new program units. If new program unit is added and form is saved and closed then after opening the form again, newly added program unit can not be seen in object navigator as well as it can not be found using search. Such form fails to compile as the calls for new program unit exists but the program unit is lost. The problem persists even if another copy of form is made using Save As option.
    What could be the reason of this problem?
    Thanks

    Hmmm... I have never had the problem. Two forms I have been working on lately are 1808 KB and 1424 KB. This is their compiled-and-saved size. Their "cleaned up" size is 792 KB and 604 KB.
    <p>Do you know about the semicolon - semicolon replacement trick for reducing fmb size? Read this thread:
    <br>    Re: FMB size shrinks dramatically
    <br>And a related thread:
        Re: Why does this happen - find ';', replace with ';'?
    <p>I sure wish Forms had a Preferences setting labelled:     Remove compiled code when saving.

  • To recover a deleted program unit from forms 6i

    Hi,
    I have accidently deleted a program unit and saved it in forms6i. Is there any way for recovering it back? I know this would sound insane but hoping to get a solution from someone
    Thanks in advance.

    Hi, Arun
    I have accidently deleted a program unit and saved it in forms6i. Is there any way for recovering it back? I know this would sound insane but hoping to get a solution from someoneDid you generate any .fmx with your previous source control ? If you generate .fmx with the program unit then you can may find the program unit code by opening the .fmx file in notepad.
    Open it in note pad and search for the program unit using search option..
    Hope this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • Pd0-ppu017 program unit source must define a  subprogram body  or package

    Hi
    Iam new to oracle l and trying to teach myself
    my problem is when I compile any function in program units of forms ,
    the following error message obtained:-
    pd0-ppu017 program unit source must define a subprogram body or package.
    for example this ready function that I have just copied ,pasted
    CREATE OR REPLACE FUNCTION TestTrig_body() RETURNS TRIGGER AS $$
    DECLARE
    v_TempRec temp_table%ROWTYPE;
    BEGIN
         INSERT INTO report_table(num_col, old_val, new_val)
              VALUES (NEW.num_col, OLD.char_col, NEW.char_col);
         RETURN NEW;
    END;
    what is the reason please?
    Windows OS
    Oracle 10g database
    oracle 6i developer
    regards

    VANPERSIE,
    It looks like you are mixing sytax. Some of the Syntax used in a Database trigger (such as Before Insert, After Insert, etc) is specific to database triggers. Referring to :NEW and :OLD are specific to database triggers and can't be used as you are using them, unless you have data blocks names NEW and OLD. Also, when you refer to a item in a block, you must prefix the block or item name with the colon ":". Also, as aweiden points out, you define your return data type as "TRIGGER". The return type of a Function must be a valid Oracle data type. Therefore, your function should return a BOOLEAN, NUMBER, VARCHAR, or even a Ref Cursor, just to name a few. From the looks of your code, your function would simply return a value to indicate that the INSERT was successful. Therefore, you could rewrite your function something like:
    CREATE OR REPLACE FUNCTION TESTTRIG_BODY() RETURNS BOOLEAN AS
    BEGIN
       /* This example assumes you have data blocks in your form called:  NEW_BLOCK and OLD_BLOCK. */
       INSERT INTO REPORT_TABLE
          (NUM_COL, OLD_VAL, NEW_VAL)
       VALUES
          (:NEW_BLOCK.NUM_COL, :OLD_BLOCK.CHAR_COL, :NEW_BLOCK.CHAR_COL);
       RETURN TRUE;
    EXCEPTION
       WHEN OTHERS THEN
          RETURN FALSE;
    END;Also, is there a particular reason you are manually INSERTing a record versus letting Oracle Forms handle this for you?
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • How call Recursiving Program Units in Pl/Sql

    I need call a program unit to resolve a matematical equation,
    but the equation can have a part where the same proccess is
    call, then creating a cascate in the proccess, Ex:
    Equation A : "1 + 2 + 3 + %0002
    %0001 is the Equation B where :
    Equation B : "3 + %0003 + 5
    %0003 is the Equation C where :
    Equation B : "2 + %000n + 4
    %000n is the Equation n where ...
    Wich i resolve this recursive problem ?????????
    null

    Danilo Mozeli Dumont (guest) wrote:
    : I need call a program unit to resolve a matematical equation,
    : but the equation can have a part where the same proccess is
    : call, then creating a cascate in the proccess, Ex:
    : Equation A : "1 + 2 + 3 + %0002
    : %0001 is the Equation B where :
    : Equation B : "3 + %0003 + 5
    : %0003 is the Equation C where :
    : Equation B : "2 + %000n + 4
    : %000n is the Equation n where ...
    : Wich i resolve this recursive problem ?????????
    Danilo bom dia , creio que este mundo est_ realmente ficando
    muito pequeno . Acho que seu exemplo no est_ correto , creio
    que na equao A voc
    quiz dizer " %0002 is the equation B
    where " . Estou certo ??
    Nunca vi este tipo de problema mas eu tentaria colocando a
    Program Unit na base de Dados como um PL/Sql e chamaria sua
    execuo dentro de uma program unit do Forms coordenando a
    execuo . No caso creio que uma Function seria mais indicada.
    Tudo depende      claro de onde voc
    vai querer colocar esta
    function.Talvez voc
    no saiba o momento de cham_-la pois
    desconhece o nmero de elementos da sua equao .
    Emfim , boa sorte .
    Lourival
    null

  • Generate txt output using a program unit in web report (OAS 10g)

    Hi Everyone.
    I have a c/s report (6i) which generates a txt file in a program unit using TEXT_IO package. I need to move this report to web (Reports 10g) and publishing it in OAS 10g. I've done that (without the text file generation), I can see the report on the browser in PDF Format and works fine... but, I still have a problem... when I use Text_io package, the c/s version of the report in 10g runs an generates the output.txt file but when I move it to web I got an error in the before report trigger (in which I invoke the program unit sp_generate_txt)
    I looked around for a solution and I just find the usage of webutil package, but as you know, webutil package is only usable in Forms.
    Any Ideas on how can I solve this problem?

    Hello,
    TEXT_IO can be used in Reports deployed on the web.
    The difference with Client /Server is the fact that the file create by TEXT_IO will be created on the "Middle Tier Server" and not on the Client.
    Regards

  • How to use one forms fields, program units in another form.

    The whole proceessing and update is happening in one main form.
    Main form has all the fields and a reprocess button which re-creates records if they have error. Record name is the primary key.
    I have another small form, which just shows the list of record names in the system. I want a reprocess button next to each record name so that user will be able to just select any record name and press reprocess button to recreate any record data.
    There are a lot of fields in main form and program units , which are used by the reprocess button.
    Any suggestions like how to go for it?

    You can either pass all the relevant data from the Small Form to the Larger form and make it reprocess the data or you can move the Program Units to a PL/SQL Library (.pll) and attach the library to your smaller form where you can call the program units. Either option requires changes to the Larger form to enable it to process a record passed to the form as a parameter or to externalize the Forms Program Units to a library.
    Personaly, I would recommend you move the Program Units to a Library. This would enable you to use the processes in any form (that has the library attached).
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Forms Program units don't work in Oracle Apps Server 10.1.2.2

    Dear all,
    I created a simple form with some triggers and a button. Everything works fine when I run the form using my PC's local OC4J. If I deploy the form in Oracle Application server 10.1.2.2 and run from there, none of the triggers or program units is working. What could be the reason?
    For example, in when-button-pressed trigger, I have the following code.
    go_block('block1');
    execute_query(no_validate);
    When I press the button, nothing happens.
    Can you please help?
    Regards,
    Sanjeev

    that's indeed your problem , you need to recompile on solaris
    frmcmp.sh you can find this in you ias home/bin directory
    eg
    frmcmp.sh module=your form.fmb user=
    for this you need to have an active Xwindow
    you can use frmcmp_batch.sh too then normally you don't have to set the Xwindow
    I putted already some scripts to do this on the forum
    search for frmcmp.sh
    Erwin

  • Problem calling program unit function in Forms 6i

    Hi,
    I'm new to programming with Oracle Forms. I have a question that I cannot seem to figure out. In Forms 6i, I have created a program unit function that compiles correctly. The trouble I'm having is calling it and displaying the function's contents into a non-database display item I created. When I run my app, the display item it blank while my other fields populate.
    I first tried to call it in a POST-QUERY trigger but I get an error stating "function cannot be called in SQL." Can you not call a function in a form's trigger? If so, what would be the correct syntax?
    Then I tried to call it in the non-database item's Calculation => Formula (property) by just stating the function_name(parameter). This appears to compile fine too, but still no display at runtime.
    What would be the best way to reference my function to display its contents properly? Does anyone have any examples? Any help would be greatly appreciated. Thank you.

    First, get rid of the
    EXCEPTION WHEN NO_DATA_FOUND
    in your function. Summary queries never raise no_data_found; They just return null.
    Your ":history.consecutive_years := NumberOfYears(:student.id);" is the proper way to call the function. That is what I was trying to tell you with the example: ':Myblock.Item_x := function_name(some_parm);' code
    If your post-query trigger only executes the function, then I think your problem is somewhere else:
    'FRM-40735 POST-QUERY trigger raised unhandled exception' looks like a problem elsewhere.
    Don't know of a good website. Just keep asking here -- somebody is bound to pop in and help you out.
    One more thing: drop this into your form-level on-error trigger. It often helps to find problems:
    -- On-error form-level trigger                                       --*
    DECLARE
      Err_Code NUMBER(5)     := ERROR_CODE;
      Err_Text VARCHAR2(100) := ERROR_TEXT;
      MSG      VARCHAR2(150)
              := SUBSTR('   '||ERROR_TYPE||'-'||TO_CHAR(Err_Code)||': '
                                         ||Err_Text,1,150);
      DBMS_TXT VARCHAR2(500);
    BEGIN
      IF Err_Code IN (40401,40405,     --No changes to save/apply
                      40100,40352) THEN --at first/last record
        MESSAGE(MSG,NO_ACKNOWLEDGE); -- Don't raise Form_Trigger_Failure
      ELSE -- all other messages
        -- check database error message --
        DBMS_TXT := SUBSTR(DBMS_ERROR_TEXT,1,500);
        if  DBMS_TXT is not null
        and substr(DBMS_TXT,5,5)
          not in('00000',
                 '01403') then --1403=no data found
          -- show entire msg, add new_line chars.
          DBMS_TXT := replace(DBMS_TXT,'ORA-',chr(10)||'ORA-');
          DBMS_TXT := replace(DBMS_TXT,' '||chr(10), chr(10));
          -- show MSG and DBMS_TXT both as an alert --
          --PLL_ALERT( ltrim(MSG) || DBMS_TXT );
          Message(ltrim(MSG) || DBMS_TXT );
          Message(' ',no_acknowledge);
          Raise Form_Trigger_Failure;
        else
          Message(MSG);
          Message(' ',no_acknowledge);
          Raise Form_Trigger_Failure;
        End if;
      END IF;
    END; -- end of on-error trigger

  • How Do I Make Updated Procedure in the Program Unit of the Form to Work?

    I have updated a procedure in the Program Unit of the Form that I modified. I am not sure what are the proper ways to compile or load the changed procedure in my form to make sure the changes work. Please help me with the following questions:
    Do I have to use Oracle Procedure Builder to compile the updated procedure in order to have the form work properly? If so, how do I make the list of procedures in the program unit of my form to come up after I have the Oracle Procedure Builder opened and connected to our database?
    Couldn't I just compile the form after the changes are made to the procedure (Body) in the Program Unit of the form in the Forms Builder?
    Any thoughts and/or suggestions on this are welcome.
    FYI, we are in Oracle Forms 6.i with Oracle database version 10.2.0.2.
    Thanks.

    There was no errors what so ever, no triggers and other module errors, when I compiled and created an executable for my form.
    If the database is not connected, Forms Builder would not allow me to compile/execute any forms so I am pretty sure that the database was connected when I did 'CTRL' + 't' to create an executable.
    FYI, the following is an excerpt from Oracle Procedure Builder Help:
    A procedure is a subprogram that performs a specific action. ...
    A procedure has two parts:
    *     specification (spec for short)
    *     the body
    Specification
    The procedure spec begins with the keyword PROCEDURE and ends with the procedure name or a parameter list. Parameter declarations are optional. Procedures that take no parameters are written without parentheses. For example, the specification of procedure proc1 is displayed below:
    PROCEDURE proc1 (param CHAR);
    Body
    The procedure body begins with the keyword IS and ends with the keyword END followed by an optional procedure name. The procedure body has three parts: a declarative part, an executable part, and an optional exception-handling part.
    and all of other procedures, that do not have an '*' next to the procedure name in the Program Units of my form, contain both Spec and Body.
    p.s. I remember the '*' next to the procedure name means the procedure has been changed, and ... (sorry, I don't remember the rest...)
    Thanks.

  • Can I create a dynamic cursor in a program unit on oracle form....

    Hello folks,
    can I create a dynamic cursor on client side ( in a program unit on the oracle form), is it possible, I Know how to create it on server side using Ref cursor, but on client side i got this message (can't be created on client side or something like that).... please if someone can help

    > select count(*) from t_comsis
    <p>But when you put that select string into a varchar2 variable, it won't compile. Which makes it hard to create anything "dynamic".
    <p>In Forms, you can create and populate a record group dynamically, which is ok as long as your select will not retrieve too many (more than several hundred) rows.
    <p>Or, your other option is to use the Forms Exec_SQL dynamic sql package.

  • Can't see v$session in forms 10g trigger?

    Forms 9.0.4 against 10g database.
    I'm playing around with finding out who has a row locked so I can trap that annoying "could not reserve record" message that just generates calls to me from confused users.
    Anyway in the process of trying different things, I find that when I try to select from v$locked_object or v$session, in either a block level trigger, a program unit or even a library at compile time it fails with "identifier v$locked_object must be declared". It seems forms cannot see the view. I can select from this view just fine via SQL/Plus or Toad with the same ID.
    What gives!? I mean, if I have rights to select from the view why can't I get to it from forms?
    Gary

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4515126525609
    Are you sure you know who locked the record? I created a table and inserted some records. 2 were marked for deletion by 2 separate users and a third user also tried to delete one of those records. Then I ran the first query in the metalink article and couldn't differentiate between the 3 records except for username. The other columns in v$locked_record don't help either.
    On heavily used tables you're unlikely to be able to pick out a particular blocking session so you'll have to resort to telling the users that 'someone' is locking their record. So you'll still get the phone calls. The voodoo doll won't actually help but it might make you feel better about it. A healthy cynicism does the trick just as well.
    As for why forms won't compile, I can't help. I assume you are using the same logon credentials?

  • Not able to create a text file in Client Machine using Forms 10g

    Hi - I'm mot able to create a text file in Client Machine using Forms 10g. I'm getting error when system executes the bolded line.(i.e. CLIENT_TEXT_IO.FOPEN). During run-time system is throwing "ORA-06508: PL/SQL: could not find program unit being called".
    I had attached webutil.pll in the form.
    Please advise me.
    DECLARE
    l_Temp CLIENT_TEXT_IO.FILE_TYPE;
    LC$Name Varchar2(100) ;
    LC$Fic Varchar2(100) ;
    LN$Lines Pls_integer := 0 ;
    LC$Line Varchar2(4000) ;
    Cursor C_CUR Is
    Select * From TEST_TEXTIO where rownum <= 50;
    BEGIN
    LC$Name := 'tmp_file.txt' ;
    LC$Fic := 'c:\temp\tmp_file.txt';
    Begin
    l_temp := CLIENT_TEXT_IO.FOPEN( 'C:\temp\tmp_file.txt', 'W');
    Exception
         when others then
         message( 'OPEN FILE ERROR ' || LC$Fic ||sqlerrm );
         display_error;
         raise form_trigger_failure;
    End ;
    -- Write the lines --
    For Cur In C_CUR Loop
         LC$Line := Cur.CODE || ' -> ' || Cur.COL1 || ',' || Cur.COL2 || ',' || Cur.Col3 ;
         CLIENT_TEXT_IO.PUT_LINE( LF$File, LC$Line ) ;      
         LN$Lines := C_CUR%ROWCOUNT ;
    End loop ;
    -- Close the file --
    CLIENT_TEXT_IO.FCLOSE( LF$File ) ;
    Exception
         When others Then
    message('err='||sqlerrm);message(' ');
    display_error;
    CLIENT_TEXT_IO.FCLOSE( LF$File ) ;      
         Raise ;
    END;
    Thanks.
    Arun

    Hi ,
    i have one Question though its not related to thos question if some could help me it will be really helpful,
    i have created one program to import and export excel to forms vice versa, if the form is attached with webutil its working fine am using ole2.but i have a new idea if i add this program in menu, it can be used for all the forms attched to that menu, i made program also, but problem am facing right now is if the form is not attched with webutil it will not work so is there possiblity to share my webutil from one form to another form ,so i will keep one form as a interface form in that webutil will be attched ,i can share that webutil to all other forms so that all the forms no need to attach webutil again
    if its possible means please suggest some ideas

Maybe you are looking for

  • BOOTMGR Missing during reimage

    Been having trouble with my Satellite P755-S5120 for a while. It would turn off randomly while I was using it, and turn off or restart during boot up. So I backed up my files on an external hard drive and started the process to restore to factory con

  • How can I transfer a photo to Facebook..facebook asks for a filename and I don't know it

    Facebook's browse for photo import requires a filename. I find my Ipod and double-click on photo folders, but can't find a file name. Also all the the pictures, including the one I want to import that are  stored in my ipod do not show up in the fold

  • Blue screen flash then no screen

    During start up. I get a blue screen for about a second then it goes away. I can adjust the brightness and can kinda see something. Please help!

  • Error Installing Citadel ODBC Driver 3.0.9 On Windows XP

    Hello, I am looking to read some data out of a Lookout database which is a Citadel 3 database. I am having an issue installing the Citadel ODBC Driver 3.0.9 on Windows XP (located here: http://www.ni.com/download/citadel-odbc-driver-3.0.9/512/en/). E

  • [Solved] Preview RAW files on Nautilus

    How do I set nautilus to as a preview RAW files? I have since I show the previews, but I not display them. Earlier in Debian and LMDE I can display them Greetings Rafa P.D.: I hope understand this. My english is not very good Last edited by Warper4 (