Create a Contact Point ( of type Phone)
=======================================================================
DECLAREp_contact_point_rec HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE;
p_edi_rec HZ_CONTACT_POINT_V2PUB.EDI_REC_TYPE;
p_email_rec HZ_CONTACT_POINT_V2PUB.EMAIL_REC_TYPE;
p_phone_rec HZ_CONTACT_POINT_V2PUB.PHONE_REC_TYPE;
p_telex_rec HZ_CONTACT_POINT_V2PUB.TELEX_REC_TYPE;
p_web_rec HZ_CONTACT_POINT_V2PUB.WEB_REC_TYPE;
x_return_status VARCHAR2(2000);
x_msg_coun t NUMBER;
x_msg_data VARCHAR2(2000);
x_contact_point_id NUMBER;
BEGIN
p_contact_point_rec.contact_point_type := ’PHONE’;
p_contact_point_rec.owner_table_name := ’HZ_PARTIES’;
p_contact_point_rec.owner_table_id := ’1272023’;
p_contact_point_rec.primary_flag := ’Y’;
p_contact_point_rec.contact_point_purpose := ’BUSINESS’;
p_phone_rec.phone_area_code := ’650’;
p_phone_rec.phone_country_code := ’1’;
p_phone_rec.phone_number := ’506-7000’;
p_phone_rec.phone_line_type := ’GEN’;
p_contact_point_rec.created_by_module := ’TCA_EXAMPLE’;
hz_contact_point_v2pub.create_contact_point( ’T’, p_contact_point_rec,
p_edi_rec, p_email_rec,
p_phone_rec,
p_telex_rec,
p_web_rec,
x_contact_point_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