Sunday, May 9, 2021

API to create a Phone Contact Point in TCA Oracle Apps R12 (HZ_CONTACT_POINT_V2PUB.CREATE_PHONE_CONTACT_POINT)

 

 

 

 

 

 

 

In this post, we have given a sample script to create a PHONE contact point for a Party in TCA (Trading Community Architecture).

API used: HZ_CONTACT_POINT_V2PUB.CREATE_PHONE_CONTACT_POINT

Tested Instance: R12.2.4

Script:

SET SERVEROUTPUT ON; DECLARE lv_init_msg_list VARCHAR2(200) DEFAULT fnd_api.g_true; lv_return_status VARCHAR2(200); ln_msg_count NUMBER; lv_msg_data VARCHAR2(2000); lv_msg VARCHAR2(2000); ln_contact_point_id NUMBER; ln_object_version_number NUMBER; lr_contact_point_rec_type hz_contact_point_v2pub.contact_point_rec_type; lr_phone_rec_type hz_contact_point_v2pub.phone_rec_type; BEGIN lr_contact_point_rec_type.actual_content_source := hz_contact_point_v2pub.g_miss_content_source_type; lr_contact_point_rec_type.owner_table_name := 'HZ_PARTIES'; lr_contact_point_rec_type.owner_table_id := 1234; lr_contact_point_rec_type.contact_point_type := 'PHONE'; lr_contact_point_rec_type.created_by_module := 'TCA_V2_API'; lr_contact_point_rec_type.primary_flag := 'N'; lr_phone_rec_type.phone_line_type := 'GEN'; lr_phone_rec_type.phone_area_code := '+91'; lr_phone_rec_type.phone_number := '1234567890'; hz_contact_point_v2pub.create_phone_contact_point ( p_init_msg_list => lv_init_msg_list, p_contact_point_rec => lr_contact_point_rec_type, p_phone_rec => lr_phone_rec_type, x_contact_point_id => ln_contact_point_id, x_return_status => lv_return_status, x_msg_count => ln_msg_count, x_msg_data => lv_msg_data ); dbms_output.put_line ('API Status: ' || lv_return_status); IF (lv_return_status <> 'S') THEN dbms_output.put_line ('ERROR :' || lv_msg_data); END IF; dbms_output.put_line ('Create Phone is completed'); COMMIT; EXCEPTION WHEN OTHERS THEN dbms_output.put_line ('Error:' || SQLERRM); ROLLBACK; END;


0 Responses to “API to create a Phone Contact Point in TCA Oracle Apps R12 (HZ_CONTACT_POINT_V2PUB.CREATE_PHONE_CONTACT_POINT)”

Post a Comment

Disclaimer

The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.