OPEN FORM CALL FORM NEW FORM and FND FUNCTION EXECUTE

本文深入解析了 Oracle Forms 中的 OPEN_FORM、CALL_FORM 和 NEW_FORM 的使用方式及区别,通过实例展示了如何在不同场景下选择合适的控制流程,以及如何使用 FND_FUNCTION.EXECUTE 打开新的表单会话。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/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.youkuaiyun.com/jiangjunshow
这里写图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值