PR物料KFF弹出LOV - WHERE条件重写
PROCEDURE event (event_name VARCHAR2)
IS
--
-- This procedure allows you to execute your code at specific events
-- including:
--
-- ZOOM
-- WHEN-NEW-FORM-INSTANCE
-- WHEN-NEW-BLOCK-INSTANCE
-- WHEN-NEW-RECORD-INSTANCE
-- WHEN-NEW-ITEM-INSTANCE
-- WHEN-VALIDATE-RECORD
--
-- Additionally, product-specific events will be passed via this
-- interface (see the Applications Technical Reference manuals for
-- a list of events that are available).
--
-- By default this routine must perform 'null;'.
--
-- Oracle Corporation reserves the right to change the events
-- available through this interface at any time.
--
/* Sample code:
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
-- 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.
if (event_name = 'ZOOM') then
if (form_name = 'DEMXXEOR' and block_name = 'ORDERS') then
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;
-- This is an example of a product-specific event. Note that as
-- of Prod 15, this event doesn't exist.
elsif (event_name = 'OE_LINES_PRICING') then
get_custom_pricing('ORDERS.item_id', 'ORDERS.price');
-- This is an example of enforcing a company-specific business
-- rule, in this case, that all vendor names must be uppercase.
elsif (event_name = 'WHEN-VALIDATE-RECORD') then
if (form_name = 'APXVENDR') then
if (block_name = 'VENDOR') then
copy(upper(name_in('VENDOR.NAME')), 'VENDOR.NAME');
end if;
end if;
else
null;
end if;
end event;
*/
--
-- Real code starts here
--
BEGIN
IF event_name = 'WHEN-NEW-ITEM-INSTANCE'
AND NAME_IN ('system.cursor_item') = 'LINES.ITEM_NUMBER'
THEN
FND_KEY_FLEX.UPDATE_DEFINITION (
BLOCK => 'LINES',
FIELD => 'ITEM_NUMBER',
WHERE_CLAUSE => '1 = 1
AND MTL_SYSTEM_ITEMS_VL.ENABLED_FLAG = ''Y''
AND TO_DATE ( SYSDATE, ''YYYY/MM/DD HH24:MI:SS'') BETWEEN NVL (
TRUNC (
MTL_SYSTEM_ITEMS_VL.START_DATE_ACTIVE),
TO_DATE (
SYSDATE,
''YYYY/MM/DD HH24:MI:SS''))
AND NVL (
TRUNC (
MTL_SYSTEM_ITEMS_VL.END_DATE_ACTIVE),
TO_DATE (
SYSDATE,
''YYYY/MM/DD HH24:MI:SS''))
AND MTL_SYSTEM_ITEMS_VL.SEGMENT1 LIKE :LINES.ITEM_NUMBER || ''%''
AND MTL_SYSTEM_ITEMS_VL.ORGANIZATION_ID = (SELECT OD.ORGANIZATION_ID FROM ORG_ORGANIZATION_DEFINITIONS OD WHERE OD.ORGANIZATION_CODE <> ''MST'' AND OD.OPERATING_UNIT = :PO_REQ_HDR.ORG_ID)
AND ( ( PURCHASING_ENABLED_FLAG = ''Y''
OR NVL (INTERNAL_ORDER_ENABLED_FLAG, ''N'') = ''Y'')
AND NVL (BOM_ITEM_TYPE, 0) NOT IN (1, 2)
AND NVL (OUTSIDE_OPERATION_FLAG, ''N'') = ''N'')
AND MTL_SYSTEM_ITEMS_VL.MRP_PLANNING_CODE = 7 ');
END IF;
END event;
最新文章
- java获取日期之间天数的方法
- Cordova应用程序修改启动画面或者Icon
- AtomineerUtils爆破过程记录
- #ifndef -摘自百度百科
- 《BI那点儿事》数据流转换——数据转换
- UIview 学习与自定义--ios
- 解决xp搜索“文件中的一个字或者词组”失效
- 条件编译用法(#ifndef #define #endif#else)
- UItextField常用方法
- 实现js的类似alert效果的函数
- PowerDesigner跟表的字段加注释
- awk实用技巧
- JS数组常用方法
- XAMPP禁止目录浏览的方法
- 洛谷 P4302 【[SCOI2003]字符串折叠】
- Oracle12c开启scott账户
- Nginx 虚拟主机示例
- ppt 制作圆角三角形
- PHP 操作redis 封装的类 转的
- 《C++程序设计教程——给予Visual Studio 2008》读书笔记3章
热门文章
- Vnc自动登录器(VncManager)v1.3-多国语言绿色版-Release1-20190215
- MySQL 上移/下移/置顶
- (44)zabbix报警媒介:email
- 蓝牙学习 (6) - Play with TI sensorTag (1)
- [php] 表单注意事项
- Python日志(logging)模块,shelve,sys模块
- CodeForces 699C - Vacations
- Java中HashMap底层原理源码分析
- 织梦dedecms自定义表单设置必填项
- 大数据学习——hbase数据库