Customer Creation

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

/* Formatted on 10/6/2010 3:49:34 PM (QP5 v5.149.1003.

31008) */
DECLARE
p_customer xxnsn_customer_t;
x_return_status VARCHAR2 (1);
x_msg_data VARCHAR2 (2000);
BEGIN
p_customer :=
xxnsn_customer_t (
xxnsn_party_table (xxnsn_party_t ('Create', --Action_type
'2-AA', --Customer_ID
'2-AA', --Customer_First_name
NULL,
--Customer_Middle_name
NULL, --Customer_Last_name
NULL, --Customer_email_id
'#25/5, MG Road',
--Cust_Address_Line_1
NULL, --Cust_Address_Line_2
NULL, --Cust_Address_Line_3
NULL, --Cust_Address_Line_4
'Bangalore', --Cust_City
'560030', --Cust_ZipCode
NULL, --Cust_State
'IN', --Cust_Country
'PERSON', --Customer_type
NULL,
--Customer_Reg_Number
NULL
--Customer_Tax_Reference_Number
)),
xxnsn_account_table (
xxnsn_account_t (
'Create', --Action_Type
'2-AA_service', --Account_ID
'2-AA_service', --Account_First_Name
NULL, --Account_Middle_Name
NULL, --Account_Last_Name
NULL, --Organization_Name
'#25/4, MG Road', --Address_Line_1
NULL, --Address_Line_2
NULL, --Address_Line_3
NULL, --Address_Line_4
'Bangalore', --city
'560030', --zipcode
NULL, --state
'IN', --country
'SERVICE', --classfication
'2-AA', --Parent_Customer_ID
NULL, --Parent_Account_ID
NULL, --Language
NULL, --Currency
NULL, --Suspended_By
NULL, --Payment_Term
NULL, --Account_Type
xxnsn_billing_profile_table (
xxnsn_billing_profile_t ('ENG', --Billiing Language
'1', --Bill_Cycle
'Cash', --Payment_Method
'Open', --Payment_Type
'Email', --Dispatch_Mode
'HybridInvoice', --Hybrid Invoice
'HybridStatement', -- Hybrid Statement
NULL)),
xxnsn_contact_table (xxnsn_contact_t ('2-AA_Contact', --Contact_ID
'2-AA_Contact', --Contact_Frist_Name
NULL, --Contact_Middle_Name
NULL, --Contact_Last_Name
NULL, --Contact_email_address
NULL, --Contact_Address_Line_1
NULL, --Contact_Address_Line_2
NULL, --Contact_Address_Line_3
NULL, --Contact_Address_Line_4
NULL, --Contact_City
NULL, --Contact_ZipCode
NULL, --Contact_State
NULL) --Contact_Country
)),
xxnsn_account_t (
'Create', --Action_Type
'2-AA_Billing', --Account_ID
'2-AA_Billing', --Account_First_Name
NULL, --Account_Middle_Name
NULL, --Account_Last_Name
NULL, --Organization_Name
'#25/4, MG Road', --Address_Line_1
NULL, --Address_Line_2
NULL, --Address_Line_3
NULL, --Address_Line_4
'Bangalore', --city
'560030', --zipcode
NULL, --state
'IN', --country
'BILLING', --classfication
'2-AA', --Parent_Customer_ID
'2-AA_service', --Parent_Account_ID
NULL, --Language
NULL, --Currency
NULL, --Suspended_By
NULL, --Payment_Term
NULL, -- Account_Type
xxnsn_billing_profile_table (
xxnsn_billing_profile_t ('ENG', --Billiing Language
'1', --Bill_Cycle
'Cash', --Payment_Method
'Open', --Payment_Type
'Email', --Dispatch_Mode
'Invoice',
'Statment',
NULL)),
xxnsn_contact_table (xxnsn_contact_t ('2-AA_Contact', --Contact_ID
'2-AA_Contact', --Contact_Frist_Name
NULL, --Contact_Middle_Name
NULL, --Contact_Last_Name
NULL, --Contact_email_address
NULL, --Contact_Address_Line_1
NULL, --Contact_Address_Line_2
NULL, --Contact_Address_Line_3
NULL, --Contact_Address_Line_4
NULL, --Contact_City
NULL, --Contact_ZipCode
NULL, --Contact_State
NULL) --Contact_Country
))));
xxnsn_customer_pkg.
process_customer (p_customer => p_customer,
x_return_status => x_return_status,
x_msg_data => x_msg_data);
DBMS_OUTPUT.put_line ('x_return_status ' || x_return_status);
DBMS_OUTPUT.put_line (SUBSTR ('x_msg_data ' || x_msg_data, 1, 255));
END;
/

You might also like