版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、R12應(yīng)收模塊收款A(yù)PI研究撰寫人:杜春陽(yáng)撰寫日期:2012年1月10日最后修改日期:2012年1月10日版本: 1.0文檔控制更改記錄日期姓名版本變更參考2011-01-10杜春陽(yáng)1.0無(wú)前期版本審閱姓名職位分發(fā)編號(hào).名稱地點(diǎn)1212目錄文檔控制2更改記錄2審閱2分發(fā)2目錄3文檔說明4使用對(duì)象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_R
2、ECEIPT_API_PUB.CREATE_AND_APPLY)13沖銷收款()14文檔說明該文檔主要介紹應(yīng)收模塊的收款功能相關(guān)API。本文僅介紹了部分主要業(yè)務(wù)的API,對(duì)于其他業(yè)務(wù)請(qǐng)參閱下方ORACLE官方文檔。使用對(duì)象開發(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。黃色為本文介紹編號(hào)業(yè)務(wù)過程名稱英文解釋1.創(chuàng)建收款CREATE_CASHCrea
3、tes 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)建并同時(shí)核銷發(fā)票CREATE_AND_APPLYCreates a cash receipt and applies it to a specified install
4、ment 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
5、value 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 r
6、eceipt7撤銷核銷賬戶UNAPPLY_ON_ACCOUNTUnapplies the on-account application on the specified receipt.8核銷活動(dòng)ACTIVITY_APPLICATIONApplies to an activity, such as Receipt Write-off or Refund.9創(chuàng)建雜項(xiàng)收款CREATE_MISCCreates a single miscellaneous receipt.10核銷其他賬戶活動(dòng)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-recei
8、pt 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描述這個(gè)API一次可以創(chuàng)建一個(gè)收款,創(chuàng)建成功后,狀態(tài)為未核銷。 該
9、API一次只能創(chuàng)建一個(gè)收款,無(wú)法創(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, - Rece
10、ipt 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
11、_id OUT NOCOPY NUMBER )以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請(qǐng)自行研究。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 收款編號(hào)6. p_receipt_date 收款日期7. p_gl_date 入賬日期8. p_customer_number 客戶編號(hào)值來源select b.account_num
12、berfrom 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成功后,將會(huì)把數(shù)據(jù)提交到AR_RECEIVABLE_APPLICATIONS_ALL中API代碼實(shí)例DECLARE l_return_status VARCHA
13、R2(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是U
14、SER_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 =
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
16、_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('
17、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;核銷收款
18、(AR_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
19、_receipts.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 VARCHAR
20、2); 以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請(qǐng)自行研究。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)全部或者可核銷金額,可不使用這個(gè)參數(shù)。4. x_ret
21、urn_status API返回狀態(tài)5. x_msg_count API返回信息數(shù)量6. x_msg_data API返回消息內(nèi)容7. API成功后,將會(huì)把數(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_glob
22、al.set_policy_context('S', '261'); fnd_global.apps_initialize(2125, 51260, 280, 0); - 2) Call the API AR_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_r
23、eceipt_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);
24、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 |&
25、#39;. '|l_msg_data); end loop; end if;end;創(chuàng)建并核銷收款(AR_RECEIPT_API_PUB.CREATE_AND_APPLY)API描述此API可以同時(shí)創(chuàng)建收款并且核銷。相當(dāng)于同時(shí)調(diào)用了上面2個(gè)過程。但是一次只能創(chuàng)建一個(gè)收款和核銷第一個(gè)應(yīng)收發(fā)票。如果要核銷多個(gè)應(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
26、.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_amount IN ar_cash_receipts.amount%TYPE DEFAULT NULL, p_receipt_number IN ar_cash_receip
27、ts.receipt_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%TY
28、PE DEFAULT NULL, p_customer_trx_id IN ra_customer_trx.customer_trx_id%TYPE DEFAULT NULL, p_cr_id => OUT NOCOPY ar_cash_receipts.cash_receipt_id%TYPE);以上并非所有參數(shù),僅包含主要參數(shù),其他參數(shù)請(qǐng)自行研究。該API的參數(shù)就是上兩個(gè)參數(shù)的和。這里不做解釋。API實(shí)例DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; l_msg_data VARCHAR2(240); l_cash_r
29、eceipt_id 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 =>
30、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_amount => 9999.00, p_receipt_number => 'TEST20120120-1', p_receipt_date => '20
31、-01-2012', 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(
32、9;Message 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,FN
33、D_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_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
34、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 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 NUL
35、L, p_applied_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ù)請(qǐng)自行研究。該API的參數(shù)僅介紹1. p_applied_payment_schedule_id 已核銷的應(yīng)收發(fā)票值來源select applied_payment_schedule_idfro
36、m ar_receivable_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'
37、); fnd_global.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_
38、msg_data => 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
39、_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 |'
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 NOCOP
41、Y 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_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ù)請(qǐng)自行研究。該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. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 藥學(xué)本科畢業(yè)論文-淺談藥物不良反應(yīng)與合理用藥
- 2024年設(shè)備采購(gòu)合同補(bǔ)充指南3
- 2024年物流運(yùn)輸線路規(guī)劃外包合同3篇
- 2024幼兒園教師教育教學(xué)成果轉(zhuǎn)化與應(yīng)用推廣合同3篇
- 2024年版砌石墻體建設(shè)施工承包合同版
- 2024年綠色建筑節(jié)能設(shè)計(jì)合同模板3篇
- 天鹿北路人行道外側(cè)綠化完善工程施工專業(yè)承包招標(biāo)文件及技術(shù)標(biāo)
- 2024年環(huán)保型暖氣片生產(chǎn)與銷售合同
- 2024年精裝修內(nèi)墻刷新合同
- 2024年版權(quán)授權(quán)延期合同
- NY 5052-2001無(wú)公害食品海水養(yǎng)殖用水水質(zhì)
- 【講座】2020年福建省高職分類考試招生指導(dǎo)講座
- 性格決定命運(yùn)課件
- 球磨機(jī)安全檢查表分析(SCL)+評(píng)價(jià)記錄
- 學(xué)習(xí)會(huì)計(jì)基礎(chǔ)工作規(guī)范課件
- 雙面埋弧焊螺旋鋼管公稱外公壁厚和每米理論重量
- 富士施樂VC2265打印機(jī)使用說明SPO
- 服務(wù)態(tài)度決定客戶滿意度試題含答案
- 中學(xué)歷史教育中的德育狀況調(diào)查問卷
- 教科版四年級(jí)科學(xué)上冊(cè)全冊(cè)復(fù)習(xí)教學(xué)設(shè)計(jì)及知識(shí)點(diǎn)整理
- 重慶萬(wàn)科渠道制度管理辦法2022
評(píng)論
0/150
提交評(píng)論