OPEN FORM CALL FORM NEW FORM and FND FUNCTION EXECUTE

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

OPEN_FORM

when one form invokes another form by executing open_form the first form remains displayed, and operators can navigate between the forms as desired. 

Example:When we invoke a form from OPEN_FORM built-in, we can freely move to calling form and called form.

We have FormA, FormB.
We open the formB from FormA.
OPEN_FOR('FormB');
We can move the focus to FormA and FormB without closing FormB.

CALL_FORM

when one form invokes another form by executing call_form, the called form is modal with respect to the calling form. That is, any windows that belong to the calling form are disabled, and operators cannot navigate to them until they first exit the called form.

Example:When we invoke a form from CALL_FORM built-in, we cannot move to the calling form unless we complete our work in the called form and close it.
We have FormA, FormB.
We open the formB from FormA.
CALL_FORM('FormB');
In this case, when FormB is opened, we have to complete the required work in FormB and have to close FormB before moving the focus to FormA.
We cannot move the focus to FormA unless we close FormB.


NEW_FORM

Exits the current form and enters the indicated form.

The calling form is terminated as the parent form. If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form. Oracle Forms releases memory (such as database cursors) that the terminated form was using. Oracle Forms runs the new form with the same Run form options as the parent form. If the parent form was a called form, Oracle Forms runs the new form with the same options as the parent form.


FND_FUNCTION.EXECUTE

In Oracle Applications Developer's Guide:

...

Always use FND_FUNCTION.EXECUTE to open a new session of a
form. Do not use CALL_FORM or OPEN_FORM. The form function
must already be defined with Oracle Application Object Library and
added to the menu (without a prompt, if you do not want it to appear
in the Navigator).

...

Example from Dev Guide:

The following example contains logic for a Zoom, a product–specific event, and a generic form event.
The Zoom event opens a new session of a form and passes parameter values to the new session. The parameters already exist in the form being opened, and the form function has already been defined and added to the menu (without a prompt, so it does not appear in the Navigator).

PROCEDURE event                (                        event_name VARCHAR2                )IS        form_name      VARCHAR2(30) := name_in(’system.current_form’);        block_name     VARCHAR2(30) := name_in(’system.cursor_block’);        param_to_pass1 VARCHAR2(255);        param_to_pass2 VARCHAR2(255);BEGIN        IF (event_name                 = ’ZOOM’) THEN                IF (form_name          = ’DEMXXEOR’                        AND block_name = ’ORDERS’) THEN                        /* The Zoom event opens a new session of a form and                        passes parameter values to the new session. The                        parameters already exist in the form being opened:*/                        param_to_pass1                                                                                               := name_in(’ORDERS.order_id’);                        param_to_pass2                                                                                               := name_in(’ORDERS.customer_name’);                        fnd_function.execute(FUNCTION_NAME=>’DEM_DEMXXEOR’, OPEN_FLAG=>’Y’, SESSION_FLAG=>’Y’, OTHER_PARAMS=>’ORDER_ID=”’                        || param_to_pass1                        || ’” CUSTOMER_NAME=”’                        || param_to_pass2                        ||’”’);                        /* all the extra single and double quotes account for                        any spaces that might be in the passed values */                END IF;        elsif (event_name = ’MY_PRICING_EVENT’) THEN                /*For the product–specific event MY_PRICING_EVENT, call a                custom pricing routine */                get_custom_pricing(’ORDERS.item_id’, ’ORDERS.price’);        elsif (event_name              = ’WHEN–VALIDATE–RECORD’) THEN                IF (form_name          = ’APXVENDR’                        AND block_name = ’VENDOR’) THEN                        /* In the WHEN–VALIDATE–RECORD event, force the value of                        a Vendor Name field to be in uppercase letters */                        copy(UPPER(name_in(’VENDOR.NAME’)), ’VENDOR.NAME’);                END IF;        ELSE                NULL;        END IF;END event;END custom;




           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/hsghggt/article/details/83907480