Tuesday, 28 August 2012

CUSTOMER API FOR CREATE CUSTOMER ACCOUNT

CUSTOMER API FOR CREATE CUSTOMER ACCOUNT

=======================================================================
DECLARE
p_cust_account_rec HZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;
p_person_rec HZ_PARTY_V2PUB.PERSON_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 := ’John’’s A/c’;
p_cust_account_rec.created_by_module := ’TCA_EXAMPLE’;
p_person_rec.person_first_name := ’John’;
p_person_rec.person_last_name := ’Smith’;
hz_cust_account_v2pub.create_cust_account( ’T’, p_cust_account_rec, p_person_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(SubStr(’x_return_status = ’||x_return_status,
1,255));
dbms_output.put_line(’x_msg_count = ’||TO_CHAR(x_msg_count));
dbms_output.put_line(SubStr(’x_msg_data = ’||x_msg_data,1,255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count
LOOP
dbms_output.put_line(I||’. ’||SubStr(FND_MSG_PUB.Get(p_encoded =>
FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;

================================================================================= 

No comments:

Post a Comment

AP Invoice Notes related Table details in Oracle Fusion

 What is the table that stores the AP Invoice notes? AP notes are stored in ZMM_NOTES table with SOURCE_OBJECT_CODE = 'AP_STANDARD_INVOI...