Calling a Function dynamically in Forms

I need help calling a database function dynamically from a WHEN-NEW-RECORD-INSTANCE trigger in Forms. Does anybody know how to do this??
Thanks

Do you want to perform DDL? If not it is probably better to call the database procedure/function directly, don't forget to handle any potential errors that may be raised.

Similar Messages

  • Call javascript function dynamically

    Can this be done to call Javascript function dynamically? What I mean is suppose I use Javascript to submit form and target the reply to a popup window:
      function cForm() {
         win=window.open('','myWin','toolbars=0');
         document.aForm.q.value='12345';     
         document.aForm.target='myWin';
         document.aForm.submit();
      }I target the form reply to popup window myWin. Suppose the reply body contains some Javascript function doX(). Is it possible to call doX() automatically, after the submit and the reply is loaded on myWin, maybe using some onload event in the popup window?

    On the PopUo Windows BODY onLoad, call the method doX()

  • How to call java function in Oracle forms?

    Hi I am having Oracle 9i with 10g Developer Suite.
    I am new to Oracle forms..
    I had one function in java getDatas()..
    How can I call this function in Oracle Forms..
    Pls help
    Thanks

    Thanks Francois,
    I want to display values from my java code in the Forms..
    For that purpose only i am installing 10g Developer Suite..
    The below is java code..
    public class DBTest {
              public static String callDB(int id,String name){
              String ss="Hai";
              Connection con=null;
              try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("url","id","pwd");
                   Statement st=con.createStatement();
                   System.out.println("Connected...");
              int r=st.executeUpdate("Insert into FORM_TEST VALUES('"+id+"','"+name+"')");
                   if(r==1){
                        ss="Inserted Sucessfully";
                   else{
                        ss="Insertion Failed";
              }catch(final Exception e){
              System.out.println(e);
              return ss;
         public static void main(String[] args) {
              int empid=102;
              String empname="Gilbert";
              String resultStr=callDB(empid,empname);
              System.out.println(resultStr);
    I want to dispaly Inserted or Insertion Failed in Oracle Forms..
    As per Gerd Volberg suggestion, i had placed DBTest.jar in
    E:\DevSuite\forms\java\DBTest.jar
    and in formsweb.cfg the below jar is added..
    archive_jini=frmall_jinit.jar,DBTest.jar
    But in Fomrs Builder-->Program-->Import Java Classes-->Oracle
    org,ice,com and subnodes are available.
    But my jar is not available..
    Is my way is coorect?
    Pls provide soln..
    Thanks

  • Calling a function in a form in PL/SQL

    Hi all,
    i'm workin in Forms ( Oracle 10g) i wonna call a function and i got an error
    this is my code:
    declare
         x number;
         b_min_g number;
         b_max_g number;
    begin
         x := check_overlap(:min_g, :max_g, ex2.min_g, ex2.max_g);
    end;
    ex2 is a table
    i got this error:
    error 357 at line 7, col 14
    table, view or sequence reference 'ex2.min_g' not allowed in this context
    thanks in advance

    one more question:
    Are you using loop through ex2 table records, or cursor?
    or ex2 is also block name --> then use :ex2.min_g, :ex2.max_g
    Tomas

  • Calling a procedure dynamically in forms

    Hi all
    I'm using Oracle 6, is there anyway to call a procedure dynamically, i mean the procedure called differs according to a certain condition. The procedure is local in the form not in the database, how can this be achieved
    Thanks

    Hello,
    user497979 wrote:
    what i want is as the following
    IF cond = 1 THEN
    proc1;
    ELSIF cond = 2 THEN
    proc2;
    ELSIF cond = 3 THEN
    proc3;
    .................. so onWell, i think the way you are showing with IF CONDITION is smart enough to call the procedures. And it will be also easy to understand.
    I'm searching for a way to call the procedure as follows
    proc||cond for exampleBut why? What is the purpose to do like this? Any efficiency or any logical reason?
    Another option You can create one procedure and call the code depend on parameter you pass like
    PROCEDURE MY_PROC(pCond IN NUMBER) IS
    BEGIN
      IF pCond=1 THEN
        -- Do something here...
      ELSIF pCond=2 THEN
       -- Do something here...
      ELSE
       -- Do something here...
      END IF;
    END;And while calling the procedure you can call the procedure by passing the value of pCond upon your requirement like
    MY_PROC(<parameter value>);But still the IF CONDITION exists either you use inside or outside the procedure.
    -Ammad

  • Calling Package Function dynamically using Forms_DDL

    I am trying to write a validation trigger which will validate entries within a text field. It will call a packaged function based on an entry within the Rule form field. As the data within the text field will vary (sometimes numeric, date, text etc), the validation function will also vary accordingly. Example details are shown below (this example will force the entry of a Y or an N):
    FORM FIELDS
    ARG_DEFAULT1 X (This is the parameter to be submitted to the function)
    RULE1 VAL_CHK_0001 (Function to be called).
    FUNCTION CODE
    FUNCTION VAL_CHK_0001 (P1 VARCHAR2) RETURN NUMBER IS
    SQL_RESULT NUMBER;
    ALERT_ID ALERT;
    ALERT_OK NUMBER;
    BEGIN
    IF UPPER(P1) NOT IN ('Y', 'N') THEN
    :GLOBAL.MSG := 'You must enter either "Y" for Yes or "N" for No - please re-enter';
    SQL_RESULT := '1';
    ALERT_ID := FIND_ALERT('VAL_ERROR_ALT');
    SET_ALERT_PROPERTY(ALERT_ID, TITLE, 'Validation Error');
    SET_ALERT_PROPERTY(ALERT_ID, ALERT_MESSAGE_TEXT, :global.msg);
    ALERT_OK := SHOW_ALERT(ALERT_ID);
    RAISE FORM_TRIGGER_FAILURE;
    RETURN SQL_RESULT;
    ELSE
    SQL_RESULT := '0';
    RETURN SQL_RESULT;
    END IF;
    END VAL_CHK_0001;
    VALIDATION TRIGGER CODE (CURRENT)
    DECLARE
    PKG_RUN VARCHAR2(200);
    BEGIN
    IF :PARAMETER_BK.RULE1 IS NOT NULL THEN
    PKG_RUN := ENV_VALIDATE_PKG.VAL_CHK_0001(:PARAMETER_BK.ARG_DEFAULT1)):
    FORMS_DDL(PKG_RUN);
    END IF;
    END;
    When the Rule1 field data is hard coded in (as shown above), it all runs fine and the Alert box is displayed as expected.
    I need the function name to refer to the rule1 parameter (and not a specific value) as shown below:
    PKG_RUN := 'ENV_VALIDATE_PKG.'||:PARAMETER_BK.RULE1||'('||:PARAMETER_BK.ARG_DEFAULT1||')';
    The form compiles without any errors but when the trigger runs, it completely ignores the Forms_ddl call and does nothing.
    I have hunted through this forum, Metalink, Ask Tom etc and have had no success in finding any solution. I have followed the instructions within NOTE:1017160.6 (How to programmatically call a procedure or function using Oracle Forms) which has got me this far. Nothing that I have read so far has suggested that what I am attempting to do is impossible.
    We are using Oracle Forms 10G with an Oracle 9.0.4 database.
    Any suggestions or advice will be greatly received!
    Thanks

    Like the others have said, Forms_DDL is a one-way street. You can only pass values to it, nothing can be returned. But you could probably get Forms_DDL to work if you wrote your validations as stored procedures that had only IN parameters. Then if the edit ran ok, just terminate normally, but if there is an edit error, to a Raise_application_error.
    Then you could use Forms_DDL to call the procedure, and check for Form_Success after the call. If it failed, you might be able to retrieve the error message from the Raise_application_error by checking SQLERRM. But that is completely untested, so I do not know whether it would work.
    The more sure method would be to call a package procedure on the database that calls Execute_Immediate, and then returns the result back to the calling form.
    Now a little advice: For generic routines such as this, pass dates and numbers as text, and you could cut down on the number of procedures you need to create and use.
    And last note: Do NOT define numeric variables, like SQL_Result, and then set the value using quotes. You are forcing the PL/SQL process to convert text to number. Always set numeric values like this:
    SQL_Result := 1;
    Now the question I am almost afraid to ask: What problem are you solving by creating these generic edit routines? I am wondering if you could just as easily write simple edit processes faster. ...the only way to completely parameterize editing would be to call a process on the database for each column value, passing the column name and value.

  • How to call javaScript function in the form from Action:Tab buttion in workspace

    Hi,
    I want to trigger JavaScript function that I have written in form from Action: buttons in workspace user's account.
    Is there any way that if i hit a button on action bar, it fire a javascript function.
    Reason is: I dont want to place button on the form to perform any action on the form. I want to take control of the form from these buttons. Like submit, edit a form, etc, etc..
    Please let me know if i couldnt explain it properly.
    regards
    Sunil

    Sunil, you want to look at the "Customizing the LiveCycle® Workspace ES User Interface" document at http://help.adobe.com/en_US/livecycle/9.0/customizeworkspaceui.pdf.  The workspace is a Flash component.  For ES4 there's an option to run the workspace in HTML5 which might be more productive long-term.

  • Dynamic call to Function module.

    Hi
    In one of the program, we have found a FM ' rfc_update_taxes_doc', and which does not has any code,
    but what i think that this Fm is called dynamically from some prog and is calling external system.
    As it has 'targt server' in importing parameters.
    So can anybody tell me if this is the way we call to External system.
    And please if anyone can tell me the real meaning of calling a Fm dynamically.
    Please dont provide links.
    Thanks and Regards
    Manu

    Hi Manu,
    You can try with this example. I connect Bussiness system with R/3 system,  because I need  R/3 table in Bw system.
    IF SY-SYSID EQ 'BWD'. "SYSID = Name sap system
        D_DESTINATION = 'DESD47020'.
      ELSEIF SY-SYSID EQ 'BWC'.
        D_DESTINATION = 'DESW47420'.
      ELSEIF SY-SYSID EQ 'BWP'.
        D_DESTINATION = 'DESP47420'.
      ENDIF.
      CAMPOS-FIELDNAME = 'MANDT'.
      CAMPOS-OFFSET = '000000'.
      CAMPOS-LENGTH = '000003'.
      CAMPOS-FIELDTEXT = 'Mandant'.
      APPEND CAMPOS.
      CLEAR CAMPOS.
      CAMPOS-FIELDNAME = 'BUKRS'.
      CAMPOS-OFFSET = '000004'.
      CAMPOS-LENGTH = '000004'.
      CAMPOS-FIELDTEXT = 'Society'.
      APPEND CAMPOS.
      CLEAR CAMPOS.
      CALL FUNCTION 'RFC_READ_TABLE' DESTINATION D_DESTINATION
        EXPORTING
          QUERY_TABLE                = 'TZBZ'
    *   DELIMITER                  = ' '
    *   NO_DATA                    = ' '
    *   ROWSKIPS                   = 0
    *   ROWCOUNT                   = 0
        TABLES
          OPTIONS                    = OPTIONS1
          FIELDS                     = CAMPOS
          DATA                       = DATOS
    * EXCEPTIONS
    *   TABLE_NOT_AVAILABLE        = 1
    *   TABLE_WITHOUT_DATA         = 2
    *   OPTION_NOT_VALID           = 3
    *   FIELD_NOT_VALID            = 4
    *   NOT_AUTHORIZED             = 5
    *   DATA_BUFFER_EXCEEDED       = 6
    *   OTHERS                     = 7
    That's all.
    About the real meaning of calling a FM dynamically could be something like that because
    you can generate the call dynamically to just call with the needed parameters (you can change
    the parameters).
    types: begin of s_codigo,
    Lines type string,
              End of s_codigo.
    Data: it_codigo type standard table of s_codigo with header line.
    APPEND 'Title.' TO it_codigo.
    APPEND 'form Calculate_sum.' TO it_codigo.
    APPEND 'call function ''RFC FUNCTION ''' TO it_codigo.
    APPEND 'destination ''D_DESTINATION''' TO it_codigo.
    APPEND 'exporting PARAM1 = ''2''' TO it_codigo.
    APPEND 'PARAM2 = IT_TABLE ' TO it_codigo.
    APPEND 'importing PARAM_I1 = RESULT.' TO it_codigo.
    APPEND 'endform.' TO it_codigo.
    DATA prog_name LIKE sy-cprog.
    DATA resultado(1) TYPE c.
    GENERATE SUBROUTINE POOL it_codigo NAME prog_name.
    PERFORM Calculate_sum IN PROGRAM (prog_name) CHANGING nok.
    Best regards .
    Ana

  • Calling a pl/sql function from oracle forms

    I have written a pl/sql function in a package.
    package name- sup
    function name - func
    I have written a when-button-pressed trigger .from here I want to call this function.
    How can I do that?
    Please help..

    Thanks a lot..
    User may select 20-30 check boxes for respective name & id...then at the end , user will hit OK...from here when-button-click will call a procedure....that will update/insert/delete a table data.The procedure I have written is:-
    DECLARE
    N_CNT Number(1);
    D_SYSDATE Constant date :=sysdate;
    Begin
    select count(1)
    into N_CNT
    from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    if ((N_CNT = 0) and (:LANDLISTE.state = 'A')) then
    insert into dbtable
    LAND_ID,
    STATE,
    suppl_prof_id,
    suppl_id,
    OPERATOER_ID,
    SIDST_OPD_DATO,
    SIDST_OPD_INIT
    values
    :BLK1.LAND_ID,
    'Y',
    :BLK1.suppl_prof_id,
    :BLK1.suppl_id,
    :BLK1.Operatoer_id,
    D_SYSDATE,
    :BLK1.SIDST_OPD_INIT
    elseif
    ((N_CNT>0 )and (:LANDLISTE.state = 'A')) then
    update dbtable L
    set L.SIDST_OPD_DATO = D_SYSDATE,
    L.SIDST_OPD_INIT = :BLK1.SIDST_OPD_INIT
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    elseif ((N_CNT>0 ) and (:LANDLISTE.state = 'D')) then
    delete from dbtable L
    where L.land_id = :BLK1.LAND_ID and
    L.Operatoer_id = :BLK1.Operatoer_id and
    L.suppl_id = :BLK1.suppl_id and
    L.suppl_prof_id = :BLK1.suppl_prof_id;
    end if;
    end;
    Will it be able to load multiple data(20-30 at a time) to the table?
    Should I write anything to commit the data in the table?
    I am very new to oracle forms...please help..

  • Call a function with tables in a FORM

    Hi all,
    I am currently willing to create a FORM that would call a function (which has a table in its parameters).
    In the form, I modify the fields of this table, and then I call the function.
    I put the table in the FORM parameters (either 'USING' or 'TABLES').
    Problem is: the syntax check keeps on telling me that my internal table is not correctly defined (missing the statement 'OCCURS 0') and won't compile.
    I tried to add this statement 'OCCURS 0', even 'WITH HEADER LINE', but I cannot make it work.
    Can anyone help ?
    Thx a lot.
    Isa.

    Hi,
    Declare a Ztable inside the form of the type declared in the FM with a header line.Assign the fields that u require to pass through the table and append to this Ztable.
    Now pass this Ztable to the parameters of the FM.
    This should help u out...
    Mark useful answers...

  • How to call userdefined java script function in Oracle Forms 11g.

    Hi,
    I Created a java script contain a function, that will open and close the browser for some URL.
    CODE:-(webclose.jp)
    *function manageWindows() {*
    var windows = [], i = 0;
    var url =  "htttp://oracle:64578/xmlpserver/login.jsp?Go&id=admin&passwd=admini";
    *if (url.length) {*
    *windows[i] = window.open(url, ' tabWindow_'+i);*
    i++;
    *winows[i-1].close();*
    *delete windows[i-1];*
    return false;
    *}* Then i placed the javascript file in path <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\_WL_user\formsapp_11.1.1\e18uoi\war\
    After that i called the javascript function in to forms as
    WEB.JAVASCRIPT_EVAL_EXPR('webclose.manageWindows();');
    When running the form it showing error
    FRM-92190: JavaScript is unable to evaluate expression.
    If anybody knows pls help me.

    Always post code snippets in &#123;code&#125; tags as explained in the FAQ.
    I Created a java script contain a function, that will open and close the browser for some URL.
    CODE:-(webclose.jp)
    function manageWindows() {
    var windows = [], i = 0;
    var url = "htttp://oracle:64578/xmlpserver/login.jsp?Go&id=admin&passwd=admini";
    if (url.length) {
    windows = window.open(url, ' tabWindow_'+i);
    i++;
    winows[i-1].close();
    delete windows[i-1];
    return false;
    } Then i placed the javascript file in path <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\_WL_user\formsapp_11.1.1\e18uoi\war\
    After that i called the javascript function in to forms as
    WEB.JAVASCRIPT_EVAL_EXPR('webclose.manageWindows();');
    When running the form it showing error
    FRM-92190: JavaScript is unable to evaluate expression.
    If anybody knows pls help me.>
    This error has nothing to do with Forms, it is an JavaScript error.
    Most likely cause is this line
    if (url.length) {url.length returns a Whole number and so the conditions would be
    if (url.length > 0) {Or
    if (url) {  // not null checkCheers,

  • How to call a function module dynamically?

    Hi
    I am doing a smartform development and here my scenario.
    <b>Scenario:</b>
    There will be a simple report which will trigger a smartform output. The report has a selection screen and and in one of the field the user will enter the layout name or the layout name will be stored in the variant so that the user need not remember the layout name.
    Based on the layout selected i need to show the output.
    <b>What i have coded:</b>
    In my program after selecting the data i am calling the FM SSF_FUNCTION_MODULE_NAME which will return the function module name to be called.
    <b>Question:</b>
    How do i call the function module dynamically. I cannot do a single call to the function module using the FM name derived from the above function call. I want to make the interface calling dynamic. We dont want to hardcode the function calls coz we may have many layouts to be called so how is it possible in SAP to call the FM interface dynamically.
    ~Suresh

    Actually you can call the FM dynamically in by taking it into one variable and than use the CALL FUNCTION V_FM_NAME.
    But the problem here is, you need to take care about the importing, exporting and tables parameters. They needs to be same for all FMs which you are planning to call. Otherwise system will give you a run time error.
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING  FORMNAME           = LF_FORMNAME
    *                 variant            = ' '
    *                 direct_call        = ' '
             IMPORTING  FM_NAME            = LF_FM_NAME
             EXCEPTIONS NO_FORM            = 1
                        NO_FUNCTION_MODULE = 2
                        OTHERS             = 3.
          CALL FUNCTION LF_FM_NAME
               EXPORTING
                          ARCHIVE_INDEX        = TOA_DARA
                          ARCHIVE_PARAMETERS   = ARC_PARAMS
                          CONTROL_PARAMETERS   = LS_CONTROL_PARAM
    *                 mail_appl_obj        =
    *                     mail_recipient       = ls_recipient
                          MAIL_SENDER          = LS_SENDER
    Regards,
    Naimesh Patel

  • How do i call a function in a library package in a form 6i ?

    Hi guys can any help me ?
    This is the decalred part of my function in the package specification named SECURITY_NEW:
    ==================================================
    FUNCTION LOGON_AUTH ( P_user_id IN users_codes.USE_ID%TYPE,
    P_password IN users_codes.use_pass%TYPE,
    P_allow OUT BOOLEAN )
    RETURN BOOLEAN;
    i called it in a form like that:
    ====================
    SECURITY_NEW.LOGON_AUTH ( V_USER_ID ,
    V_PASSWORD ,
    V_EXIST );
    This gives me error LOGON_AUTH is not a procedure or is undefined
    can any help me in calling the function..?
    Thanks in advance..
    Abdetu.
    -----------------------------------------------------------------------------------------------------------------------

    oh, overseen the other problem:
    PL/SQL variables can be accessed like this
    V_VALUE := 'TEST';
    if V_VALUE = 'TEST' then
    the parameters of the procedure/function can also be accessed like this (note: don't forget the restrictions of IN/OUT/IN OUT)
    global variables, forms-parameters, items can be accessed via copy, name_in and default_value
    e.g.:
    default_value('TEST', 'global.testvariable')
    initializing :global.testvariable with 'TEST' if it is not initialized; if :global.testvriable has already a value, this will not set the value of the variable
    to set the global variable, you use the copy just like the default_value built in:
    copy('TEST2', 'global.testvariable')
    if you apply now another default_value call, this call results in no change of the variable:
    default_value('TEST', 'global.testvariable')
    the variable :global.testvariable is still at the value 'TEST2'
    to access it, you use the name_in built in:
    if name_in('global.testvariable') = 'TEST2' then
    this also works for forms-parameters and items:
    name_in('parameter.test')
    or
    name_in('block3.item4');
    so in your case, it seems that you are trying to assign an IN variable...that's not possible.
    e.g.:
    procedure testproc(ibBoolValue in boolean) is
    begin
    ibBoolValue := false;
    end;
    => this is resulting in an error, as you try to assign a value to an in-parameter...
    procedure testproc(obBooleanValue out boolean) is
    begin
    obBoolValue := false;
    end;
    => this works; but as this is an out-parameter calls like:
    testproc(true); will not work, as "false" cannot be used as an assigment target...
    try this:
    declare
    bBool boolean;
    begin
    bBool := true;
    testproc(bBool);
    end;
    => this will work, but as it is an out parameter, the boolean value will be set to null when entering the procedure, and after the procedure bBool will be false.
    last case IN OUT:
    procedure testproc(iobBooleanValue in out boolean) is
    begin
    iobBooleanValue := nvl(iobBooleanValue, false);
    if iobBooleanValue then
    iobBooleanValue := false:
    else
    iobBooleanValue := true;
    end;
    when calling like this:
    declare
    bBoolVal boolean;
    begin
    bBoolVal := false;
    testproc(bBoolVal);
    end;
    bBoolVal will be true after the call of testproc and vice versa when bBoolValue is true
    also like in the OUT parameter Sample, calls like:
    testproc(true);
    will result in a compile-error, as "true" is also no target...
    so everything shortly:
    if you want to access forms-parameters, globals or items, use copy, name_in, default_value (as in librarys :block3.item4 := 'asdf'; will result in an error)
    if you want to access variables it's just straight like in forms-packages...
    Just take a look at the Online-Help; this is all well-documented.
    regards
    Christian

  • Calling javascript function from report customization form

    I have been unable to call any user-defined javascript function from Portal Report Customization forms.
    Even a simple Message Box function doesn't work. I've been placing my code in the ..after header PL/SQL section for the report customization form.
    htp.p('<script type="javascript">');
    htp.p('function MsgBox(message){');
    htp.p('alert(message);}');
    htp.p('</script>');
    htp.p('See if it works');
    I have verified in plain html that my syntax is fine. Even the syntax rendered by portal is correct:
    <script type="javascript">
    function MsgBox(message){
    alert(message);}
    </script>
    See if it works
    Despite this, you will get a javascript error that an Object is expected, MsgBox not defined. Clearly from the script above MsgBox is defined.
    I have tried any number of calls to user defined functions and can't get anything to work. However, calling native functions like 'alert' works fine ( ie
    See if it works
    Anyone know how I can call a user defined javascript function in a Portal Report Customization form?

    Try changing the code
    htp.p('<script type="javascript">');
    to
    htp.p('<script language="javascript">');
    Thanks
    -Krishnamurthy

  • Dynamically call different functions inside a function

    Hi there,
    I was wondering if it is possible to dynamically define the function that you want to call. Almost like passing the function name that i want to call as a parameter.
    I am calling a function, but do not want to hardcode the function I am calling. I have different functions that all return a boolean value, and i want to call all of them at different times through the same procedure/function.
    Is this possible???
    Thank you in advance!
    Tanja

    Or combine your functions to use function overloading, then you can use the same name...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package mypk as
      2    FUNCTION gen_function (param1 IN NUMBER, param2 IN NUMBER) RETURN BOOLEAN;
      3    FUNCTION gen_function (param1 IN VARCHAR2, param2 IN VARCHAR2) RETURN BOOLEAN;
      4    FUNCTION gen_function (param1 IN BOOLEAN, param2 IN BOOLEAN) RETURN BOOLEAN;
      5    PROCEDURE test;
      6* end;
    SQL> /
    Package created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package body mypk as
      2    FUNCTION gen_function (param1 IN NUMBER, param2 IN NUMBER) RETURN BOOLEAN IS
      3    BEGIN
      4      RETURN (param1*2) = param2;
      5    END;
      6    FUNCTION gen_function (param1 IN VARCHAR2, param2 IN VARCHAR2) RETURN BOOLEAN IS
      7    BEGIN
      8      RETURN param1 = param2;
      9    END;
    10    FUNCTION gen_function (param1 IN BOOLEAN, param2 IN BOOLEAN) RETURN BOOLEAN IS
    11    BEGIN
    12      RETURN NOT(param1) = param2;
    13    END;
    14    PROCEDURE test IS
    15    BEGIN
    16      IF gen_function(1,2) THEN
    17        DBMS_OUTPUT.PUT_LINE('Test1: True');
    18      ELSE
    19        DBMS_OUTPUT.PUT_LINE('Test1: False');
    20      END IF;
    21      IF gen_function('Fred','John') THEN
    22        DBMS_OUTPUT.PUT_LINE('Test2: True');
    23      ELSE
    24        DBMS_OUTPUT.PUT_LINE('Test2: False');
    25      END IF;
    26      IF gen_function(TRUE,FALSE) THEN
    27        DBMS_OUTPUT.PUT_LINE('Test3: True');
    28      ELSE
    29        DBMS_OUTPUT.PUT_LINE('Test31: False');
    30      END IF;
    31    END;
    32* end;
    SQL> /
    Package body created.
    SQL> exec mypk.test;
    Test1: True
    Test2: False
    Test3: True
    PL/SQL procedure successfully completed.
    SQL>;)

Maybe you are looking for

  • Windows Deployment Services PXE Installation of Windows 10 Preview and Server vNext Technical Preview Failed

    The automated answer file associated with Windows 10 Enterprise Technical Preview x64 (9481) and the Windows Server Technical Preview x64 (9841) seem to be incompatible. No problem adding both wim files to WDS, this completes without issue. When tryi

  • Rejection text

    Hi all, i have done the Travel Expenses workflow, in that one step is there "Reject the Travel request" i have SOFM and compose method so approver can write the own text ...and mail will go to Workflow Initator my requirement is    in "Title line of

  • How to usa flash media with iWeb?

    I'm trying to build a nice .Mac website, but I'm having problems using flash files. Does anyone have an answer to this problem? Or will Apple need to update their iWeb software to include this feature? Mac Mini   Mac OS X (10.4.6)  

  • How to scale image to A3 size in adobe reader XI

    Hi there, Im having trouble trying to find out how to scale an image to fit onto an A3 sixe paper. I tried the fit command but it doesnt 'fit' the image to A3 size. Any help would be appreciated. Tamika

  • Error in application based on OAF

    Hi, we use EBS 11.5.10.2 and RDBMS 10.2, have a web application based in OAF, after oracle ondemand installed a series of patches we're getting next error in our screens: ViewObject attribute (ResultsToDisplay) not found; ViewUsageName: (XxMcanRowsRe