-- You are downloading this API from www.erpschools.com

 

PROCEDURE ERPSCHOOLS_Cust_Account(x_party_id OUT NUMBER,

                x_cust_account_id OUT NUMBER)

AS

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);

 

BEGIN

p_cust_account_rec.account_name:='GaryTest2';

p_cust_account_rec.created_by_module:='API_EXAMPLE';

p_cust_account_rec.orig_system_reference:='01-01-22';

p_organization_rec.organization_name:='Gary P Menon';

p_organization_rec.created_by_module:='API_EXAMPLE';

--dbms_output.put_line('before insert');

hz_cust_account_v2pub.create_cust_account(

                                          'T',

                                          p_cust_account_rec,

                                          p_organization_rec,

                                          p_customer_profile_rec,

                                          'F',

                                          x_cust_account_id,

                                          x_account_number,

                                          x_party_id,

                                          x_party_number,

                                          x_profile_id,

                                          x_return_status,

                                          x_msg_count,

                                          x_msg_data);

 

dbms_output.put_line('aftye insert '|| x_msg_count || x_msg_data);

dbms_output.put_line('x_cust_account_id: '||x_cust_account_id);

dbms_output.put_line('x_account_number: '||x_account_number);

dbms_output.put_line('x_party_id: '||x_party_id);

dbms_output.put_line('x_party_number: '||x_party_number);

dbms_output.put_line('x_profile_id: '||x_profile_id);

dbms_output.put_line('x_return_status: '||x_return_status);

dbms_output.put_line('x_msg_count: '||x_msg_count);

dbms_output.put_line('x_msg_data: '||x_msg_data);

 

END;