Oracle ERP最佳技术实践
Forms开发指南
File Ref: 深入浅出Oracle EBS之Forms开发指南.doc (v. DRAFT 1A )
Company Confidential - For internal use only
Doc Ref: <Document Reference Number>
March 27, 2007
基于EBS的Forms开发过程 15 of 125
-- Create/Recreate View
CREATE OR REPLACE VIEW CUX_ORDER_HEADERS AS
SELECT header_id,
org_id,
order_number,
ordered_date,
order_type,
customer_id,
salesrep_id,
price_list_id,
currency_code,
flow_status_code,
description,
creation_date,
created_by,
last_updated_by,
last_update_date,
last_update_login,
program_application_id,
program_id,
program_update_date,
request_id,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
FROM cux_order_headers_all
WHERE nvl(org_id,
nvl(to_number(decode(substrb(userenv('CLIENT_INFO'), 1, 1),
' ',
NULL,
substrb(userenv('CLIENT_INFO'), 1, 10))),
-99)) =
nvl(to_number(decode(substrb(userenv('CLIENT_INFO'), 1, 1),
' ',
NULL,
substrb(userenv('CLIENT_INFO'), 1, 10))),
-99);
2.4.2. 注册表和字段
需要向EBS注册表和字段,这样以后就可通过标准功能设置弹性域、监控表操作。
EXECUTE AD_DD.REGISTER_TABLE('SCF','CUX_ORDER_HEADERS_ALL','T',2,10,40);
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','HEADER_ID',1,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','ORG_ID',2,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','ORDER_NUMBER',3,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','ORDERED_DATE',4,'DATE',9,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','ORDER_TYPE',5,'VARCHAR2',1,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','CUSTOMER_ID',6,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','SALESREP_ID',7,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','PRICE_LIST_ID',8,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','CURRENCY_CODE',9,'VARCHAR2',15,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','FLOW_STATUS_CODE',10,'VARCHAR2',30,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','DESCRIPTION',11,'VARCHAR2',240,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','CREATION_DATE',12,'DATE',9,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','CREATED_BY',13,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','LAST_UPDATED_BY',14,'NUMBER',38,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','LAST_UPDATE_DATE',15,'DATE',9,'N','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','LAST_UPDATE_LOGIN',16,'NUMBER',38,'Y','N');
EXECUTE
AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','PROGRAM_APPLICATION_ID',17,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','PROGRAM_ID',18,'NUMBER',38,'Y','N');
EXECUTE AD_DD.REGISTER_COLUMN('SCF','CUX_ORDER_HEADERS_ALL','PROGRAM_UPDATE_DATE',19,'DATE',9,'Y','N');