<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content



Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Financials arrow Creating Customer Address in TCA - Step by Step
This website has now moved to http://apps2fusion.com

Creating Customer Address in TCA - Step by Step | Print |  E-mail
Written by Anil Passi   
Monday, 20 November 2006
To create an address for Customer using APIs [so that you can invoice them], is a multi-step task as outlined in brief below.

Addresses in Oracle TCA are stored in table named HZ_LOCATIONS.

To create Locations, Oracle TCA provides an API named hz_location_v2pub.create_location
This API returns Location_id once a physical address has been created.

The location_id can then be used to create Party Site.
To create party site, use hz_party_site_v2pub.create_party_site.
When calling this API, we can pass "Party Site name" alongside the location_id to which this site is attached..
This API then returns Party_site_id.

This Party_site_id can further be passed to another API hz_party_site_v2pub.create_party_site_use, which is where we specify Site Usage like Correspondance/Bilable etc.

Next thing is to make a Customer Site, so that you can start billing to the customer.
Lets say you already know the customer Account Id[assuming it already exists ] and the Party Site id(as created above).
Now to create the Customer Site, use the API call as below.

px_customer_acount_site_record hz_cust_account_site_v2pub.cust_acct_site_rec_type;
         px_customer_acount_site_record.cust_account_id := 90000;--lets assume
         px_customer_acount_site_record.party_site_id := 4323342;--the party site created above
         px_customer_acount_site_record.LANGUAGE := 'US';
         px_customer_acount_site_record.created_by_module := 'XX_SIEBEL';
         px_customer_acount_site_record.orig_system_reference :=
                                                  v_sibel_custom_site_num || 'CALLCENTRE';
         hz_cust_account_site_v2pub.create_cust_acct_site (FND_API.G_TRUE,
                                                           n_cust_acct_site_id, --returned
                                                           v_return_status, --To indicagte success
                                                           n_msg_count, --
end ;
The last step would be to create Customer Site Usage by calling API hz_cust_account_site_v2pub.create_cust_site_use

Comments (7)add
written by vivek , March 09, 2007
hi anil ur article is very nice but i want to create site with new locations suppose in one operating unit one site is already created with locations than i want to create new site with locations to anthoer operating unit

means user want to everything is same only location is diffrent for customer
for this they want to pass paramenter for location and want to create site automatically
how to use APIs please help me
written by Anil Passi , June 19, 2007
Hi Arun

In this case, you should use the update API during the second call, because you wish to modify an existing Customer record.

written by Smitha , June 19, 2007
Hi Anil,

I have a question in AR. How to import Customer Accounts? Like we have interface tables such as ra_customers_interface_all for customer data and ra_customer_profiles_int_all for profiles. What is for Customer Acounts?
written by Anil Passi , June 19, 2007
Hi Smitha

You should use the TCA API instead of using the interface tables.

In TCA, first create a party and then create customer account

Metalink has plenty of examples

written by srikanth , September 26, 2007
Hi Anil,

Can i have some articles or any material which helps me to understand the following
1. Creation of customers, parties, party_sites, customer accounts in applications from front end.
---> how it affects the tables or which tables it stores.
2. TCA
Create a new location using the Tax Location and Rates form..
written by Ankush , March 07, 2008
I am creating new location using API hz_location_v2pub.create_location.
But when i use hz_cust_account_site_v2pub.create_cust_acct_site to create customer site it gives me error saying ORA-20000: APP-11028: Location "STATE COUNTY CITY
MAHARASHTRA PUNE" does not exist. Create a new location using the Tax Location and Rates form..

can u please help me.
How to use existing Bill to and Ship to addresses for a new customer
written by Keyur C Joshi , March 07, 2008
Hello Anil,
While defining new customer account in Accounts Receivables, is it possible to use the existing customer addresses as bill to and ship to for the new customer site which is being created?

You must be logged in to a comment. Please register if you do not have an account yet.