The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE update_collab_setattr(
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
resultout IN OUT NOCOPY VARCHAR2
)
IS
l_fnd_msg_key VARCHAR2(50);
cln_debug_pub.Add('========= Entering update_collab_setattr == ',2);
cln_debug_pub.Add('M4U:====== Exiting update_collab_setattr - Normal : resultout - ' || resultout,2);
CLN_CH_COLLABORATION_PKG.UPDATE_COLLABORATION(
x_return_status => l_return_status,
x_msg_data => l_msg_data,
p_coll_id => l_ecx_parameter1,
p_xmlg_transaction_type => l_xmlg_transaction_type,
p_xmlg_transaction_subtype => l_xmlg_transaction_subtype,
p_xmlg_document_id => l_xmlg_document_id,
p_disposition => l_disposition,
p_coll_status => l_coll_status,
p_doc_type => l_doc_type,
p_doc_dir => 'OUT',
p_coll_pt => l_coll_pt,
p_doc_status => l_doc_status,
p_notification_id => NULL,
p_msg_text => l_fnd_msg_key,
p_xmlg_msg_id => l_xmlg_message_id,
p_unique1 => l_unique1,
p_unique2 => l_unique2,
p_unique3 => l_unique3,
p_unique4 => l_unique4,
p_unique5 => l_unique5,
p_tr_partner_type => m4u_ucc_utils.c_party_type,
p_tr_partner_id => m4u_ucc_utils.g_party_id,
p_tr_partner_site => m4u_ucc_utils.g_party_site_id,
p_rosettanet_check_required => FALSE,
x_dtl_coll_id => l_coll_dtl_id
);
cln_debug_pub.add('collaboration history updated for cln_id - ' || l_coll_id,1);
FND_MESSAGE.SET_NAME('CLN','M4U_UPDATE_COLL_FAILURE');
/* 'Update Collaboration Failed. Details are
Collaboration type : COLLTYPE
Collaboration Id : COLLID
Document type : DOCTYPE
Event Key : EVTKEY
Item Type : ITMTYPE
Error Code : ERRCODE
Failure Reason : MSG
*/
FND_MESSAGE.SET_TOKEN('COLL_TYPE',l_coll_type);
ego_uccnet_events_pub.update_event_disposition(
p_api_version => 1.0,
p_cln_id => l_ecx_parameter1,
p_disposition_code => 'FAILED',
p_disposition_date => sysdate,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data );
cln_debug_pub.Add('ego_uccnet_events_pub.update_event_disposition - returns', 1);
cln_debug_pub.Add('====== Exiting m4u_xml_genprocess_out.update_cln_collaborations - Normal : resultout-' || resultout,2);
ego_uccnet_events_pub.update_event_disposition(
p_api_version => 1.0,
p_cln_id => l_ecx_parameter1,
p_disposition_code => 'FAILED',
p_disposition_date => sysdate,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data );
cln_debug_pub.Add('ego_uccnet_events_pub.update_event_disposition - returns', 1);
FND_MESSAGE.SET_NAME('CLN','M4U_UPDATE_COLL_FAILURE');
/* 'Update Collaboration Failed. Details are
Collaboration type : COLLTYPE
Collaboration Id : COLLID
Document type : DOCTYPE
Event Key : EVTKEY
Item Type : ITMTYPE
Error Code : ERRCODE
Failure Reason : MSG
*/
FND_MESSAGE.SET_TOKEN('COLL_TYPE',l_coll_type);
cln_debug_pub.Add('====== Exiting m4u_xml_genprocess_out.update_collab_setattr - Normal : resultout-' || resultout,2);
FND_MESSAGE.SET_NAME('CLN','M4U_UPDATE_COLL_FAILURE');
cln_debug_pub.Add('=========== Exiting m4u_xml_genprocess_out.update_collab_setattr - Exception =========== ',2);
wf_Core.context('m4u_xml_genprocess_out','update_collab_setattr',
itemtype, itemkey, to_char(actid), funcmode);
l_doc_owner ego_uccnet_events.last_updated_by%TYPE;
SELECT e.event_action, e.gtin, e.top_gtin,
e.last_updated_by,e.target_market, e.tp_gln,
e.organization_id, f.user_name, mtlkfv.concatenated_segments
FROM ego_uccnet_events e,
fnd_user f,
mtl_system_items_kfv mtlkfv
WHERE e.batch_id = p_batchid
AND e.subbatch_id = p_subbatch_id
AND e.gtin = e.top_gtin
AND e.event_type = p_event_type
AND e.INVENTORY_ITEM_ID = mtlkfv.INVENTORY_ITEM_ID
AND e.ORGANIZATION_ID = mtlkfv.ORGANIZATION_ID
AND e.last_updated_by = f.user_id(+);
/* create CLN collaboration and update the ego_uccnet_events with CLN-id*/
/* this CLN-d will be used as command level identifier in the map */
cln_ch_collaboration_pkg.create_collaboration(
x_return_status => x_return_status,
x_msg_data => x_msg_data,
p_app_id => m4u_ucc_utils.c_resp_appl_id,
p_ref_id => NULL,
p_org_id => m4u_ucc_utils.g_org_id,
p_rel_no => NULL,
p_doc_no => l_gtin,
p_doc_owner => l_doc_owner,
p_xmlg_int_transaction_type => l_xmlg_transaction_type,
p_xmlg_int_transaction_subtype=> l_xmlg_transaction_subtype,
p_xmlg_transaction_type => l_xmlg_transaction_type,
p_xmlg_transaction_subtype => l_xmlg_transaction_subtype,
p_xmlg_document_id => l_xmlg_document_id,
p_coll_type => l_coll_type,
p_tr_partner_type => m4u_ucc_utils.c_party_type,
p_tr_partner_site => m4u_ucc_utils.g_party_site_id,
p_doc_creation_date => sysdate,
p_doc_revision_date => sysdate,
p_init_date => sysdate,
p_doc_type => l_doc_type,
p_doc_dir => 'OUT',
p_coll_pt => 'APPS',
p_xmlg_msg_id => NULL,
p_rosettanet_check_required => FALSE,
x_coll_id => x_coll_id,
p_msg_text => 'M4U_REGISTRATION_INITIATED',
p_xml_event_key => itemkey,
p_attribute1 => m4u_ucc_utils.g_host_gln,
p_attribute2 => l_target_market,
p_attribute3 => l_ego_batch_id,
p_attribute4 => l_ego_subbatch_id,
p_attribute5 => m4u_ucc_utils.g_supp_gln,
p_attribute6 => l_tp_gln,
p_attribute12 => l_xmlg_document_id,
p_partner_doc_no => l_item_number,
p_collaboration_standard => 'UCCNET',
p_owner_role => l_owner_role);
PROCEDURE update_batchcollab_setattr(
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
resultout IN OUT NOCOPY VARCHAR2
)
IS
x_return_status VARCHAR2(10);
SELECT distinct hdr.collaboration_id
FROM cln_coll_hist_hdr hdr, cln_coll_hist_dtl dtl
WHERE hdr.attribute3 = p_batchid
AND hdr.attribute4 = p_subbatch_id
AND COLLABORATION_DOCUMENT_TYPE = p_coll_doc_type
AND hdr.collaboration_id = dtl.collaboration_id
AND hdr.xmlg_transaction_type = 'M4U';*/
SELECT collaboration_id
FROM cln_coll_hist_hdr
WHERE attribute3 = p_batchid
AND attribute4 = p_subbatch_id
AND collaboration_type = p_coll_type
AND xmlg_transaction_type = 'M4U';
cln_debug_pub.Add('========= Entering update_batchcollab_setattr == ',2);
cln_debug_pub.Add('====== Exiting m4u_xml_genprocess_out.update_cln_collaborations - Normal : resultout-' || resultout,2);
cln_ch_collaboration_pkg.update_collaboration(
x_return_status => x_return_status,
x_msg_data => x_msg_data,
p_coll_id => rec_cln_ids.collaboration_id,
p_msg_text => l_fnd_msg_key,
p_xmlg_msg_id => l_ecx_msgid,
p_xmlg_transaction_type => l_xmlg_transaction_type,
p_xmlg_transaction_subtype => l_xmlg_transaction_subtype ,
p_xmlg_int_transaction_type => l_xmlg_transaction_type,
p_xmlg_int_transaction_subtype => l_xmlg_transaction_subtype ,
p_doc_dir => 'OUT',
p_doc_type => l_cln_doc_type,
p_disposition => l_disposition,
p_doc_status => l_doc_status,
p_coll_status => l_coll_status,
p_xmlg_document_id => l_ecx_doc_id,
p_tr_partner_type => m4u_ucc_utils.c_party_type,
p_tr_partner_id => m4u_ucc_utils.g_party_id,
p_tr_partner_site => m4u_ucc_utils.g_party_site_id,
p_rosettanet_check_required => false,
x_dtl_coll_id => l_dtl_coll_id );
cln_debug_pub.add('collaboration history updated for cln_id - ' || rec_cln_ids.collaboration_id,1);
FND_MESSAGE.SET_NAME('CLN','M4U_OUT_UPDATE_COLL_FAILURE');
ego_uccnet_events_pub.update_event_disposition(
p_api_version => 1.0,
p_cln_id => rec_cln_ids.collaboration_id,
p_disposition_code => 'FAILED',
p_disposition_date => sysdate,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data );
cln_debug_pub.Add('ego_uccnet_events_pub.update_event_disposition - returns', 1);
cln_debug_pub.Add('====== Exiting m4u_xml_genprocess_out.update_cln_collaborations - Normal : resultout-' || resultout,2);
ego_uccnet_events_pub.update_event_disposition(
p_api_version => 1.0,
p_cln_id => rec_cln_ids.collaboration_id,
p_disposition_code => 'FAILED',
p_disposition_date => sysdate,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data );
cln_debug_pub.Add('ego_uccnet_events_pub.update_event_disposition - returns', 1);
cln_debug_pub.Add('==========Exiting update_batchcollab_setattr ======', 2);
FND_MESSAGE.SET_NAME('CLN','M4U_OUT_UPDATE_COLL_FAILURE');
cln_debug_pub.Add('======EXITING m4u_xml_genprocess_out.update_cln_collaborations exception', 2);
wf_Core.context('m4u_wlq_generate','wlq_update_cln_collab',
itemtype, itemkey, to_char(actid), funcmode);