您的当前位置:首页正文

EBS_AR模块API导入总结

2024-04-06 来源:尚佳旅游分享网


Oracle ERP最佳技术实践 E-BUSINESS SUITE

ORACLE 技术总结之应收导入IFACE总结

Author: E-Mail

Creation Date: Version:

Approvals:

Updated:

Ref:

罗正武

DRAFT 1A 、Version 2

Copy Number _____

Document Control

Change Record

Reviewers

Distribution

2

Date Author Version Change Draft No Previous Document 1a

Name Position

Copy No. Name Location 1 2 3 4

Note To Holders:

If you receive an electronic copy of this document and print it out,

please write your name on the equivalent of the cover page, for document control purposes.

If you receive a hard copy of this document, please write your name on the front cover, for document control purposes.

Contents

Document Control ....................................... 错误!未定义书签。 背景介绍 .............................................. 错误!未定义书签。 1 应收基础简介......................................... 错误!未定义书签。

模块简介 ............................................... 错误!未定义书签。 主要功能和作用 ......................................... 错误!未定义书签。 和其他模块的关系 ....................................... 错误!未定义书签。 关键设置 ............................................... 错误!未定义书签。

2 应收事务处理......................................... 错误!未定义书签。

应收事务处理概述 ....................................... 错误!未定义书签。 API创建应收事务处理/贷项通知单 ......................... 错误!未定义书签。 手工录入应收事务处理简介................................ 错误!未定义书签。 相关表/重点掌握API ..................................... 错误!未定义书签。

3 应收收款/收款注销 .................................... 错误!未定义书签。

. 应收收款概述 ........................................... 错误!未定义书签。 . API创建应收收款/收款注销 ............................... 错误!未定义书签。 . 应收收款录入/收款注销创建简介 ........................... 错误!未定义书签。 . 相关表/重点掌握API ..................................... 错误!未定义书签。

4 应收核销/取消核销 .................................... 错误!未定义书签。

. 应收收款核销简介 ....................................... 错误!未定义书签。 . API创建应收收款核销/取消核销 ........................... 错误!未定义书签。 . 应收收款录入创建简介 ................................... 错误!未定义书签。 . 相关表/重点掌握API ..................................... 错误!未定义书签。

5 应收调整 ............................................ 错误!未定义书签。

. 应收调整概述 ........................................... 错误!未定义书签。 . API创建调整 ............................................ 错误!未定义书签。 . 应收调整创建简介 ....................................... 错误!未定义书签。 . 相关表/重点掌握API ..................................... 错误!未定义书签。

6 常用函数 ............................................ 错误!未定义书签。 7 参考文档 ............................................ 错误!未定义书签。 1.

Open and Closed Issues for this Deliverable ..... 错误!未定义书签。 Open Issues ........................................ 错误!未定义书签。 Closed Issues ...................................... 错误!未定义书签。

背景介绍

目前项目是中国邮政,现接触到一个应收的大接口,涉及到收款/收款注销,核销/取消核销,应收事务处理发票/贷项通知单,事务处理调整导入标准的.收获颇丰,写个文档记录一下.

1 应收基础简介

模块简介 应收模块基本简介

主要功能和作用

标准应收的主要功能和作用:

和其他模块的关系

标准的应收和其他模块的关系:

关键设置

应收的关键设置作用:我们在调用标准api导入的时候,如果出现设置错误我们可以从以下设置来检查,典型的排错方式就是在标准界面录入导入数据检测问题 应收关键设置列表:

2 应收事务处理

应收事务处理概述

API创建应收事务处理/贷项通知单

注:脚本中涉及到的所有id根据当前中邮项目的设置的映射规则取值.

应收事务处理

--简单导入发票应收事务处理测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date

DECLARE

g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts';

l_api_name CONSTANT VARCHAR2(30) := 'transaction_prc'; l_api_version CONSTANT NUMBER := ; p_commit BOOLEAN := FALSE; l_batch_source_rec ; l_trx_header_tbl ; l_trx_lines_tbl ; l_trx_dist_tbl ; l_trx_salescredits_tbl ;

x_return_status VARCHAR2(60); x_msg_count NUMBER;

x_msg_data VARCHAR2(32676); x_customer_trx_id NUMBER; l_org_id NUMBER; BEGIN

-- start activity to create savepoint, check compatibility ;

(user_id => 1291, resp_id => 20678, resp_appl_id => 222); l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

:= 6001;

l_trx_header_tbl(1).cust_trx_type_id := 1221; l_trx_header_tbl(1).trx_header_id := 100; l_trx_header_tbl(1).trx_date := SYSDATE; l_trx_header_tbl(1).gl_date := SYSDATE; l_trx_header_tbl(1).trx_currency := 'CNY'; l_trx_header_tbl(1).bill_to_customer_id := 39211; l_trx_header_tbl(1).term_id := 5; -- l_trx_header_tbl(1).org_id := l_org_id;

l_trx_lines_tbl(1).trx_header_id := 100; l_trx_lines_tbl(1).trx_line_id := 100; l_trx_lines_tbl(1).line_number := 1;

l_trx_lines_tbl(1).description := nvl(NULL, '摘要'); l_trx_lines_tbl(1).quantity_invoiced := 1; l_trx_lines_tbl(1).unit_selling_price := 100; l_trx_lines_tbl(1).line_type := 'LINE';

l_trx_dist_tbl(1).trx_dist_id := 100; l_trx_dist_tbl(1).trx_header_id := 100; l_trx_dist_tbl(1).trx_line_id := 100; l_trx_dist_tbl(1).account_class := 'REV'; l_trx_dist_tbl(1).amount := 100; l_trx_dist_tbl(1).acctd_amount := 100; l_trx_dist_tbl(1).percent := 100;

l_trx_dist_tbl(1).code_combination_id := 3000;

l_trx_dist_tbl(2).trx_dist_id := 100; l_trx_dist_tbl(2).trx_header_id := 100;

--l_trx_dist_tbl(2).trx_line_id := 100; l_trx_dist_tbl(2).account_class := 'REC'; l_trx_dist_tbl(2).amount := 100; l_trx_dist_tbl(2).acctd_amount := 100; l_trx_dist_tbl(2).percent := 100;

l_trx_dist_tbl(2).code_combination_id := 3000; ('bf_x_customer_trx_id:' || x_customer_trx_id); (p_api_version => ,

p_init_msg_list => , p_commit => ,

p_batch_source_rec => l_batch_source_rec, p_trx_header_tbl => l_trx_header_tbl, p_trx_lines_tbl => l_trx_lines_tbl, p_trx_dist_tbl => l_trx_dist_tbl,

p_trx_salescredits_tbl => l_trx_salescredits_tbl, x_customer_trx_id => x_customer_trx_id, x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data); ('af_x_customer_trx_id:' || x_customer_trx_id || '--x_return_status:' || x_return_status); IF (x_return_status <> 'S') THEN

RAISE ; END IF;

('x_customer_trx_id:' || x_customer_trx_id); IF x_customer_trx_id IS NULL THEN x_return_status := ; (p_app_name => 'CUX',

p_msg_name => 'CUX_COMMON_MSG', p_token1 => 'TOKEN',

p_token1_value => '出现未知错误,没有正确生成发票,请联系系统管理员');

RAISE ; END IF; EXCEPTION WHEN THEN ('g_exc_errorx:'); ('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN ('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END;

贷项通知单

--简单导入贷项通知单核销应收事务处理发票测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date DECLARE g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; l_api_name CONSTANT VARCHAR2(30) := 'transaction_prc'; l_api_version CONSTANT NUMBER := ; p_commit BOOLEAN := FALSE; l_batch_source_rec ; l_trx_header_tbl ; l_trx_lines_tbl ; l_trx_dist_tbl ; l_trx_salescredits_tbl ; x_return_status VARCHAR2(60); x_msg_count NUMBER;

x_msg_data VARCHAR2(32676); x_customer_trx_id NUMBER; l_org_id NUMBER; l_cm_app_rec ; l_out_rec_application_id NUMBER; l_acctd_amount_applied_from NUMBER; l_acctd_amount_applied_to NUMBER; BEGIN

-- start activity to create savepoint, check compatibility ;

(user_id => 1291, resp_id => 20678, resp_appl_id => 222); l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

:= 1004;

l_trx_header_tbl(1).cust_trx_type_id := 1031; l_trx_header_tbl(1).trx_header_id := 100; l_trx_header_tbl(1).trx_date := SYSDATE; l_trx_header_tbl(1).gl_date := SYSDATE; l_trx_header_tbl(1).trx_currency := 'CNY'; l_trx_header_tbl(1).bill_to_customer_id := 39211;

l_trx_header_tbl(1).org_id := l_org_id;

l_trx_lines_tbl(1).trx_header_id := 100; l_trx_lines_tbl(1).trx_line_id := 100; l_trx_lines_tbl(1).line_number := 1;

l_trx_lines_tbl(1).description := nvl(NULL, '摘要'); l_trx_lines_tbl(1).quantity_invoiced := 1; l_trx_lines_tbl(1).unit_selling_price := -100; l_trx_lines_tbl(1).line_type := 'LINE';

l_trx_dist_tbl(1).trx_dist_id := 100; l_trx_dist_tbl(1).trx_header_id := 100; l_trx_dist_tbl(1).trx_line_id := 100; l_trx_dist_tbl(1).account_class := 'REV'; l_trx_dist_tbl(1).amount := -100; l_trx_dist_tbl(1).acctd_amount := -100; l_trx_dist_tbl(1).percent := 100;

l_trx_dist_tbl(1).code_combination_id := 3000;

l_trx_dist_tbl(2).trx_dist_id := 100; l_trx_dist_tbl(2).trx_header_id := 100; --l_trx_dist_tbl(2).trx_line_id := 100; l_trx_dist_tbl(2).account_class := 'REC'; l_trx_dist_tbl(2).amount := -100; l_trx_dist_tbl(2).acctd_amount := -100; l_trx_dist_tbl(2).percent := 100;

l_trx_dist_tbl(2).code_combination_id := 3000; ('bf_x_customer_trx_id:' || x_customer_trx_id); (p_api_version => ,

p_init_msg_list => , p_commit => ,

p_batch_source_rec => l_batch_source_rec, p_trx_header_tbl => l_trx_header_tbl, p_trx_lines_tbl => l_trx_lines_tbl, p_trx_dist_tbl => l_trx_dist_tbl,

p_trx_salescredits_tbl => l_trx_salescredits_tbl, x_customer_trx_id => x_customer_trx_id, x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data); ('af_x_customer_trx_id:' || x_customer_trx_id || '--x_return_status:' || x_return_status);

COMMIT;

IF (x_return_status <> 'S') THEN

RAISE ; ELSE

('af_commit:' || x_customer_trx_id); := x_customer_trx_id;

:= 67994; --红字发票10元 针对刚刚创建的发票 := 100;

(p_api_version => 1,

p_init_msg_list => , p_commit => ,

p_cm_app_rec => l_cm_app_rec, x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data,

x_out_rec_application_id => l_out_rec_application_id, x_acctd_amount_applied_from => l_acctd_amount_applied_from, x_acctd_amount_applied_to => l_acctd_amount_applied_to, p_org_id => l_org_id); ('apply_on_account_x_return_status:' || x_return_status); ('l_out_rec_application_id:' || l_out_rec_application_id);

IF (x_return_status <> 'S') THEN RAISE ; END IF; END IF;

EXCEPTION WHEN THEN

('g_exc_errorx:');

('FND_MSG_BUG:' || (1, 'F'));

WHEN OTHERS THEN ('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END; 手工录入应收事务处理简介

头信息: 行信息: 分配信息: 相关表/重点掌握API

应收事务处理表: ra_customer_trx_all 重点掌握API:

3 应收收款/收款注销

. 应收收款概述

收款简介:

收款业务流程:

. API创建应收收款/收款注销

API创建收款:

--简单导入收款测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date

DECLARE

l_api_name CONSTANT VARCHAR2(30) := 'receipt_prc'; l_api_version CONSTANT NUMBER := ; x_cash_receipt_id NUMBER; l_attribute_rec ; l_org_id NUMBER; x_return_status VARCHAR2(60); x_msg_count NUMBER;

g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; x_msg_data VARCHAR2(32676);

BEGIN ;

l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

(user_id => 1291, resp_id => 20678, resp_appl_id => 222);

(p_access_mode => 'S', p_org_id => l_org_id);

(p_api_version => ,

p_init_msg_list => 'F', p_receipt_number => , p_receipt_method_id => 10001, p_currency_code => 'CNY', p_amount => 1000,

p_receipt_date => SYSDATE, p_gl_date => SYSDATE, p_maturity_date => SYSDATE, p_customer_id => 8905, p_customer_site_use_id => 11117, p_remittance_bank_account_id => 10033,

p_attribute_rec => l_attribute_rec, p_cr_id => x_cash_receipt_id, x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data); ('x_cash_receipt_id:' || x_cash_receipt_id); IF (x_return_status <> 'S') THEN RAISE ; END IF;

EXCEPTION WHEN THEN

('g_exc_errorx:');

('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN

('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END;

API收款注销:

--简单导入收款注销测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date

DECLARE

l_org_id NUMBER; x_return_status VARCHAR2(60); x_msg_count NUMBER;

g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; x_msg_data VARCHAR2(32676);

l_api_name CONSTANT VARCHAR2(30) := 'act_app_prc'; l_api_version CONSTANT NUMBER := ;

l_receivable_application_id NUMBER; l_attribute_rec ; l_global_att_rec ; l_application_ref_type %TYPE; l_application_ref_id %TYPE; l_application_ref_num %TYPE; l_secondary_application_ref_id %TYPE;

CURSOR receipts_cur IS SELECT , ,

cash_unapp_amount, ,

customer_id,

FROM ar_cash_receipts cr;

l_amount NUMBER;

l_app_amount NUMBER; l_cash_sum NUMBER;

BEGIN ;

l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

(user_id => 1291, resp_id => 20678, resp_appl_id => 222);

(p_access_mode => 'S', p_org_id => l_org_id); l_amount := 1000; l_app_amount := 1000;

(p_api_version => ,

p_commit => , p_validation_level => ,

p_cash_receipt_id => 49145, --注销收款的收款id

p_amount_applied => l_app_amount, p_applied_payment_schedule_id => -3, p_receivables_trx_id => 5001, p_apply_date => SYSDATE, p_apply_gl_date => SYSDATE,

p_application_ref_type => l_application_ref_type, p_application_ref_id => l_application_ref_id, p_application_ref_num => l_application_ref_num, p_secondary_application_ref_id => l_secondary_application_ref_id,

p_attribute_rec => l_attribute_rec, p_global_attribute_rec => l_global_att_rec, p_receivable_application_id => l_receivable_application_id,

x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data); ('x_return_status:' || x_return_status); ('l_receivable_application_id:' || l_receivable_application_id); IF (x_return_status <> 'S') THEN RAISE ; END IF; EXCEPTION WHEN THEN ('g_exc_errorx:'); ('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN ('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END;

. 应收收款录入/收款注销创建简介

应收收款:

应收收款注销

. 相关表/重点掌握API

收款表: ar_cash_receipts 重点掌握API: /

4 应收核销/取消核销

. 应收收款核销简介

收款简介:

通过收款去核减或者冲减应收发票的余额的动作

. API创建应收收款核销/取消核销

API创建收款核销:

--导入核销简单测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date DECLARE l_api_name CONSTANT VARCHAR2(30) := 'apply_prc'; l_api_version CONSTANT NUMBER := ; l_org_id NUMBER; x_return_status VARCHAR2(60); x_msg_count NUMBER; g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; x_msg_data VARCHAR2(32676); /* CURSOR receipts_cur IS SELECT , , , customer_id, FROM ar_cash_receipts cr, ar_receipt_methods mtd WHERE = ;

CURSOR cust_trx_cur IS SELECT ,

FROM ra_customer_trx_all ct, ra_cust_trx_types_all c WHERE =

AND = 'INV';*/

l_total_amount NUMBER; l_cash_unapp_amount NUMBER;

l_cash_sum NUMBER; l_trx_sum NUMBER; BEGIN ;

l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

(user_id => 1291, resp_id => 20678, resp_appl_id => 222);

(p_access_mode => 'S', p_org_id => l_org_id);

(p_api_version => ,

p_init_msg_list => , p_commit => , p_validation_level => ,

x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data, p_cash_receipt_id => 49145, p_customer_trx_id => 19239, p_amount_applied => ,

p_apply_date => SYSDATE, p_apply_gl_date => SYSDATE); ('x_return_status:' || x_return_status); IF (x_return_status <> 'S') THEN RAISE ; END IF; EXCEPTION WHEN THEN ('g_exc_errorx:'); ('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN ('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END; API取消收款核销:

--导入取消核销测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date DECLARE l_api_name CONSTANT VARCHAR2(30) := 'unapply_prc'; l_api_version CONSTANT NUMBER := ; l_org_id NUMBER; x_return_status VARCHAR2(60); x_msg_count NUMBER; g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; x_msg_data VARCHAR2(32676); l_unapp_amount NUMBER; l_app_amount NUMBER := 0;

l_applied_sum NUMBER; BEGIN ;

l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

(user_id => 1291, resp_id => 20678, resp_appl_id => 222);

(p_access_mode => 'S', p_org_id => l_org_id);

(p_api_version => ,

p_init_msg_list => , p_commit => , p_validation_level => ,

x_return_status => x_return_status, x_msg_count => x_msg_count, x_msg_data => x_msg_data, p_cash_receipt_id => 49145, p_customer_trx_id => 19239, p_reversal_gl_date => SYSDATE); ('x_return_status:' || x_return_status); IF (x_return_status <> 'S') THEN RAISE ; END IF;

EXCEPTION WHEN THEN

('g_exc_errorx:');

('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN

('others_exception:'); ('FND_MSG_BUG:' || (1, 'F'));

END;

. 应收收款录入创建简介

应收核销:

应收取消核销

. 相关表/重点掌握API

核销表: ar_receivable_applications_all 重点掌握API: 获取可核销总额:

SELECT nvl(SUM(decode, 'UNAPP', nvl, 0), 0)), 0) INTO l_unapp_sum FROM ar_cash_receipts cr, ar_receivable_applications_all ra WHERE = “And your parameters here” 5 应收调整

. 应收调整概述

调整简介:

录入事务处理后,会因为发现发票录入错误,因为业务变动而需要发票调整到期余额,此时可以通过调整来完成此类业务

. API创建调整

API创建应收调整:

--导入应收调整测试脚本 id均为写死,项目上可以根据需求灵活运用 --author bruce --date DECLARE l_api_name CONSTANT VARCHAR2(30) := 'adjust_prc'; l_api_version CONSTANT NUMBER := ; l_adj_rec ar_adjustments%ROWTYPE; l_new_adjust_number VARCHAR2(20); l_new_adjust_id NUMBER; l_count NUMBER := 0; l_org_id NUMBER; x_return_status VARCHAR2(60); x_msg_count NUMBER; g_pkg_name VARCHAR2(60) := 'cux_test_scripts'; g_api_type VARCHAR2(60) := 'cux_test_scripts'; x_msg_data VARCHAR2(32676); /* CURSOR cust_trx_cur IS SELECT , , FROM ra_customer_trx_all ct, ar_payment_schedules_all ps, ra_cust_trx_types_all c WHERE = AND =

AND = 'INV';*/

l_amount NUMBER; l_trx_amount NUMBER;

BEGIN ;

l_org_id := 88;

(p_access_mode => 'S', p_org_id => l_org_id);

(user_id => 1291, resp_id => 20678, resp_appl_id => 222);

(p_access_mode => 'S', p_org_id => l_org_id); := 'LINE'; := 67994; := 67184; := 1060;

:= 10; := SYSDATE; := SYSDATE; := 'ARXTWADJ';

(p_api_name => 'AR_ADJUST_PUB',

p_api_version => , p_init_msg_list => , p_commit_flag => , p_validation_level => ,

p_msg_count => x_msg_count, p_msg_data => x_msg_data, p_return_status => x_return_status, p_adj_rec => l_adj_rec, p_chk_approval_limits => ,

p_check_amount => , p_move_deferred_tax => NULL,

p_new_adjust_number => l_new_adjust_number, p_new_adjust_id => l_new_adjust_id, p_called_from => NULL, p_old_adjust_id => NULL, p_org_id => l_org_id); ('x_return_status:' || x_return_status); ('x_return_status:' || (1, 'F')); IF (x_return_status <> 'S') THEN RAISE ; END IF;

EXCEPTION WHEN THEN

('g_exc_errorx:');

('FND_MSG_BUG:' || (1, 'F')); WHEN OTHERS THEN

('others_exception:'); ('FND_MSG_BUG:' || (1, 'F')); END;

. 应收调整创建简介

应收调整:

. 相关表/重点掌握API

调整表: ar_adjustments_all

重点掌握api:

获取可调整金额(发票余额): SELECT nvl(SUM, 0) INTO l_amount FROM ra_customer_trx_all ct, ar_payment_schedules_all ps, ra_cust_trx_types_all c WHERE = AND = AND = 'INV' “And your parameters here”

6 常用函数

1 获得默认收款条件

2获得本位币

-- 获得默认收款条件 FUNCTION get_default_term(p_cust_trx_type_id IN NUMBER, p_org_id IN NUMBER) RETURN NUMBER IS l_default_term NUMBER; BEGIN SELECT INTO l_default_term FROM ra_cust_trx_types_all t WHERE = p_cust_trx_type_id AND = p_org_id; RETURN l_default_term; END get_default_term;

获得本位币 PROCEDURE get_currency(p_org_id IN NUMBER, x_default_currency OUT VARCHAR2, x_return_status OUT VARCHAR2) IS CURSOR c_org IS SELECT FROM hr_operating_units t, gl_ledgers sob WHERE = AND = p_org_id; BEGIN x_return_status := ; OPEN c_org; FETCH c_org INTO x_default_currency; IF c_org%NOTFOUND THEN x_return_status := ; (p_app_name => 'CUX', 3获得客户地点ID

p_msg_name => 'CUX_COMMON_MSG', p_token1 => 'TOKEN', p_token1_value => '组织不存在!'); END IF; CLOSE c_org; END get_currency; -- 获得客户地点ID PROCEDURE get_customer_site_use_id(p_customer_id IN NUMBER, p_org_id IN NUMBER, x_customer_site_use_id OUT NUMBER) IS CURSOR c_site_use IS SELECT FROM hz_cust_acct_sites_all hcas, hz_cust_site_uses_all hcsu WHERE = p_customer_id AND = (+) AND (+) = p_org_id AND (+) = 'BILL_TO' AND rownum = 1; BEGIN OPEN c_site_use; FETCH c_site_use INTO x_customer_site_use_id; IF c_site_use%NOTFOUND THEN --x_return_status := ; x_customer_site_use_id := NULL; 4. 获得批名

END IF; CLOSE c_site_use; END get_customer_site_use_id;

-- 获得批名 FUNCTION get_batch_source_name(p_batch_source_id IN NUMBER) RETURN VARCHAR2 IS CURSOR c_batch_source IS SELECT FROM ra_batch_sources_all t WHERE = p_batch_source_id; l_batch_source_name VARCHAR2(50); BEGIN OPEN c_batch_source; FETCH c_batch_source INTO l_batch_source_name; CLOSE c_batch_source; RETURN l_batch_source_name; END get_batch_source_name;

7 参考文档

在实际应用中,环境和版本与本文可能不同,如果想了解更多的内容请参考以下文档: 文档名称 说明 参考文档手册

1. 1. Open and Closed Issues for this Deliverable

Open Issues

ID Issue Resolution Responsibility Target Date Impact Date

Closed Issues

ID Issue Resolution Responsibility Target Date Impact Date

因篇幅问题不能全部显示,请点此查看更多更全内容