API To Create Person Typ
API To Create Person Typ
Page 1 of 5
USEFUL LINKS
AP AOL AR
ARTICLE INDEX
CE IBY GL SLA
VIDEO INDEX
INV PO OM OPM TCA SOA WF
Oracle
Loading
R12
API
Java Apps
API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)
DESCRIPTION: This routine is used to create a Customer Account. The API creates a record in the HZ_CUST_ACCOUNTS table for type Person. Account can be created for an existing party by passing party_id of the party. Alternatively, this routine creates a new party and an account for the party. Customer profile record in the HZ_CUSTOMER_PROFILES table can also be created while calling this routine based on value passed in p_customer_profile_rec. The routine is overloaded for Person and Organization. If an orig_system_reference is passed in, the API creates a record in the HZ_ORIG_SYS_REFERENCES table to store the mapping
http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html
10/7/2013
API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...
Page 2 of 5
between the source system reference and the TCA primary key. If orig_system_reference is not passed in, the default is UNKNOWN. API: HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT BASE TABLES AFFECTED : HZ_PARTIES, HZ_CUST_ACCOUNTS , HZ_CUSTOMER_PROFILES TEST INSTANCE : R12.1.3 NOTE: p_create_profile_amt indicates whether to create profile amounts for the customer profile being created. If value equals to FND_API.G_TRUE, profile amounts will be created by copying over the profile amounts for the profile class on which this customer profile is based.
SCRIPT:
SET SERVEROUTPUT ON; DECLARE p_cust_account_rec p_person_rec x_cust_account_id x_account_number x_party_id x_party_number x_profile_id x_return_status x_msg_count x_msg_data BEGIN -- Setting the Context -mo_global.init('AR'); fnd_global.apps_initialize ( user_id ,resp_id mo_global.set_policy_context('S',204); fnd_global.set_nls_context('AMERICAN'); -- Initializing the Mandatory API parameters p_cust_account_rec.account_name p_person_rec.person_first_name p_person_rec.person_last_name := 'TEST_PERSON_ACCT'; := 'Team'; := 'Search'; p_cust_account_rec.created_by_module := 'BO_API'; => 1318 => 50559 HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE; HZ_PARTY_V2PUB.PERSON_REC_TYPE; NUMBER; VARCHAR2(2000); NUMBER; VARCHAR2(2000); NUMBER; VARCHAR2(2000); NUMBER; VARCHAR2(2000);
p_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html
10/7/2013
API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...
Page 3 of 5
HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT ( p_init_msg_list p_cust_account_rec p_person_rec p_create_profile_amt x_cust_account_id x_account_number x_party_id x_party_number x_profile_id x_return_status x_msg_count x_msg_data ); IF x_return_status = fnd_api.g_ret_sts_success THEN COMMIT; DBMS_OUTPUT.PUT_LINE('Creation of Party of Type Person and customer account is Successful '); DBMS_OUTPUT.PUT_LINE('Output information ....'); DBMS_OUTPUT.PUT_LINE('x_cust_account_id DBMS_OUTPUT.PUT_LINE('x_account_number DBMS_OUTPUT.PUT_LINE('x_party_id DBMS_OUTPUT.PUT_LINE('x_party_number DBMS_OUTPUT.PUT_LINE('x_profile_id ELSE DBMS_OUTPUT.put_line ('Creation of Party of Type Person and customer account failed:'||x_msg_data); ROLLBACK; FOR i IN 1 .. 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); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('Completion of API'); END; / : '||x_cust_account_id); : '||x_account_number); : '||x_party_id); : '||x_party_number); : '||x_profile_id); => FND_API.G_TRUE, =>p_cust_account_rec, =>p_person_rec, =>'F', =>x_cust_account_id, =>x_account_number, =>x_party_id, =>x_party_number, =>x_profile_id, =>x_return_status, => x_msg_count, =>x_msg_data
p_customer_profile_rec=>p_customer_profile_rec,
VERFICATION SCRIPT:
SELECT party_id, party_number,
http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html
10/7/2013
API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...
Page 4 of 5
party_name, person_last_name, person_first_name, object_version_number, created_by_module FROM WHERE hz_parties party_id = '5426';
SELECT person_profile_id, party_id, effective_start_date, object_version_number, created_by_module FROM WHERE hz_person_profiles person_profile_id = '4524';
0 Responses to API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCOUNT)
Post a Comment
http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html
10/7/2013
API to create a Person Type Party and Customer Account TCA R12 (HZ_CUST_ACCO...
Page 5 of 5
Comment as:
Select profile...
Publish
Preview
NEWER POST
HOME
OLDER
Pages
Oracle EBS R12 Oracle E Business Suite Oracle ERP System
Search Results Video Tutorials!! List of All Posts Useful Links
Site Sta
All Rights Reserved Oracle Apps Knowledge Sharing | Blogger Template by Bloggermint
http://www.shareoracleapps.com/2011/03/api-to-create-person-type-party-and.html
10/7/2013