Create Customer Account Site API

TCA Create Customer Account Site API

Name of the API : CREATE CUSTOMER ACCOUNT SITE
Base Tables Affected : HZ_CUST_ACCT_SITES
PL/SQL Procedure used : CREATE_CUST_ACCT_SITE
Package Used : HZ_CUST_ACCOUNT_SITE_V2PUB
Mandatory Parameters :
Parameter Name Parameter Type Data Type
p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE
p_cust_acct_site_rec IN CUST_ACCT_SITE_REC_TYPE
x_cust_acct_site_id OUT NUMBER
x_return_status OUT VARCHAR2
x_msg_count OUT NUMBER
x_msg_data OUT VARCHAR2

Procedure:

 General Tips for Running the Create Customer Account Site API:
a) Save the API in a script file and then run the script from the SQL Prompt (Example : RUN createcustacctsite.sql)
b) Enter the values for the Cust_Account_Id and Party_Site_id from the SQL prompt itself as hard coding these two parameters means the script has to be changed for the value of these two parameters each time a new Customer Account Site is created.
c) To Select the Customer Account Id run the query:
SELECT cust_account_id FROM hz_cust_accounts;
d) To Select the Party Site Id run the Query :
SELECT party_site_id FROM hz_party_sites;
e) Set the organization id before running the script as :
EXEC fnd_client_info.set_org_context(‘<orgid>’); for 11i
OR For R12
EXEC mo_global.init (‘AR’);
EXEC mo_global.set_org_context(<org_id>, NULL, ‘AR’);
EXEC fnd_global.set_nls_context(‘AMERICAN’);
EXEC mo_global.set_policy_context(‘S’, <org_id>);

Example For Running a Create Customer Account Site API:

 Sample Output of the Create Customer Account Site Script:

x_return_status = S
x_msg_count = 0
Customer Account Site Id is = 12743
x_msg_data =

Script To Verify whether the Create Customer Account Site API is successful:

 

Related posts:

Leave a Reply