




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、R12應(yīng)收模塊收款A(yù)PI研究撰寫人:杜春陽撰寫日期:2012年1月10日最后修改日期:2012年1月10日版本:1.0文檔控制更改記錄日期姓名版本變更參考2011-01-10杜春陽1.0無前期版本審閱姓名職位分發(fā)編號.名稱地點(diǎn)1212目錄文檔控制2更改記錄2審閱2分發(fā)2目錄3文檔說明4使用對象4參考文檔4相關(guān)業(yè)務(wù)匯總5相關(guān)業(yè)務(wù)匯總5代碼案例詳解7創(chuàng)建收款(AR_RECEIPT_API_PUB.CREATE_CASH)7核銷收款(AR_RECEIPT_API_PUB.APPLY)9創(chuàng)建并核銷收款(AR_RECEIPT_API_PUB.CREATE_AND_APPLY)11撤銷核銷收款(AR_RE
2、CEIPT_API_PUB.CREATE_AND_APPLY)13沖銷收款()14文檔說明該文檔主要介紹應(yīng)收模塊的收款功能相關(guān)API。本文僅介紹了部分主要業(yè)務(wù)的API,對于其他業(yè)務(wù)請參閱下方ORACLE官方文檔。使用對象開發(fā)人員參考文檔l MetalinkOracle Receivables: Receipts API Overview, Setup, Sample Scripts and Troubleshooting ID 1361075.1相關(guān)業(yè)務(wù)匯總相關(guān)業(yè)務(wù)匯總包名:AR_RECEIPT_API_PUB。黃色為本文介紹編號業(yè)務(wù)過程名稱英文解釋1.創(chuàng)建收款CREATE_CASHCreat
3、es a single cash receipt, as in the case of manually created cash receipts2.核銷應(yīng)收發(fā)票APPLYApplies a cash receipt to a particular installment of a debit item. The application can also be a cross currency application.3.創(chuàng)建并同時核銷發(fā)票CREATE_AND_APPLYCreates a cash receipt and applies it to a specified installm
4、ent of a debit item in one pass. Application will fail if the receipt cannot be created.This API is a super-set of CREATE_CASH and APPLY. It provides more input parameters which allow the user to have more control over the type of receipt and application to create. For example, this API takes in a v
5、alue for p_factor_discount_amount, whereas APPLY API above does not.4.取消核銷發(fā)票UNAPPLYUnapplies the application of a particular installment of a debit item against the specified cash receipt.5.沖銷收款REVERSEReverses the specified receipt.6核銷賬戶APPLY_ON_ACCOUNTCreates an on-account application for a cash re
6、ceipt7撤銷核銷賬戶UNAPPLY_ON_ACCOUNTUnapplies the on-account application on the specified receipt.8核銷活動ACTIVITY_APPLICATIONApplies to an activity, such as Receipt Write-off or Refund.9創(chuàng)建雜項(xiàng)收款CREATE_MISCCreates a single miscellaneous receipt.10核銷其他賬戶活動APPLY_OTHER_ACCOUNTApplies to other account activities,
7、such as Claim Investigation (for Trade Management customers only).11撤銷核銷其他賬戶UNAPPLY_OTHER_ACCOUNTUnapplies from other account activities, such as Claim Investigation.12不懂APPLY_OPEN_RECEIPTCreates a receipt-to-receipt application (payment netting).13不懂UNAPPLY_OPEN_RECEIPTUnapplies a receipt-to-receip
8、t application.14不懂CREATE_APPLY_ON_ACCCreates a cash receipt and an on-account application in one pass. Application will fail if the receipt cannot be created.15核銷到發(fā)票行明細(xì)APPLY_IN_DETAILApply a receipt at invoice line level.代碼案例詳解創(chuàng)建收款(AR_RECEIPT_API_PUB.CREATE_CASH)API描述這個API一次可以創(chuàng)建一個收款,創(chuàng)建成功后,狀態(tài)為未核銷。 該A
9、PI一次只能創(chuàng)建一個收款,無法創(chuàng)建收款批。API代碼詳解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, - Receip
10、t 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_i
11、d OUT NOCOPY NUMBER )以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請自行研究。1. x_return_status API返回狀態(tài)2. x_msg_count API返回信息數(shù)量3. x_msg_data API返回消息內(nèi)容4. p_currency_code 幣種值來源 select currency_code from fnd_currencies;5. p_receipt_number 收款編號6. p_receipt_date 收款日期7. p_gl_date 入賬日期8. p_customer_number 客戶編號值來源select b.account_numbe
12、rfrom hz_parties a,hz_cust_accounts bwhere a.party_name = '&Customer_name'and a.party_id = b.party_id9. p_receipt_method_id 收款方法值來源select receipt_method_id from ar_receipt_methods;10. p_cr_id 返回的收款I(lǐng)D11. API成功后,將會把數(shù)據(jù)提交到AR_RECEIVABLE_APPLICATIONS_ALL中API代碼實(shí)例DECLARE l_return_status VARCHAR2
13、(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是USE
14、R_ID,51260是responsibility_id,280是application_id - 2) Call the APIAR_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 =>
15、; 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
16、 => 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_m
17、sg_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;核銷收款(AR
18、_RECEIPT_API_PUB.APPLY)API描述改API一次可以核銷一張發(fā)票,如果需要核銷多張發(fā)票,可以循環(huán)調(diào)用。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_re
19、ceipts.cash_receipt_id%TYPE DEFAULT NULL, p_customer_trx_id IN ra_customer_trx.customer_trx_id%TYPE DEFAULT NULL,p_amount_applied IN ar_receivable_applications.amount_applied%TYPE DEFAULT NULL, x_return_status OUT NOCOPY VARCHAR2, x_msg_count OUT NOCOPY NUMBER,x_msg_data => OUT NOCOPY VARCHAR2);以
20、上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請自行研究。1. p_cash_receipt_id 收款I(lǐng)D值來源select cash_receipt_id from ar_cash_receipts_all where org_id = &org_id;2. p_customer_trx_id 應(yīng)收發(fā)票ID值來源select customer_trx_idfrom ra_customer_trx_allwhere org_id = &org_id;3. p_amount_applied 核銷金額,非必填,不填系統(tǒng)默認(rèn)全部或者可核銷金額,可不使用這個參數(shù)。4. x_return_s
21、tatus API返回狀態(tài)5. x_msg_count API返回信息數(shù)量6. x_msg_data API返回消息內(nèi)容7. API成功后,將會把數(shù)據(jù)提交到AR_RECEIVABLE_APPLICATIONS_ALL中API代碼實(shí)例DECLARE l_return_status varchar2(1); l_msg_count number; l_msg_data varchar2(240); p_count number :=0;BEGIN - 1) Set the applications context mo_global.init('AR'); mo_global.se
22、t_policy_context('S', '261'); fnd_global.apps_initialize(2125, 51260, 280, 0); - 2) Call the APIAR_RECEIPT_API_PUB.APPLY ( 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, p_cash_receipt
23、_id => 2565, p_customer_trx_id => 5237, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data); - 3) Review the API output dbms_output.put_line('Status ' | l_return_status); dbms_output.put_line('Message count ' | l_msg_count); if l_m
24、sg_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 |'.
25、'|l_msg_data); end loop; end if;end;創(chuàng)建并核銷收款(AR_RECEIPT_API_PUB.CREATE_AND_APPLY)API描述此API可以同時創(chuàng)建收款并且核銷。相當(dāng)于同時調(diào)用了上面2個過程。但是一次只能創(chuàng)建一個收款和核銷第一個應(yīng)收發(fā)票。如果要核銷多個應(yīng)收發(fā)票,還是要循環(huán)調(diào)用AR_RECEIPT_API_PUB.APPLY。API詳解AR_RECEIPT_API_PUB.create_and_apply ( p_api_version IN NUMBER, p_init_msg_list IN VARCHAR2 := FND_API.G_FAL
26、SE, p_commit IN VARCHAR2 := FND_API.G_FALSE, p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL, x_return_status OUT NOCOPY VARCHAR2, x_msg_count OUT NOCOPY NUMBER, x_msg_data OUT NOCOPY VARCHAR2, p_amount IN ar_cash_receipts.amount%TYPE DEFAULT NULL, p_receipt_number IN ar_cash_receipts.rec
27、eipt_number%TYPE DEFAULT NULL, p_receipt_date IN ar_cash_receipts.receipt_date%TYPE DEFAULT NULL, p_gl_date IN ar_cash_receipt_history.gl_date%TYPE DEFAULT NULL, p_customer_number IN hz_cust_accounts.account_number%TYPE DEFAULT NULL, p_receipt_method_id IN ar_cash_receipts.receipt_method_id%TYPE DEF
28、AULT NULL,p_customer_trx_idIN ra_customer_trx.customer_trx_id%TYPE DEFAULT NULL, p_cr_id => OUT NOCOPY ar_cash_receipts.cash_receipt_id%TYPE);以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請自行研究。該API的參數(shù)就是上兩個參數(shù)的和。這里不做解釋。API實(shí)例DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(240); l_cash_receipt_i
29、d NUMBER; p_count number := 0;BEGIN - 1) Set the applications context mo_global.init('AR'); mo_global.set_policy_context('S', '261'); fnd_global.apps_initialize(2125, 51260, 280, 0); AR_RECEIPT_API_PUB.create_and_apply ( p_api_version => 1.0, p_init_msg_list => FND_API.
30、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_amount => 9999.00, p_receipt_number => 'TEST20120120-1', p_receipt_date => '20-01-2012
31、', p_gl_date => '20-01-2012', p_customer_number => 1945, p_receipt_method_id => 2004, p_customer_trx_id => '5238', p_cr_id => l_cash_receipt_id ); - 3) Review the API output dbms_output.put_line('Status ' | l_return_status); dbms_output.put_line('Messag
32、e count ' | l_msg_count); dbms_output.put_line('Cash Receipt ID ' | l_cash_receipt_id ); 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_
33、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; 撤銷核銷收款(AR_RECEIPT_API_PUB.CREATE_AND_APPLY)API描述該API可以撤銷已經(jīng)核銷的應(yīng)收發(fā)票。API詳解AR_RECEIPT_API_PUB.UNAPPLY ( p_api_version IN NUMBER, p_init_msg_list IN VARCHAR2
34、 := FND_API.G_FALSE, p_commit IN VARCHAR2 := FND_API.G_FALSE, p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL, x_return_status OUT NOCOPY VARCHAR2, x_msg_count OUT NOCOPY NUMBER, x_msg_data OUT NOCOPY VARCHAR2, p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE DEFAULT NULL, p_app
35、lied_payment_schedule_id IN ar_payment_schedules.payment_schedule_id%TYPE DEFAULT NULL, p_reversal_gl_date IN ar_receivable_applications.reversal_gl_date%TYPE DEFAULT NULL );以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請自行研究。該API的參數(shù)僅介紹1. p_applied_payment_schedule_id 已核銷的應(yīng)收發(fā)票值來源select applied_payment_schedule_idfrom ar_rec
36、eivable_applications_allwhere cash_receipt_id = &cr_id;API實(shí)例DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(240); p_count number := 0;BEGIN - 1) Set the applications context mo_global.init('AR'); mo_global.set_policy_context('S', '261'); fnd_g
37、lobal.apps_initialize(2125, 51260, 280, 0); AR_RECEIPT_API_PUB.UNAPPLY ( 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
38、 => l_msg_data, p_cash_receipt_id => 2570, p_applied_payment_schedule_id => 4336, p_reversal_gl_date => '20-01-2012' ); - 3) Review the API output dbms_output.put_line('Status ' | l_return_status); dbms_output.put_line('Message count ' | l_msg_count); if l_msg_cou
39、nt = 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 |'. '|
40、l_msg_data); end loop; end if;END;沖銷收款()API描述該API可以沖銷指定的收款。API詳解AR_RECEIPT_API_PUB.reverse ( 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, x_return_status OUT NOCOPY VARCHA
41、R2, x_msg_count OUT NOCOPY NUMBER, x_msg_data OUT NOCOPY VARCHAR2, p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE DEFAULT NULL, p_reversal_category_code IN ar_cash_receipts.reversal_category%TYPE DEFAULT NULL,p_reversal_reason_code IN ar_cash_receipts.reversal_reason_code%TYPE DEFAULT NULL);以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請自行研究。該API的參數(shù)僅介紹1. p_cash_receipt_id 未沖銷的收款I(lǐng)D值來源select cash_receipt_idfrom ar_cash_receipts_allwhere org_id = &org_idand status <> 'REV'2. p_reversal_category_code 沖銷類別值來源select lookup_code from fnd_
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 地震預(yù)警員崗位面試問題及答案
- 櫥柜設(shè)計(jì)師崗位面試問題及答案
- 寵物醫(yī)生崗位面試問題及答案
- 沖壓工程師崗位面試問題及答案
- 2025屆陜西省寶雞市金臺高級中學(xué)高二化學(xué)第二學(xué)期期末監(jiān)測試題含解析
- 2025屆河南省商丘市城隍鄉(xiāng)湯莊中學(xué)高二下化學(xué)期末聯(lián)考模擬試題含解析
- 安徽省定遠(yuǎn)縣張橋中學(xué)2025年化學(xué)高二下期末學(xué)業(yè)水平測試模擬試題含解析
- 2025屆廣東省揭陽市惠來一中化學(xué)高二下期末學(xué)業(yè)水平測試模擬試題含解析
- 福建省福州市屏東中學(xué)2025屆高二下化學(xué)期末調(diào)研模擬試題含解析
- 四川省成都市溫江中學(xué)2025屆高一下化學(xué)期末經(jīng)典模擬試題含解析
- 2024年中國安全應(yīng)急產(chǎn)業(yè)發(fā)展研究報(bào)告
- 2024年優(yōu)居房產(chǎn)加盟業(yè)務(wù)保密協(xié)議3篇
- 中國當(dāng)代文學(xué)專題-003-國開機(jī)考復(fù)習(xí)資料
- 企業(yè)自然災(zāi)害安全應(yīng)急預(yù)案
- 高新技術(shù)企業(yè)研發(fā)費(fèi)用管理辦法
- 老年急重癥診療及護(hù)理
- 中小學(xué)家長會期中期末家長會253
- 驅(qū)動電機(jī)與電機(jī)控制器
- 醫(yī)聯(lián)體協(xié)議書(2024版)
- 2023年全國職業(yè)院校技能大賽-中藥傳統(tǒng)技能賽項(xiàng)規(guī)程
- 11 《愛蓮說》對比閱讀-2024-2025中考語文文言文閱讀專項(xiàng)訓(xùn)練(含答案)
評論
0/150
提交評論