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.
declare
px_customer_acount_site_record hz_cust_account_site_v2pub.cust_acct_site_rec_type;
begin
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,
px_customer_acount_site_record,
n_cust_acct_site_id, --returned
v_return_status, --To indicagte success
n_msg_count, --
v_msg_data);
end ;
The last step would be to create Customer Site Usage by calling API hz_cust_account_site_v2pub.create_cust_site_use
Happy New Year 2023...! This is a blog for Oracle ERP lovers. BLOG - Begin Learning Oracle with Girish. :-)
Pages
OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.
I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.
I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.
I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.
Subscribe to:
Post Comments (Atom)
This comment has been removed by the author.
ReplyDelete