0% found this document useful (0 votes)
419 views12 pages

Import External Bank Accounts r12 Oracle Apps

This document provides instructions for importing external bank accounts into Oracle Apps R12. It outlines 4 steps: 1) Create a party record for the bank in the TCA, 2) Create a party record for the bank branch in the TCA, 3) Create an address record for the bank branch as a location in the TCA, and 4) Create a party site to relate the bank branch party to the location. It provides Oracle script examples to call the relevant APIs for each step.

Uploaded by

ashibek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
419 views12 pages

Import External Bank Accounts r12 Oracle Apps

This document provides instructions for importing external bank accounts into Oracle Apps R12. It outlines 4 steps: 1) Create a party record for the bank in the TCA, 2) Create a party record for the bank branch in the TCA, 3) Create an address record for the bank branch as a location in the TCA, and 4) Create a party site to relate the bank branch party to the location. It provides Oracle script examples to call the relevant APIs for each step.

Uploaded by

ashibek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

22/03/2016

19thAugust2012

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

IMPORTEXTERNALBANKACCOUNTSR12
ORACLEAPPS

[https://www.blogger.com/blogger.g?
blogID=955765254185387334]
IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

BelowpostwillexplainthestepinvolvedinimportinganexternalbankaccountinOracleAppsR12.
STEP1:CREATEPARTYforBANKinTCA
APIinvolved:IBY_EXT_BANKACCT_PUB.create_ext_bank
SCRIPT:
TestInstance:R12.1.1
Script:
setserveroutputon
DECLARE

v_error_reasonVARCHAR2(2000)
v_msg_dataVARCHAR2(1000)
v_msg_countNUMBER
v_return_statusVARCHAR2(100)
v_extbank_rec_typeiby_ext_bankacct_pub.extbank_rec_type
x_responseiby_fndcpt_common_pub.result_rec_type
x_bank_idNUMBER

BEGIN

v_error_reason:=NULL
v_return_status:=NULL
v_msg_count:=NULL
v_msg_data:=NULL
v_extbank_rec_type.object_version_number:=1.0
v_extbank_rec_type.bank_name:='TESTSHARE'
v_extbank_rec_type.bank_number:='14589'
http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

1/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

v_extbank_rec_type.institution_type:='BANK'
v_extbank_rec_type.country_code:='US'
v_extbank_rec_type.description:='CreateviaAPI'

iby_ext_bankacct_pub.create_ext_bank
(p_api_version=>1.0,
p_init_msg_list=>fnd_api.g_true,
p_ext_bank_rec=>v_extbank_rec_type,
x_bank_id=>x_bank_id,
x_return_status=>v_return_status,
x_msg_count=>v_msg_count,
x_msg_data=>v_msg_data,
x_response=>x_response
)

DBMS_OUTPUT.put_line('v_return_status='||v_return_status)
DBMS_OUTPUT.put_line('v_msg_count='||v_msg_count)
DBMS_OUTPUT.put_line('v_msg_data='||v_msg_data)
DBMS_OUTPUT.put_line('x_bank_id='||x_bank_id)
DBMS_OUTPUT.put_line('x_response.Result_Code='||x_response.result_code)
DBMS_OUTPUT.put_line('x_response.Result_Category='
||x_response.result_category
)
DBMS_OUTPUT.put_line('x_response.Result_Message='
||x_response.result_message
)

IFv_return_status<>fnd_api.g_ret_sts_success
THEN
IFv_msg_count>=1
THEN
FORiIN1..v_msg_count
LOOP
IFv_error_reasonISNULL
THEN
v_error_reason:=
SUBSTR(fnd_msg_pub.get(p_encoded=>fnd_api.g_false),
1,
http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

2/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

255
)
ELSE
v_error_reason:=
v_error_reason
||','
||SUBSTR(fnd_msg_pub.get(p_encoded=>fnd_api.g_false),
1,
255
)
ENDIF

DBMS_OUTPUT.put_line('BANKAPIERROR'||v_error_reason)
ENDLOOP
ENDIF
ENDIF
END

STEP2:CREATEPARTYforBANKBRANCHinTCA
APIinvolved:IBY_EXT_BANKACCT_PUB.create_ext_bank_branch
TestInstance:R12.1.1

Script:

SETSERVEROUTPUTON

DECLARE
p_api_versionNUMBER:=1.0
p_init_msg_listVARCHAR2(1):='F'
x_return_statusVARCHAR2(2000)
x_msg_countNUMBER(5)
x_msg_dataVARCHAR2(2000)
x_responseiby_fndcpt_common_pub.result_rec_type
p_ext_bank_branch_reciby_ext_bankacct_pub.extbankbranch_rec_type
v_bank_idNUMBER:=208787EXISTINGBANKPARTYID
x_branch_idNUMBER
p_countNUMBER

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

3/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

BEGIN
DBMS_OUTPUT.put_line('BEFOREBANKBRANCHAPI')
p_ext_bank_branch_rec.bch_object_version_number:=1.0
p_ext_bank_branch_rec.branch_name:='TESTBANKBRANCH'
p_ext_bank_branch_rec.branch_type:='ABA'
p_ext_bank_branch_rec.bank_party_id:=v_bank_id

IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH
(p_api_version=>p_api_version,
p_init_msg_list=>p_init_msg_list,
p_ext_bank_branch_rec=>p_ext_bank_branch_rec,
x_branch_id=>x_branch_id,
x_return_status=>x_return_status,
x_msg_count=>x_msg_count,
x_msg_data=>x_msg_data,
x_response=>x_response
)

DBMS_OUTPUT.put_line('x_return_status='||x_return_status)
DBMS_OUTPUT.put_line('x_msg_count='||x_msg_count)
DBMS_OUTPUT.put_line('x_msg_data='||x_msg_data)
DBMS_OUTPUT.put_line('x_branch_id='||x_branch_id)
DBMS_OUTPUT.put_line('x_response.Result_Code='||x_response.result_code)
DBMS_OUTPUT.put_line('x_response.Result_Category='
||x_response.result_category
)
DBMS_OUTPUT.put_line('x_response.Result_Message='
||x_response.result_message
)

IFx_msg_count=1
THEN
DBMS_OUTPUT.put_line('x_msg_data'||x_msg_data)
ELSIFx_msg_count>1
THEN
LOOP
p_count:=p_count+1
x_msg_data:=fnd_msg_pub.get(fnd_msg_pub.g_next,fnd_api.g_false)
http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

4/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

IFx_msg_dataISNULL
THEN
EXIT
ENDIF

DBMS_OUTPUT.put_line('Message'||p_count||''||x_msg_data)
ENDLOOP
ENDIF
END

STEP3:CREATEADDRESSforBANKBRANCHasLOCATIONinTCA
APIInvolved:HZ_LOCATION_V2PUB.CREATE_LOCATION
BelowwrapperscriptwillhelpyoucreateavalidLocationinthetableHZ_LOCATIONS.
TestInstance:R12.1.3
API:HZ_LOCATION_V2PUB.CREATE_LOCATION
Note:Valueforcreated_by_modulemustbeavaluedenedinlookuptypeHZ_CREATED_BY_MODULESinthetableFND_LOOKUP_VALUES

SCRIPT:
SETSERVEROUTPUTON
DECLARE

p_location_recHZ_LOCATION_V2PUB.LOCATION_REC_TYPE
x_location_idNUMBER
x_return_statusVARCHAR2(2000)
x_msg_countNUMBER
x_msg_dataVARCHAR2(2000)

BEGIN
p_location_rec.country:='US'
p_location_rec.address1:='Shareoracleapps'
p_location_rec.city:='sanMateo'
p_location_rec.postal_code:='94401'
p_location_rec.state:='CA'
p_location_rec.created_by_module:='BO_API'

DBMS_OUTPUT.PUT_LINE('CallingtheAPIhz_location_v2pub.create_location')

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

5/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

HZ_LOCATION_V2PUB.CREATE_LOCATION
(
p_init_msg_list=>FND_API.G_TRUE,
p_location_rec=>p_location_rec,
x_location_id=>x_location_id,
x_return_status=>x_return_status,
x_msg_count=>x_msg_count,
x_msg_data=>x_msg_data)

IFx_return_status=fnd_api.g_ret_sts_successTHEN
COMMIT
DBMS_OUTPUT.PUT_LINE('CreationofLocationisSuccessful')
DBMS_OUTPUT.PUT_LINE('Outputinformation....')
DBMS_OUTPUT.PUT_LINE('x_location_id:'||x_location_id)
DBMS_OUTPUT.PUT_LINE('x_return_status:'||x_return_status)
DBMS_OUTPUT.PUT_LINE('x_msg_count:'||x_msg_count)
DBMS_OUTPUT.PUT_LINE('x_msg_data:'||x_msg_data)
ELSE
DBMS_OUTPUT.put_line('CreationofLocationfailed:'||x_msg_data)
ROLLBACK
FORiIN1..x_msg_count
LOOP
x_msg_data:=oe_msg_pub.get(p_msg_index=>i,p_encoded=>'F')
dbms_output.put_line(i||')'||x_msg_data)
ENDLOOP
ENDIF
DBMS_OUTPUT.PUT_LINE('CompletionofAPI')
END
/

STEP4:CREATEPARTYSITEforBANKBRANCHwithLOCATIONcreatedinabovestep
APIInvolved:HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE
DESCRIPTION:Thisrou neisusedtocreateaPartySiteforaparty.PartySiterelatesanexis ngpartyfromtheHZ_PARTIEStablewithanaddressloca onfromthe
HZ_LOCATIONStable.TheAPIcreatesarecordintheHZ_PARTY_SITEStable.Youcancreatemul plepartysiteswithmul pleloca onsandmarkoneofthosepartysitesas
iden fyingforthatparty.Theiden fyingpartysiteaddresscomponentsaredenormalizedintothe
HZ_PARTIEStable.Iforig_systemispassedin,theAPIalsocreatesarecordintheHZ_ORIG_SYS_REFERENCEStabletostorethemappingbetweenthesourcesystem
referenceandtheTCAprimarykey.
API:HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

6/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

BASETABLESAFFECTED:HZ_PARTY_SITES
TESTINSTANCE:R12.1.3
NOTES:
EnterthevaluesforPartyIdandLoca onIdasvalidvaluesfromHZ_PARTIESandHZ_LOCATIONSrespec vely.
SELECTparty_idFROMhz_parties
SELECTlocation_idFROMhz_locations

SCRIPT:

SETSERVEROUTPUTON
DECLARE
p_party_site_recHZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE
x_party_site_idNUMBER
x_party_site_numberVARCHAR2(2000)
x_return_statusVARCHAR2(2000)
x_msg_countNUMBER
x_msg_dataVARCHAR2(2000)

BEGIN
SettingtheContext
mo_global.init('AR')
fnd_global.apps_initialize(user_id=>1318
,resp_id=>50559
,resp_appl_id=>222)
mo_global.set_policy_context('S',204)
fnd_global.set_nls_context('AMERICAN')

InitializingtheMandatoryAPIparameters
p_party_site_rec.party_id:=530682
p_party_site_rec.location_id:=28215
p_party_site_rec.identifying_address_flag:='Y'
p_party_site_rec.created_by_module:='BO_API'

DBMS_OUTPUT.PUT_LINE('CallingtheAPIhz_party_site_v2pub.create_party_site')

HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE
(
p_init_msg_list=>FND_API.G_TRUE,
p_party_site_rec=>p_party_site_rec,
x_party_site_id=>x_party_site_id,
http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

7/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

x_party_site_number=>x_party_site_number,
x_return_status=>x_return_status,
x_msg_count=>x_msg_count,
x_msg_data=>x_msg_data
)

IFx_return_status=fnd_api.g_ret_sts_successTHEN
COMMIT
DBMS_OUTPUT.PUT_LINE('CreationofPartySiteisSuccessful')
DBMS_OUTPUT.PUT_LINE('Outputinformation....')
DBMS_OUTPUT.PUT_LINE('PartySiteId='||x_party_site_id)
DBMS_OUTPUT.PUT_LINE('PartySiteNumber='||x_party_site_number)
ELSE
DBMS_OUTPUT.put_line('CreationofPartySitefailed:'||x_msg_data)
ROLLBACK
FORiIN1..x_msg_count
LOOP
x_msg_data:=fnd_msg_pub.get(p_msg_index=>i,p_encoded=>'F')
dbms_output.put_line(i||')'||x_msg_data)
ENDLOOP
ENDIF
DBMS_OUTPUT.PUT_LINE('CompletionofAPI')
END
/

STEP5:CREATEBANKACCOUNTinIBYusingBANK_ID,BRANCH_IDcreatedinSTEP1&2
APIinvolved:IBY_EXT_BANKACCT_PUB.create_ext_bank_acct
TestInstance:R12.1.1

Script:
SETSERVEROUTPUTON
DECLARE

p_api_versionNUMBER:=1.0
p_init_msg_listVARCHAR2(1):='F'
x_return_statusVARCHAR2(2000)
x_msg_countNUMBER(5)
x_msg_dataVARCHAR2(2000)
x_responseiby_fndcpt_common_pub.result_rec_type
p_ext_bank_acct_reciby_ext_bankacct_pub.extbankacct_rec_type

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

8/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

v_supplier_party_idNUMBER:=55816EXISTINGSUPPLIERS/CUSTOMER
PARTY_ID
v_bank_idNUMBER:=208587EXISTINGBANKPARTYID
v_bank_branch_idNUMBER:=278411EXISTINGBRANCHPARTYID
x_acct_idNUMBER
p_countNUMBER
BEGIN

p_ext_bank_acct_rec.object_version_number:=1.0
p_ext_bank_acct_rec.acct_owner_party_id:=v_supplier_party_id
p_ext_bank_acct_rec.bank_account_name:='XXTESTBANKACCNT'
p_ext_bank_acct_rec.bank_account_num:=14278596531
p_ext_bank_acct_rec.alternate_acct_name:='XXTESTBANKACCNTALT'
p_ext_bank_acct_rec.bank_id:=v_bank_id
p_ext_bank_acct_rec.branch_id:=v_bank_branch_id
p_ext_bank_acct_rec.start_date:=SYSDATE
p_ext_bank_acct_rec.country_code:='US'
p_ext_bank_acct_rec.currency:='USD'
p_ext_bank_acct_rec.foreign_payment_use_flag:='Y'
p_ext_bank_acct_rec.payment_factor_flag:='N'
IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_ACCT
(p_api_version=>p_api_version,
p_init_msg_list=>p_init_msg_list,
p_ext_bank_acct_rec=>p_ext_bank_acct_rec,
x_acct_id=>x_acct_id,
x_return_status=>x_return_status,
x_msg_count=>x_msg_count,
x_msg_data=>x_msg_data,
x_response=>x_response
)

DBMS_OUTPUT.put_line('x_return_status='||x_return_status)
DBMS_OUTPUT.put_line('x_msg_count='||x_msg_count)
DBMS_OUTPUT.put_line('x_msg_data='||x_msg_data)
DBMS_OUTPUT.put_line('x_acct_id='||x_acct_id)
DBMS_OUTPUT.put_line('x_response.Result_Code='||x_response.result_code)
DBMS_OUTPUT.put_line('x_response.Result_Category='
||x_response.result_category
http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

9/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

)
DBMS_OUTPUT.put_line('x_response.Result_Message='
||x_response.result_message
)

IFx_msg_count=1
THEN
DBMS_OUTPUT.put_line('x_msg_data'||x_msg_data)
ELSIFx_msg_count>1
THEN
LOOP
p_count:=p_count+1
x_msg_data:=fnd_msg_pub.get(fnd_msg_pub.g_next,fnd_api.g_false)

IFx_msg_dataISNULL
THEN
EXIT
ENDIF

DBMS_OUTPUT.put_line('Message'||p_count||''||x_msg_data)
ENDLOOP
ENDIF
END

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

10/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

[http://4.bp.blogspot.com/
qnqZNY9n4tE/TfiWfsZmK1I/AAAAAAAAADU/dUpj7mAgMh8/s1600/STEPS+to+Create+External+Bank+Account.JPG]

Posted19thAugust2012byKrishnareddy
1 Viewcomments

Teamsearch 4June2015at04:11
HiKrishna,
Idon'tmindsomebodycopyingthearticlesfrommywebsitewww.shareoracleapps.com.But,iexpectthem
togiveacreditwithabacklink.Hopesnothingwronginthat.Anyhow,thankyouforvisitingmyblog.
http://www.shareoracleapps.com/2011/05/importexternalbankaccountsr12.html
Regards,
TeamSearch
Reply

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

11/12

22/03/2016

IMPORTEXTERNALBANKACCOUNTSR12ORACLEAPPS

Enteryourcomment...

Commentas:

Publish

Unknown(Google)

Preview

http://oracleappsviews.blogspot.in/2012/08/importexternalbankaccountsr12.html

Signout

Notifyme

12/12

You might also like