------------------------------------
-- 1a. Setup the Org_id
------------------------------------
exec dbms_application_info.set_client_info('204');
------------------------------------
-- 1b. Show the output variables
------------------------------------
set serveroutput on
------------------------------------
-- 2a. Create a party and an account
------------------------------------
DECLARE
p_cust_account_rec HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;
p_organization_rec HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE;
p_customer_profile_rec
HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
x_cust_account_id NUMBER;
x_account_number VARCHAR2(2000);
x_party_id NUMBER;
x_party_number VARCHAR2(2000);
x_profile_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
p_create_profile_amt VARCHAR2(2000);
BEGIN
-- record for the account
p_cust_account_rec.account_name := 'FennerProfAPIamtc002';
p_cust_account_rec.created_by_module := 'TCAPI_EXAMPLE';
-- p_cust_account_rec.orig_system_reference := '001_001'; -- is not mandatory
-- record for the organization
p_organization_rec.organization_name := 'FennerProfAPIamtc002';
p_organization_rec.created_by_module := 'TCAPI_EXAMPLE';
-- record for the profile (this will use he DEFAULT profile but change these fields)
p_customer_profile_rec.credit_checking := 'Y';
p_customer_profile_rec.interest_charges := 'N';
-- as interest charges is N, you need to set this two values in null
p_customer_profile_rec.charge_on_finance_charge_flag := FND_API.G_MISS_CHAR;
p_customer_profile_rec.interest_period_days := FND_API.G_MISS_NUM;
p_customer_profile_rec.created_by_module := 'TCAPI_EXAMPLE';
-- Record for the profile amounts
-- You are not able to assign values for the amounts in this API
-- As you want to create specific values for the amounts set the field in 'F'
p_cust_account_rec HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;
p_organization_rec HZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE;
p_customer_profile_rec
HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
x_cust_account_id NUMBER;
x_account_number VARCHAR2(2000);
x_party_id NUMBER;
x_party_number VARCHAR2(2000);
x_profile_id NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
p_create_profile_amt VARCHAR2(2000);
BEGIN
-- record for the account
p_cust_account_rec.account_name := 'FennerProfAPIamtc002';
p_cust_account_rec.created_by_module := 'TCAPI_EXAMPLE';
-- p_cust_account_rec.orig_system_reference := '001_001'; -- is not mandatory
-- record for the organization
p_organization_rec.organization_name := 'FennerProfAPIamtc002';
p_organization_rec.created_by_module := 'TCAPI_EXAMPLE';
-- record for the profile (this will use he DEFAULT profile but change these fields)
p_customer_profile_rec.credit_checking := 'Y';
p_customer_profile_rec.interest_charges := 'N';
-- as interest charges is N, you need to set this two values in null
p_customer_profile_rec.charge_on_finance_charge_flag := FND_API.G_MISS_CHAR;
p_customer_profile_rec.interest_period_days := FND_API.G_MISS_NUM;
p_customer_profile_rec.created_by_module := 'TCAPI_EXAMPLE';
-- Record for the profile amounts
-- You are not able to assign values for the amounts in this API
-- As you want to create specific values for the amounts set the field in 'F'