Friday, April 2, 2021

API to create a Web contact point in TCA Oracle Apps R12 (HZ_CONTACT_POINT_V2PUB.CREATE_WEB_CONTACT_POINT)

 

 

 

 

 

 

 



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

API used: HZ_CONTACT_POINT_V2PUB.CREATE_WEB_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_web_rec_type hz_contact_point_v2pub.web_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.contact_point_type := 'WEB'; lr_contact_point_rec_type.created_by_module := 'TCA_V2_API'; lr_contact_point_rec_type.primary_flag := 'N'; lr_contact_point_rec_type.owner_table_name := 'HZ_PARTIES'; lr_contact_point_rec_type.owner_table_id := 4168; lr_web_rec_type.web_type := 'HTTP'; lr_web_rec_type.url := 'www.shareoracleapps.com'; hz_contact_point_v2pub.create_web_contact_point ( p_init_msg_list => lv_init_msg_list, p_contact_point_rec => lr_contact_point_rec_type, p_web_rec => lr_web_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 Email is completed'); COMMIT; EXCEPTION WHEN OTHERS THEN dbms_output.put_line ('Error:' || SQLERRM); ROLLBACK; END;

 

0 Responses to “API to create a Web contact point in TCA Oracle Apps R12 (HZ_CONTACT_POINT_V2PUB.CREATE_WEB_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.