EBS Form菜单栏增加选项

EBS Form菜单栏增加选项

现象一:在菜单栏的【工具】下增加选项


方法:
1.在Form级触发器When-New-Form-Instance添加选项初始化
Form级app_special.instantiate(‘SPECIAL1′,’<Prompt>’);
2.在Block级触发器Pre_Block中添加启用选项
app_special.enable(‘SPECIAL1′,property_on);
3.在Forms级上添加选项对应触发器SPECIAL1
在Form级上写选项的实际操作代码。

现象二:在菜单栏增加【活动】菜单并在其下增加选项


方法:(以RCVRCVRC.fmb为例)
1.在CUSTOM.pll中添加如下处理,当form为RCVRCVRC.fmb时,则同时加载CRCVRCVRC.pll,且监听各触发器事件

2.添加CRCVRCVRC.pll


3.在package body中首先监听RCVRCVRC.fmb的WHEN-NEW-ITEM-INSTANCE触发器
if (event_name = ‘WHEN-NEW-ITEM-INSTANCE’) then
–添加菜单
app_special2.instantiate(option_name => ‘SPECIAL44′, –添加自定义触发器事件
hint => ‘按类型数量汇总’, –新增选项名称
icon => null,
initially_enabled => false,
separator => null);
end if;
4.在package body增加监听自定义触发器事件SPECIAL44,并书写该事件所做的处理
if event_name = ‘SPECIAL44′ then
–书写该触发器所做的处理操作
–调用FORM
app_navigate.execute(function_name => ‘RCVTXNSUM’,
open_flag => ‘C’,
session_flag => ‘Y’,
other_params => ‘RECEIPT_NUM = “‘ || v_receipt_num || ‘”‘ ||
‘shipment_header_id = “‘ ||
v_shipment_header_id || ‘”‘ ||
‘user_id = “‘ || v_user_id || ‘”‘ ||
‘org_id = “‘ || v_org_id || ‘”‘);
end if;
5.上传编译pll,将上述pll文件上传至$AU_TOP/resource下,然后使用f60gen进行编译
f60gen userid=apps/apps module=$AU_TOP/resource/xxx.pll output_file=$AU_TOP/resource/xxx.plx module_type=library

posted @ 2021-01-13 14:32  shu'sblog  阅读(213)  评论(0编辑  收藏  举报