首页  ·  知识 ·  生产制造
EBS开发基础知识
网友      编辑:德仔   图片来源:网络
一、例外处理问题 有很多人喜欢在处理exception时,置为'null',应该说这是一个很不好的习惯,如果没有定义特定的ex
一、例外处理问题

有很多人喜欢在处理exception时,置为'null',应该说这是一个很不好的习惯,如果没有定义特定的exception,最起码应该把数据库的错误信息完整的报出来。
错误的写法:
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
正确的写法:
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE(FND_FILE.OUTPUT, SQLCODE);
FND_FILE.PUT_LINE(FND_FILE.OUTPUT, SQLERRM);
END;

二、并发请求的OUTPUT和LOG不分

有的同学在并发请求输出的时候,不知道如何把日志输出出来,其实很简单:
输出到请求的输出:FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'XXXXXXX');
输出到请求的日志:FND_FILE.PUT_LINE(FND_FILE.LOG, 'XXXXXX');
一般情况是把报表的内容输出到OUTPUT,把报表中间的debug逻辑输出到log中。

三、在EBS环境之外运行EBS程序的初始化问题

我们经常会遇到在pl/sql中运行某个视图,不能显示出数据,但是在界面上确有数据,这主要是因为视图是OU屏蔽的,因此需要你在pl/sql中初始化你的身份,初始化的程序如下,这样你就可以在任何pl/sql环境中运行EBS的视图了,例如PO_HEADERS,PO_LINES等
BEGIN
FND_GLOBAL.APPS_INITIALIZE(USER_ID => ,RESP_ID => ,RESP_APPL_ID => );
END;

四、消息的使用,我经常看到有的同学喜欢在FORM中直接使用FND_MESSAGE.DEBUG('xxxxx');来显示错误或提示信息,实际上这是非常不正确的做法。

顾名思及DEBUG是用来调试的,并不是用来进行人机交互的友好的方式,也不符合Oracle的标准用法。
Oracle的标准用法是使用FND_MESSAGE.SET_NAME( APPL_SHORT_NAME,MESSAGE_NAME) ;

一般情况下在FORM中显示出错信息使用以下代码:
FND_MESSAGE.SET_NAME( APPL_SHORT_NAME,MESSAGE_NAME) ;
FND_MESSAGE.ERROR ;

在PACKAGE中显示出错信息一般使用以下代码:
FND_MESSAGE.SET_NAME( APPL_SHORT_NAME,MESSAGE_NAME) ;
APP_EXCEPTION.RAISE_EXCEPTION ;

然后在EBS的应用开发者下定义中文和英文消息,然后提交请求"生成信息"来生成消息,使用这种方式可以适用于多语言和修改人机界面的提示信息,而不用去修改源程序。

五、EBS中客户化表结构的设计原则:

1)必须包括一个主键,并建立相应的序列;
2)建立5个WHO字段,也就是
CREATED_BY NUMBER
CREATION_DATE DATE
LAST_UPDATED_BY NUMBER
LAST_UPDATE_DATE DATE
LAST_UPDATE_LOGIN NUMBER
在FORM中使用属性类:CREATION_OR_LAST_UPDATE_DATE,WHO字段并不会自动地被赋值,必须自己在FORM中编写代码来完成这项工作。
EBS中提供了一个函数FND_STANDARD.SET_WHO,大家只要在FORM的BLOCK级触发器PRE-INSERT/PRE-UPDATE中进行调用即可。

3)对于业务数据表,要考虑建立15个弹性域字段;
4)如果对于需要并发请求处理过的数据表,则需要增加跟踪请求的4个字段
REQUEST_ID NUMBER
PROGRAM_APPLICATION_ID NUMBER
PROGRAM_ID NUMBER
PROGRAM_UPDATE_DATE DATE
5)要考虑这个表是否区分OU和库存组织;

六、在FORM开发中不管是FORM级还是BLOCK级或者ITEM级的TRIGGER,不要把代码直接写到TRIGGER中,要使用PROGRAM UNIT来创建相应的TRIGGER,举例如下:

FORM级和BLOCK级可以按照下面格式在PROGRAM UNIT中创建PACKAGE:
PACKAGE BODY FORM_NAME/BLOCK_NAME IS
PROCEDURE EVENT_HANDLER( EVENT IN VARCHAR2)
IS
BEGIN
IF EVENT = 'WHEN-NEW-FORM-INSTANCE' THEN
XXXXXXXX;
ELSIF EVENT = 'PRE-FORM' THEN
XXXXXXXX;
ELSE
APP_EXCEPTION.INVALID_ARGUMENT('EVENT_HANDLER', 'EVENT', EVENT);
END IF;
END EVENT_HANDLER;
END FORM_NAME/BLOCK_NAME;
ITEM级的可以按照下面的格式:
PACKAGE BODY BLOCK_NAME IS
PROCEDURE ITEM_NAME( EVENT IN VARCHAR2)
IS
BEGIN
IF EVENT = 'WHEN-NEW-ITEM-INSTANCE' THEN
XXXXXXXX;
ELSE
APP_EXCEPTION.INVALID_ARGUMENT('ITEM_NAME', 'EVENT', EVENT);
END IF;
END ITEM_NAME;
END BLOCK_NAME;

七、在EBS如果要使用弹性域或预警等,则必须在EBS注册TABLE及COLUMN。

此注册功能是通过调用AD_DD函数包来实现的:
AD_DD.REGISTER_TABLE 注册TABLE
AD_DD.REGISTER_COLUMN 注册COLUMN
AD_DD.DELETE_TABLE 取消注册TABLE
AD_DD.DELETE_COLUMN 取消注册COLUMN

29 03, 2007

oracle ERP的SQL脚本

库存货位列表.sql
select inventory_location_id,organization_id,description,subinventory_code,segment1 inventory_location_code from MTL_ITEM_LOCATIONSorder by subinventory_code,inventory_location_code

库存会计期间
SELECT STATUS,PERIOD_NAME,PERIOD_NUMBER,PERIOD_YEAR,START_DATE,END_DATE,CLOSE_DATE,REC_TYPE,
ORGANIZATION_ID
FROM ORG_ACCT_PERIODS_V
WHERE ((rec_type = 'ORG_PERIOD' ))
order by END_DATE desc

库存组织列表
select a.organization_id,a.name
FROM hr_all_organization_units a
where a.organization_id>82

事物处理活动列表

select * from mfg_lookups where lookup_type='MTL_TRANSACTION_ACTION'
ORDER BY LOOKUP_CODE

事物处理来源类型列表

SELECT TRANSACTION_SOURCE_TYPE_NAME,DESCRIPTION,VALIDATED_FLAG,
TRANSACTION_SOURCE_TYPE_ID,USER_DEFINED_FLAG,DISABLE_DATE
FROM MTL_TXN_SOURCE_TYPES
WHERE USER_DEFINED_FLAG = 'N'
order by transaction_source_type_name

接收事物处理

SELECT t.po_header_id, t.po_line_id, t.po_release_id,
SUM (DECODE (t.transaction_type,
'DELIVER', t.quantity,
'RETURN TO RECEIVING', DECODE (t.destination_type_code,
'INVENTORY', -t.quantity,
'EXPENSE', -t.quantity,
0
),
'CORRECT', DECODE (t.destination_type_code,
'INVENTORY', t.quantity,
'EXPENSE', t.quantity,
0
),
0
)
) deliver_qtya,
SUM ( t.po_unit_price
* t.currency_conversion_rate
* DECODE (t.transaction_type,
'DELIVER', t.quantity,
'RETURN TO RECEIVING', DECODE
(t.destination_type_code,
'INVENTORY', -t.quantity,
'EXPENSE', -t.quantity,
0
),
'CORRECT', DECODE (t.destination_type_code,
'INVENTORY', t.quantity,
'EXPENSE', t.quantity,
0
),
0
)
) deliver_amount,
SUM (DECODE (t.transaction_type,
'RECEIVE', t.quantity,
'RETURN TO VENDOR', -t.quantity,
'CORRECT', DECODE (t.destination_type_code,
'RECEIVING', t.quantity,
0
),
0
)
) receive_qtya,
SUM ( t.po_unit_price
* t.currency_conversion_rate
* DECODE (t.transaction_type,
'RECEIVE', t.quantity,
'RETURN TO VENDOR', -t.quantity,
'CORRECT', DECODE (t.destination_type_code,
'RECEIVING', t.quantity,
0
),
0
)
) receive_amount,
t.unit_of_measure, rsl.item_id, rsl.item_revision,
rsl.item_description, g.period_year, g.period_number,
rsl.from_organization_id
FROM po.rcv_transactions t,
apps.org_acct_periods_v g,
apps.rcv_shipment_lines rsl
WHERE ( t.transaction_type = 'DELIVER'
OR t.transaction_type = 'RETURN TO RECEIVING'
OR t.transaction_type = 'CORRECT'
OR t.transaction_type = 'RECEIVE'
OR t.transaction_type = 'RETURN TO VENDOR'
)
AND t.organization_id = g.organization_id
AND TO_DATE (TO_CHAR (t.transaction_date, 'YYYY-MM-DD'), 'YYYY-MM-DD')
BETWEEN g.start_date
AND g.end_date
AND g.rec_type = 'ORG_PERIOD'
AND rsl.shipment_line_id = t.shipment_line_id
GROUP BY t.po_header_id,
t.po_line_id,
t.po_release_id,
t.unit_of_measure,
rsl.item_id,
rsl.item_revision,
rsl.item_description,
g.period_year,
g.period_number,
rsl.from_organization_id

接收区数量金额


select
/* commented and added following line for 2245286
nvl( PPP.costing_group_id, 1 ) cost_group_id, */
nvl( PPP.costing_group_id, MP.default_cost_group_id) cost_group_id,
MS.item_id inventory_item_id,
msi.description,msi.segment1,
RCV.po_unit_price item_cost,
MS.to_org_primary_quantity RCVQTY,
MS.to_org_primary_quantity *
( RCV.po_unit_price + CSTPPACQ.get_rcv_tax( RCV.transaction_id ) ) *
nvl( decode( nvl(POLL.match_option,'P'),
'P', CSTPPACQ.get_po_rate( RCV.transaction_id ),
'R', RCV.currency_conversion_rate), 1 ) *
( RCV.source_doc_quantity / RCV.primary_quantity ) RCVVAL,
RCV.po_unit_price,
CSTPPACQ.get_rcv_tax( RCV.transaction_id ) dddd,
POLL.match_option,
CSTPPACQ.get_po_rate( RCV.transaction_id ) fffff,
RCV.currency_conversion_rate,
rcv.currency_code,
rcv.currency_conversion_type,
RCV.source_doc_quantity,
RCV.primary_quantity,
CIC.cost_type_id,
CIC.inventory_asset_flag
from
mtl_supply MS,
cst_item_costs CIC,
rcv_transactions RCV,
po_line_locations_all POLL,
po_lines_all POL,
pjm_project_parameters PPP
,mtl_parameters MP
,inv.mtl_system_items_b MSI /* added for 2245286 */
where
MS.supply_type_code = 'RECEIVING' AND
CIC.organization_id = MS.to_organization_id AND
CIC.inventory_item_id (+) = MS.item_id AND
RCV.transaction_id = MS.rcv_transaction_id AND
RCV.source_document_code not in ('INVENTORY, REQ') AND
POLL.line_location_id = RCV.po_line_location_id AND
POL.po_line_id = RCV.po_line_id AND
PPP.project_id (+) = POL.project_id and
MS.to_organization_id = &P_ORG_ID AND
MP.organization_id = &P_ORG_ID and
ms.item_id = msi.inventory_item_id

order by msi.segment1

接收单列表

SELECT rt.transaction_id, rt.transaction_type rt_transaction_type,
rt.quantity rt_quantity, rt.quantity_billed rt_quantity_billed,
rt.inspection_status_code rt_inspection_status_code,
rt.inspection_quality_code rt_inspection_quality_code,
rt.destination_type_code rt_destination_type_code,
poh.po_header_id,
poh.segment1,
pol.line_num, pol.line_type_id, pol.item_description,
pol.unit_meas_lookup_code, pol.list_price_per_unit, pol.unit_price,
pol.quantity, pol.qty_rcv_tolerance, pol.closed_code, rsh.receipt_num,
rsl.line_num, rsl.quantity_shipped, rsl.quantity_received,
rsl.shipment_line_status_code, rsl.source_document_code,
rsl.destination_type_code, rsl.asn_line_flag
FROM PO.rcv_transactions rt,
PO.rcv_shipment_headers rsh,
PO.rcv_shipment_lines rsl,
PO.po_headers_all poh,
PO.po_lines_all pol
WHERE rsh.shipment_header_id = rt.shipment_header_id
AND rsl.shipment_line_id = rt.shipment_line_id
AND poh.po_header_id(+) = rt.po_header_id
AND pol.po_line_id(+) = rt.po_line_id
AND EXISTS(SELECT * FROM APPS.po_lookup_codes plc1 WHERE plc1.lookup_type = 'RCV TRANSACTION TYPE'
AND rt.transaction_type = plc1.lookup_code)
AND EXISTS(SELECT * FROM APPS.po_lookup_codes plc1 WHERE plc1.lookup_type = 'SHIPMENT SOURCE TYPE'
AND rsh.receipt_source_code = plc1.lookup_code)
AND EXISTS(SELECT * FROM APPS.po_lookup_codes plc1 WHERE plc1.lookup_type = 'RCV DESTINATION TYPE'
AND rt.destination_type_code = plc1.lookup_code)
AND EXISTS(SELECT * FROM APPS.po_lookup_codes plc1 WHERE plc1.lookup_type = 'SHIPMENT SOURCE DOCUMENT TYPE'
AND rt.source_document_code = plc1.lookup_code)

从总帐追溯到接收

SELECT je_header_id, je_line_num, trx_class_name, trx_type_name, trx_number_displayed, trx_date,
comments, doc_sequence_name, doc_sequence_value, acct_line_type_name,
currency_code, entered_dr, entered_cr, accounted_dr, accounted_cr,
taxable_entered_dr, taxable_entered_cr, taxable_accounted_dr,
taxable_accounted_cr, currency_conversion_date,
currency_user_conversion_type, currency_conversion_rate,
third_party_name, third_party_number, third_party_sub_name,
accounting_date, gl_transfer_status_name, transfer_system_name,
gl_transfer_from_to_name, accounting_complete_name,
ae_line_reference, tax_code, accounting_rule_name, tax_exempt_number,
trx_line_type_name, trx_line_number, trx_detail_line_number,
trx_quantity, sales_order_number, salesrep_name, tax_rate,
unit_selling_price, trx_uom, trx_source_name, asset_number,
asset_description, asset_book_type_code, accounting_event_number,
accounting_event_type, accounting_event_type_name,
accounting_line_number, aeh_accounting_error_name,
ael_accounting_error_name, user_je_category_name,
transfer_status_detail_name, application_date,
applied_to_trx_hdr_currency, applied_to_trx_hdr_date,
applied_to_trx_hdr_id, applied_to_trx_hdr_number_c,
applied_to_trx_hdr_number_disp, applied_to_trx_hdr_table,
applied_to_trx_line_number, applied_to_trx_line_type,
applied_to_trx_line_type_name, ar_activity_name,
ar_adjustment_creation_type, ar_adjustment_type, bank_account_name,
bank_statement_doc_seq_id, bank_statement_doc_seq_name,
bank_statement_doc_seq_value, bank_statement_line_number,
bank_statement_number, bom_department_code, bom_department_name,
chargeback_number, cost_element_id, cost_element_name,
distribution_set_name, gl_batch_id, inventory_item_locator_id,
inventory_item_locator_name, inventory_item_revision,
item_description, inventory_organization_code,
inventory_organization_id, cost_type_id, cost_type_name,
mfg_operation_seq_num, payment_cleared_date, payment_date,
payment_deposit_date, payment_number, payment_recon_currency,
po_line_num, po_order_number, po_order_release_num, price_override,
po_order_shipment_num, po_order_distribution_num, po_order_type,
rcv_receipt_num, rcv_shipment_header_id, reversal_comments,
reversal_date, subinventory, trx_hdr_currency, trx_reason_name,
trx_source_type_id, trx_source_type_name, unit_cost, unit_price,
wip_assembly, wip_basis, wip_flow_schedule_number, wip_job_id,
wip_job_name, wip_line_code, wip_line_id, wip_resource_id,
wip_resource_name, wip_resource_seq_num, pa_employee_num,
pa_employee_name, pa_supplier_num, pa_supplier_name, pa_project_num,
pa_project_name, pa_task_num, pa_task_name, pa_ei_ev_org,
pa_nl_resource_org, pa_nl_resource, pa_ei_ev_type, pa_event_num,
pa_quantity, pa_uom, pa_period_date, pa_gl_transfer_date,
pa_customer_number, pa_customer_name, pa_agreement_num,
pa_accrue_thru_date, pa_dri_number, pa_trans_id, pa_line_number,
prvdr_organization_name, recvr_organization_name, prvdr_ou_name,
recvr_ou_name, cc_type_name, cc_proc_method_name, application_id,
asset_id, asset_category_id,
asset_key_ccid, code_combination_id, inventory_item_id,
set_of_books_id, org_id, trx_class, trx_type_n, trx_type_c,
trx_number_n, trx_number_c, doc_sequence_id, trx_hdr_table,
trx_hdr_id, acct_line_type, currency_conversion_type,
third_party_type, third_party_id, third_party_sub_id,
gl_transfer_status, source_table, source_id, ael_table, ael_id,
aeh_accounting_error_code, ael_accounting_error_code, je_category,
trx_line_type, trx_source_id, last_update_date, last_updated_by,
creation_date, created_by, last_update_login, request_id,
program_application_id, program_id, program_update_date,
pa_project_id, pa_view_labor_cost
FROM xla_po_ael_gl_v xla_ael_gl_v
WHERE je_header_id = 1590
AND je_line_num = 419
ORDER BY trx_date, rcv_receipt_num, trx_type_name

从总帐追溯到库存


SELECT je_header_id, je_line_num,trx_class_name, trx_type_name, trx_number_displayed, trx_date,
comments, doc_sequence_name, doc_sequence_value, acct_line_type_name,
currency_code, entered_dr, entered_cr, accounted_dr, accounted_cr,
taxable_entered_dr, taxable_entered_cr, taxable_accounted_dr,
taxable_accounted_cr, currency_conversion_date,
currency_user_conversion_type, currency_conversion_rate,
third_party_name, third_party_number, third_party_sub_name,
accounting_date, gl_transfer_status_name, transfer_system_name,
gl_transfer_from_to_name, accounting_complete_name,
ae_line_reference, tax_code, accounting_rule_name, tax_exempt_number,
trx_line_type_name, trx_line_number, trx_detail_line_number,
trx_quantity, sales_order_number, salesrep_name, tax_rate,
unit_selling_price, trx_uom, trx_source_name, asset_number,
asset_description, asset_book_type_code, accounting_event_number,
accounting_event_type, accounting_event_type_name,
accounting_line_number, aeh_accounting_error_name,
ael_accounting_error_name, user_je_category_name,
transfer_status_detail_name, application_date,
applied_to_trx_hdr_currency, applied_to_trx_hdr_date,
applied_to_trx_hdr_id, applied_to_trx_hdr_number_c,
applied_to_trx_hdr_number_disp, applied_to_trx_hdr_table,
applied_to_trx_line_number, applied_to_trx_line_type,
applied_to_trx_line_type_name, ar_activity_name,
ar_adjustment_creation_type, ar_adjustment_type, bank_account_name,
bank_statement_doc_seq_id, bank_statement_doc_seq_name,
bank_statement_doc_seq_value, bank_statement_line_number,
bank_statement_number, bom_department_code, bom_department_name,
chargeback_number, cost_element_id, cost_element_name,
distribution_set_name, gl_batch_id, inventory_item_locator_id,
inventory_item_locator_name, inventory_item_revision,
item_description, inventory_organization_code,
inventory_organization_id, cost_type_id, cost_type_name,
mfg_operation_seq_num, payment_cleared_date, payment_date,
payment_deposit_date, payment_number, payment_recon_currency,
po_line_num, po_order_number, po_order_release_num, price_override,
po_order_shipment_num, po_order_distribution_num, po_order_type,
rcv_receipt_num, rcv_shipment_header_id, reversal_comments,
reversal_date, subinventory, trx_hdr_currency, trx_reason_name,
trx_source_type_id, trx_source_type_name, unit_cost, unit_price,
wip_assembly, wip_basis, wip_flow_schedule_number, wip_job_id,
wip_job_name, wip_line_code, wip_line_id, wip_resource_id,
wip_resource_name, wip_resource_seq_num, pa_employee_num,
pa_employee_name, pa_supplier_num, pa_supplier_name, pa_project_num,
pa_project_name, pa_task_num, pa_task_name, pa_ei_ev_org,
pa_nl_resource_org, pa_nl_resource, pa_ei_ev_type, pa_event_num,
pa_quantity, pa_uom, pa_period_date, pa_gl_transfer_date,
pa_customer_number, pa_customer_name, pa_agreement_num,
pa_accrue_thru_date, pa_dri_number, pa_trans_id, pa_line_number,
prvdr_organization_name, recvr_organization_name, prvdr_ou_name,
recvr_ou_name, cc_type_name, cc_proc_method_name, application_id,
asset_id, asset_category_id,
asset_key_ccid, code_combination_id, inventory_item_id,
set_of_books_id, org_id, trx_class, trx_type_n, trx_type_c,
trx_number_n, trx_number_c, doc_sequence_id, trx_hdr_table,
trx_hdr_id, acct_line_type, currency_conversion_type,
third_party_type, third_party_id, third_party_sub_id,
gl_transfer_status, source_table, source_id, ael_table, ael_id,
aeh_accounting_error_code, ael_accounting_error_code, je_category,
trx_line_type, trx_source_id, last_update_date, last_updated_by,
creation_date, created_by, last_update_login, request_id,
program_application_id, program_id, program_update_date,
pa_project_id, pa_view_labor_cost
FROM xla_inv_ael_gl_v xla_ael_gl_v
WHERE je_header_id = 1573
AND je_line_num = 1205
ORDER BY trx_date,
trx_number_displayed,
acct_line_type_name,
cost_element_name

从总帐追溯到发票

SELECT je_header_id, je_line_num, trx_class_name, trx_type_name, trx_number_displayed, trx_date,
comments, doc_sequence_name, doc_sequence_value, acct_line_type_name,
currency_code, entered_dr, entered_cr, accounted_dr, accounted_cr,
taxable_entered_dr, taxable_entered_cr, taxable_accounted_dr,
taxable_accounted_cr, currency_conversion_date,
currency_user_conversion_type, currency_conversion_rate,
third_party_name, third_party_number, third_party_sub_name,
accounting_date, gl_transfer_status_name, transfer_system_name,
gl_transfer_from_to_name, accounting_complete_name,
ae_line_reference, tax_code, accounting_rule_name, tax_exempt_number,
trx_line_type_name, trx_line_number, trx_detail_line_number,
trx_quantity, sales_order_number, salesrep_name, tax_rate,
unit_selling_price, trx_uom, trx_source_name, asset_number,
asset_description, asset_book_type_code, accounting_event_number,
accounting_event_type, accounting_event_type_name,
accounting_line_number, aeh_accounting_error_name,
ael_accounting_error_name, user_je_category_name,
transfer_status_detail_name, application_date,
applied_to_trx_hdr_currency, applied_to_trx_hdr_date,
applied_to_trx_hdr_id, applied_to_trx_hdr_number_c,
applied_to_trx_hdr_number_disp, applied_to_trx_hdr_table,
applied_to_trx_line_number, applied_to_trx_line_type,
applied_to_trx_line_type_name, ar_activity_name,
ar_adjustment_creation_type, ar_adjustment_type, bank_account_name,
bank_statement_doc_seq_id, bank_statement_doc_seq_name,
bank_statement_doc_seq_value, bank_statement_line_number,
bank_statement_number, bom_department_code, bom_department_name,
chargeback_number, cost_element_id, cost_element_name,
distribution_set_name, gl_batch_id, inventory_item_locator_id,
inventory_item_locator_name, inventory_item_revision,
item_description, inventory_organization_code,
inventory_organization_id, cost_type_id, cost_type_name,
mfg_operation_seq_num, payment_cleared_date, payment_date,
payment_deposit_date, payment_number, payment_recon_currency,
po_line_num, po_order_number, po_order_release_num, price_override,
po_order_shipment_num, po_order_distribution_num, po_order_type,
rcv_receipt_num, rcv_shipment_header_id, reversal_comments,
reversal_date, subinventory, trx_hdr_currency, trx_reason_name,
trx_source_type_id, trx_source_type_name, unit_cost, unit_price,
wip_assembly, wip_basis, wip_flow_schedule_number, wip_job_id,
wip_job_name, wip_line_code, wip_line_id, wip_resource_id,
wip_resource_name, wip_resource_seq_num, pa_employee_num,
pa_employee_name, pa_supplier_num, pa_supplier_name, pa_project_num,
pa_project_name, pa_task_num, pa_task_name, pa_ei_ev_org,
pa_nl_resource_org, pa_nl_resource, pa_ei_ev_type, pa_event_num,
pa_quantity, pa_uom, pa_period_date, pa_gl_transfer_date,
pa_customer_number, pa_customer_name, pa_agreement_num,
pa_accrue_thru_date, pa_dri_number, pa_trans_id, pa_line_number,
prvdr_organization_name, recvr_organization_name, prvdr_ou_name,
recvr_ou_name, cc_type_name, cc_proc_method_name, application_id,
asset_id, asset_category_id,
asset_key_ccid, code_combination_id, inventory_item_id,
set_of_books_id, org_id, trx_class, trx_type_n, trx_type_c,
trx_number_n, trx_number_c, doc_sequence_id, trx_hdr_table,
trx_hdr_id, acct_line_type, currency_conversion_type,
third_party_type, third_party_id, third_party_sub_id,
gl_transfer_status, source_table, source_id, ael_table, ael_id,
aeh_accounting_error_code, ael_accounting_error_code, je_category,
trx_line_type, trx_source_id, last_update_date, last_updated_by,
creation_date, created_by, last_update_login, request_id,
program_application_id, program_id, program_update_date,
pa_project_id, pa_view_labor_cost
FROM xla_ap_inv_ael_gl_v xla_ael_gl_v
WHERE je_header_id = 1512
AND je_line_num = 2080
ORDER BY trx_hdr_id, accounting_event_number, accounting_line_number

从接收追溯到接收事务

SELECT row_id, creation_date, created_by, last_update_date, last_updated_by,
last_update_login, note_to_receiver, pll_note_to_receiver,
rma_reference, transaction_id, interface_transaction_id,
displayed_trans_type, transaction_type, transact_qty, transact_uom,
transaction_date, item_rev, displayed_dest_type, deliver_to_location,
deliver_to_person, subinventory, receipt_num, displayed_source_type,
order_num, po_release, order_line, po_shipment, supplier,
country_of_origin, supplier_site, source_doc_qty, source_doc_uom,
vendor_item_num, vendor_lot_num, packing_slip, freight_carrier,
bill_of_lading, reason, hazard, un_num, wip_entity_id, wip_line_id,
wip_operation_seq_num, receipt_exception_flag, receiver, source_type,
destination_type_code, item_id, category_id, ship_to_location_id,
locator_id, supplier_id, supplier_site_id, shipment_header_id,
shipment_line_id, req_header_id, req_line_id, po_header_id,
po_line_id, po_line_location_id, po_distribution_id, po_release_id,
shipment_num, displayed_source_doc_code, source_doc_code, item_desc,
routing, comments, attribute_category, attribute1, attribute2,
attribute3, attribute4, attribute5, attribute6, attribute7,
attribute8, attribute9, attribute10, attribute11, attribute12,
attribute13, attribute14, attribute15, currency_code,
currency_conversion_type, currency_conversion_date,
currency_conversion_rate, rate_type_display, oe_order_header_id,
oe_order_num, oe_order_line_id, oe_order_line_num, customer_id,
customer, customer_site_id, inspection_quality_code,
secondary_quantity, secondary_unit_of_measure
FROM rcv_vrc_txs_v
WHERE EXISTS (
SELECT 1
FROM rcv_shipment_lines rsl
WHERE rsl.to_organization_id = 87
AND rcv_vrc_txs_v.shipment_header_id = rsl.shipment_header_id)
AND -1 = -1
AND (rcv_vrc_txs_v.organization_id = 87)
AND (transaction_id = 10939)
ORDER BY transact_qty, displayed_trans_type DESC, transaction_date DESC

从发票追溯到接收

SELECT destination_type_code, distribution_line_number, line_type, amount,
vat_code, tax_code_id, tax_code_override_flag, tax_recovery_rate,
tax_recoverable_flag, tax_recovery_override_flag, accounting_date,
amount_includes_tax_flag, assets_tracking_flag, description,
type_1099, income_tax_region, final_match_flag, quantity_invoiced,
unit_price, po_number, po_line_number, po_line_location_number,
po_distribution_number, receipt_number, project, task, award_id,
expenditure_type, expenditure_organization_name,
expenditure_item_date, pa_quantity, unit_of_measure,
prepay_distribution_id, prepay_number, prepay_dist_number,
prepay_amount_remaining, invoice_includes_prepay_flag, stat_amount,
awt_group_name, awt_creation_method, posted_status_disp,
start_expense_date, merchant_document_number, merchant_name,
merchant_tax_reg_number, merchant_taxpayer_id, merchant_reference,
country_of_supply, ussgl_transaction_code, last_update_date,
creation_date, row_id, accrual_posted_flag,
accts_pay_code_combination_id, assets_addition_flag,
invoice_distribution_id, attribute14, attribute1, attribute10,
attribute11, attribute12, attribute13, attribute15, attribute2,
attribute3, attribute4, attribute5, attribute6, attribute7,
attribute8, attribute9, attribute_category, awt_flag,
awt_gross_amount, awt_group_id, awt_invoice_id, awt_origin_group_id,
awt_tax_rate_id, base_amount, base_invoice_price_variance,
base_quantity_variance, batch_id, cash_je_batch_id, cash_posted_flag,
created_by, dist_code_combination_id, encumbered_flag, exchange_date,
exchange_rate, exchange_rate_type, exchange_rate_variance,
expenditure_organization_id, invoice_id, invoice_price_variance,
je_batch_id, last_updated_by, last_update_login,
line_type_lookup_code, match_status_flag, org_id, other_invoice_id,
packet_id, parent_invoice_id, pa_addition_flag, period_name,
posted_amount, posted_base_amount, posted_flag,
po_accrue_on_receipt_flag, po_code_combination_id,
po_distribution_id, price_var_code_combination_id,
program_application_id, program_id, program_update_date,
project_accounting_context, project_id, quantity_variance,
rate_var_code_combination_id, reference_1, reference_2, request_id,
reversal_flag, set_of_books_id, set_of_books_short_name, task_id,
tax_calculated_flag, ussgl_trx_code_context, invoice_num,
parent_invoice_num, batch_name, income_tax_region_name,
posted_status, je_batch_name, cash_je_batch_name,
chart_of_accounts_id, set_of_books_name, po_header_id, po_line_id,
line_location_id, rcv_transaction_id, unit_meas_lookup_code,
tax_type, matched_uom_lookup_code, parent_reversal_id,
global_attribute_category, global_attribute1, global_attribute2,
global_attribute3, global_attribute4, global_attribute5,
global_attribute6, global_attribute7, global_attribute8,
global_attribute9, global_attribute10, global_attribute11,
global_attribute12, global_attribute13, global_attribute14,
global_attribute15, global_attribute16, global_attribute17,
global_attribute18, global_attribute19, global_attribute20
FROM ap_invoice_distributions_v
WHERE invoice_id = 14653
ORDER BY distribution_line_number,
line_type,
amount,
DECODE (line_type_lookup_code, 'ITEM', 1, 'PREPAY', 3, 'AWT', 4, 2)

标准订单查询


select distinct h.po_header_id, m.segment1, l.item_description, d.quantity_ordered, d.quantity_delivered, d.quantity_billed, d.quantity_cancelled, p.last_name, v.vendor_name, h.comments, l.attribute1 from po.po_headers_all h, po.po_vendors v, po.po_lines_all l, inv.MTL_SYSTEM_ITEMS_B m, hr.per_all_people_f p, po.po_distributions_all d
where h.type_lookup_code = 'STANDARD' and h.approved_flag = 'Y' and h.vendor_id = v.vendor_id and l.po_header_id = h.po_header_id and m.inventory_item_id = l.item_id and h.agent_id = p.person_id and d.po_header_id = h.po_header_id

PO发运与分配


SELECT row_id, created_by, last_update_date, last_update_login,
last_updated_by, po_num, release_num, release_type, revised_date,
bill_to_location_id, agent_id, vendor_site_id, vendor_id,
authorization_status, revision_num, doc_type_name, type_lookup_code,
order_date, approved_date, currency_code, line_num, line_type,
line_type_id, item_id, item_revision, category_id, item_description,
unit_meas_lookup_code, vendor_product_num, contract_num,
shipment_num, distribution_num, need_by_date, price_override,
taxable_flag, matching_type, shipment_type, closed_code, closed_date,
closed_by, po_distribution_id, po_header_id, po_release_id,
po_line_id, line_location_id, set_of_books_id, code_combination_id,
recovery_rate, quantity_ordered, creation_date, quantity_delivered,
quantity_billed, quantity_cancelled, req_distribution_id, online_req,
req_distribution_num, req_num, req_line_num, requisition_header_id,
deliver_to_location_id, deliver_to_person_id, rate_date,
amount_billed, rate, accrued_flag, encumbered_flag,
encumbered_amount, gl_encumbered_date, gl_encumbered_period_name,
gl_cancelled_date, destination_type_code,
destination_organization_id, destination_subinventory, wip_entity_id,
wip_operation_seq_num, wip_resource_seq_num,
wip_repetitive_schedule_id, wip_line_id, bom_resource_id,
budget_account_id, accrual_account_id, variance_account_id,
project_id, task_id, end_item_unit_number, expenditure_type,
expenditure_organization_id, gl_closed_date, accrue_on_receipt_flag,
expenditure_item_date, attribute1, attribute2, attribute3,
attribute4, attribute5, attribute6, attribute7, attribute8,
attribute9, attribute10, attribute11, attribute12, attribute13,
attribute14, attribute15, attribute_category, ussgl_transaction_code,
acceptance_due_date, oke_contract_line_id,
oke_contract_deliverable_id, vmi_flag
FROM po_distributions_inq_v
WHERE ( 245 = agent_id
OR EXISTS (
SELECT 'This employee is in approval path of this doc'
FROM po_action_history poah2
WHERE poah2.employee_id + 0 = 245
AND poah2.object_type_code IN ('PO', 'PA')
AND poah2.object_id = po_header_id)
OR ( ((type_lookup_code = 'STANDARD') AND (release_num IS NULL)
)
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ( ((type_lookup_code = 'PLANNED') AND (release_num IS NULL))
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ( release_type = 'BLANKET'
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ( release_type = 'SCHEDULED'
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ('N' = 'Y')
)
AND -1 = -1
AND (po_header_id = 4827)
AND (po_line_id = 7313)
AND (line_location_id = 7863)
ORDER BY po_header_id DESC,
release_num DESC,
line_num,
shipment_num,
distribution_num

PO行

SELECT row_id, created_by, last_update_date, last_update_login,
last_updated_by, po_num, revised_date, approved_date,
bill_to_location, bill_to_location_id, ship_to_location_id,
ship_to_location, agent_id, vendor_site_code, vendor_site_id,
vendor_name, vendor_id, vendor_contact, authorization_status,
revision_num, doc_type_name, type_lookup_code, order_date,
currency_code, terms_name, ship_via_lookup_code, rate_type,
rate_date, rate, start_date, end_date, blanket_total_amount,
note_to_receiver, confirming_order_flag, quote_vendor_quote_number,
po_header_id, po_line_id, line_type_id, line_type, line_num,
creation_date, item_id, qc_grade, item_revision, category_id,
item_description, unit_meas_lookup_code, base_uom, secondary_uom,
quantity_committed, committed_amount, expiration_date,
allow_price_override_flag, not_to_exceed_price, unit_price, quantity,
base_qty, secondary_qty, un_number_id, un_number, hazard_class_id,
hazard_class, note_to_vendor, quote_num, from_header_id,
quote_line_num, from_line_id, market_price, list_price_per_unit,
unordered_flag, cancel_flag, cancelled_by, closed_by, cancel_date,
cancel_reason, oke_contract_version_id, vendor_product_num,
contract_num, tax_name, type_1099, capital_expense_flag,
negotiated_by_preparer_flag, min_release_amount,
price_type_lookup_code, closed_code, closed_date, closed_reason,
transaction_reason_code, attribute1, attribute2, attribute3,
attribute4, attribute5, attribute6, attribute7, attribute8,
attribute9, attribute10, attribute11, attribute12, attribute13,
attribute14, attribute15, attribute_category, ussgl_transaction_code,
secondary_unit_of_measure, secondary_quantity, preferred_grade,
auction_header_id, auction_display_number, auction_line_number,
bid_number, bid_line_number, acceptance_due_date,
oke_contract_header_id, header_fob_lookup_code,
header_freight_terms_lc
FROM po_lines_inq_v
WHERE ( 245 = agent_id
OR EXISTS (
SELECT 'This employee is in approval path of this doc'
FROM po_action_history poah2
WHERE poah2.employee_id + 0 = 245
AND poah2.object_type_code IN ('PO', 'PA')
AND poah2.object_id = po_header_id)
OR ( type_lookup_code = 'STANDARD'
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ( type_lookup_code = 'PLANNED'
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ( type_lookup_code = 'BLANKET'
AND ( ('PUBLIC' = 'PUBLIC')
OR ( 'PUBLIC' = 'PURCHASING'
AND EXISTS (
SELECT 'this employee is an agent'
FROM po_agents poa
WHERE poa.agent_id = 245
AND SYSDATE BETWEEN NVL
(poa.start_date_active,
SYSDATE
)
AND NVL (poa.end_date_active,
SYSDATE + 1
))
)
OR ( 'PUBLIC' = 'HIERARCHY'
AND
245 IN (
SELECT poeh.superior_id
FROM po_employee_hierarchies poeh
WHERE poeh.employee_id = agent_id
AND poeh.position_structure_id =
NVL ('-1',
-1))
)
)
)
OR ('N' = 'Y')
)
AND -1 = -1
AND (po_header_id = 4825)
ORDER BY po_header_id DESC, line_num

PO行费用

SELECT row_id, created_by, last_update_date, last_update_login,
last_updated_by, po_num, revised_date, approved_date,
bill_to_location, bill_to_location_id, ship_to_location_id,
ship_to_location, agent_id, vendor_site_code, vendor_site_id,
vendor_name, vendor_id, vendor_contact, authorization_status,

18 01, 2007

中文patch 的安装方法

中文patch 的安装方法
第一步::首先要在系统中注册中文语言包
1. 以sysadmin 用户登陆系统,进入Oracle Application manager
2. 进入License Manager,进入Lanaguage 页面
3. 选择simplified Chinese ZHS,点击下一步.
4. 选择主语言,这时也可不先选择zhs,下一步
5. submit 页面,中文语言包已经注册.
以下步骤执行前最好关闭x-windows窗口,在文本方式下执行命令,因为这些命令执行时间较长,占用内存较多,关闭x-window可以节省点内存,加快执行速度,
执行前请确认所有应用服务已关闭,数据库服务打开

第二步修改multilingual tables新打开一终端窗口运行
#source /home/oravis/.app
运行adadmin系统会提示输入应用路径,数据库路径,log文件,system用户密码(manager),APPS密码(apps)一些信息,如果提示的不正确就改正,然后系统弹出一窗口,如果不出来窗口,确认环境变量$AD_TOP是否正确
选择Maintaining Applications Database Entities
选择Maintain multi-lingual tables
系统提示选择执行线程数目,接受默认设置.
系统开始修改multilingual tables

第三步创建一个Patch 目录/Stage11i/patch_top
运行/ora11510/Stage11i/oraNLS/ZHS/Disk1/nls/stage/adcrptop.sh
/Stage11i/patch_top
系统将中文包解压到
/Stage11i/patch_top

第四步进入/Stage11i/patch_top/ZHS/
目录里有两个drv 文件,u11510nls.drv,(第一次安装11i 使用)
u11510uggnls.drv,(升级的11i 使用)
我们使用u11510nls.drv ,将u11510uggnls.drv 更名为
u11510uggnls.bak

第五步:在adadmin中激活维护模式.
cd /ora11510/oracle/visappl/ad/11.5.0/bin/
#./adadminnew
选:
5.Change Maintenance Mode
再选:
1.Enable Maintenance Mode

第六步:运行adpatch,指明u11510nls.drv 的路径和文件名.

第七步:adpatch 会提示输入一些参数;NLS_LANG, Applications System
Name,system 用户密码(manager)等,请按照自己的目录和应用设置确认参数是否正确。

第八步:系统开始安装中文语言包,大约需要15 个小时左右
第九步:在adadmin关闭维护模式,重启Apache。



注: .ora及.app文件的编辑:

#vi /home/oravis/.ora

增加或是检查是否有下面的行:

export LD_ASSUME_KERNEL=2.4.19;

unset USERNAME

. /ora11510/oracle/visdb/9.2.0/VIS_erp.env

(注意”.”后面有个空格,没有这个空格变量文件不会被执行)


#vi /home/oravis/.app

增加或是检查是否有下面的行

export LD_ASSUME_KERNEL=2.4.19;

unset USERNAME

. /ora11510/oracle/visappl/APPSORA.env

(注意”.”后面有个空格,没有这个空格变量文件不会被执行)

R10中文补丁打完后,打开from提示oracle*Terminal文件fmrweb出错.
Oracle EBS — 作者 ayoung @ 21:36
打开from提示oracle*Terminal文件fmrweb出错.
- ayoung 2006.04.09

解决方法:

http://www.itpub.net/showthread.php...686&pagenumber=

biecx :将中文下的fmrweb 文件替换成英文的fmrweb 文件即可
我遇到过,这样应该能解决你的问题

文件所在目录raclevisora8.0.6FORMS60

替换一下frmrwebzhs_utf8.res和fmrwebzhs.res这二个文件就解决问题了

本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读
也许感兴趣的
我们推荐的
主题最新
看看其它的