这期内容当中小编将会给大家带来有关如何理解EBS接口开发的应收款处理,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
(一)应收款常用标准表简介
1.1 常用标准表
如下表中列出了与应收款处理相关的表和说明:
表名 | 说明 | 其他信息 | ||
AR_BATCHES_ALL | AR收款批表 |
|
|
|
AR_BATCH_SOURCES_ALL | AR收款类型表 |
|
| 对应视图 |
AR_CASH_RECEIPTS_ALL | AR收款表 |
|
| 对应视图 |
AR_CASH_RECEIPT_HISTORY_ALL | AR收款历史表 |
|
| 对应视图 |
AR_MISC_CASH_DISTRIBUTIONS_ALL | AR杂项收款分配表 |
|
| 对应视图 |
AP_BANK_ACCOUNTS_ALL | AR汇款银行 |
|
| 对应视图 |
AR_RECEIPT_METHODS | AR收款分类 |
|
| 对应视图 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3 表中字段的大体介绍
1.3 说明
这里只列出了应收款处理相关的大多数常用表。还有一些不经常用到的没有涉及,具体可以参考oracle网站上的
二)应收款处理API
2.1 简介
创建收款
AR_RECEIPT_API_PUB.CREATE_CASH
核销应收INVOICE
AR_RECEIPT_API_PUB.APPLY
创建并同时核销INVOICE
AR_RECEIPT_API_PUB.CREATE_AND_APPLY
取消核销INVOICE
AR_RECEIPT_API_PUB. UNAPPLY
冲销收款
AR_RECEIPT_API_PUB. REVERSE
核销账户
AR_RECEIPT_API_PUB. APPLY_ON_ACCOUNT
撤销核销账户
AR_RECEIPT_API_PUB. UNAPPLY_ON_ACCOUNT
核销活动
AR_RECEIPT_API_PUB. ACTIVITY_APPLICATION
创建杂项收款
AR_RECEIPT_API_PUB. CREATE_MISC
核销其他账户活动
AR_RECEIPT_API_PUB. APPLY_OTHER_ACCOUNT
撤销核销其他账户
AR_RECEIPT_API_PUB. UNAPPLY_OTHER_ACCOUNT
核销现金收款冲销其他收款
AR_RECEIPT_API_PUB. APPLY_OPEN_RECEIPT
取消核销现金收款冲销其他收款
AR_RECEIPT_API_PUB. UNAPPLY_OPEN_RECEIPT
AR_RECEIPT_API_PUB. CREATE_APPLY_ON_ACC
核销到INVOICE行明细
AR_RECEIPT_API_PUB. APPLY_IN_DETAIL
(三)应收款处理API
3.1 AR_RECEIPT_API_PUB. Create_cash
这个API一次可以创建一个收款,创建成功后,状态为未核销。
此API一次只能创建一个收款,无法创建收款批。
AR_RECEIPT_API_PUB. PROCEDURE Create_cash(
-- Standard API parameters.
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
-- Receipt info. parameters
p_currency_code IN VARCHAR2 DEFAULT NULL,
p_amount IN NUMBER DEFAULT NULL,
p_receipt_number IN VARCHAR2 DEFAULT NULL,
p_receipt_date IN DATE DEFAULT NULL,
p_gl_date IN DATE DEFAULT NULL,
p_customer_number IN VARCHAR2 DEFAULT NULL,
p_receipt_method_id IN NUMBER DEFAULT NULL,
p_cr_id OUT NOCOPY NUMBER
)
仅包含主要参数
x_return_status API返回状态
x_msg_count API返回信息数量
x_msg_data API返回消息内容
p_currency_code 币种
值来源
select currency_code from fnd_currencies;
p_receipt_number 收款编号
p_receipt_date 收款日期
p_gl_date 入账日期
p_customer_number 客户编号
值来源
select b.account_number
from hz_parties a,
hz_cust_accounts b
where a.party_name = '&Customer_name'
and a.party_id = b.party_id
p_receipt_method_id 收款方法
值来源
select receipt_method_id from ar_receipt_methods;
p_cr_id 返回的收款ID
API成功后,将会把数据提交到AR_RECEIVABLE_APPLICATIONS_ALL中
API代码实例
DECLARE
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(240);
l_cash_receipt_id NUMBER;
p_count number := 0;
BEGIN
-- 1) Set the applications context
mo_global.init('AR');--初始化MOAC
mo_global.set_policy_context('S', '261');--261是OU的ID
fnd_global.apps_initialize(2125, 51260, 280, 0);--2125是USER_ID,51260是responsibility_id,280是application_id
-- 2) Call the API
AR_RECEIPT_API_PUB.CREATE_CASH
( p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_TRUE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_currency_code => 'CNY',
p_amount => 10000,
p_receipt_number => 'TEST20120120',
p_receipt_date => '20-01-2012',
p_gl_date => '20-01-2012',
p_customer_number => 1945,
p_receipt_method_id => 2004,
p_cr_id => l_cash_receipt_id );
-- 3) Review the API output
dbms_output.put_line('Status ' || l_return_status);
dbms_output.put_line('Cash Receipt id ' || l_cash_receipt_id );
dbms_output.put_line('Message count ' || l_msg_count);
if l_msg_count = 1 Then
dbms_output.put_line('l_msg_data '||l_msg_data);
elsif l_msg_count > 1 Then
loop
p_count := p_count + 1;
l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
if l_msg_data is NULL then
exit;
end if;
dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
end loop;
end if;
END;
3.2 AR_RECEIPT_API_PUB.APPLY
API描述
改API一次可以核销一张INVOICE,如果需要核销多张INVOICE,可以循环调用。
API代码详解
AR_RECEIPT_API_PUB.APPLY
( p_api_version IN NUMBER,,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPEDEFAULT NULL,,
p_customer_trx_id INra_customer_trx.customer_trx_id%TYPE DEFAULT NULL,
p_amount_applied INar_receivable_applications.amount_applied%TYPE DEFAULT NULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data => OUTNOCOPY VARCHAR2);
AR_RECEIPT_API_PUB.APPLY
( p_api_version IN NUMBER,,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPEDEFAULT NULL,,
p_customer_trx_id INra_customer_trx.customer_trx_id%TYPE DEFAULT NULL,
p_amount_applied INar_receivable_applications.amount_applied%TYPE DEFAULT NULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data => OUTNOCOPY VARCHAR2);
上述就是小编为大家分享的如何理解EBS接口开发的应收款处理了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。