466:
467: CLOSE check_ecx_tp_hdr;
468:
469: IF NOT l_found THEN
470: ecx_tp_api.create_trading_partner(
471: x_return_status => l_retcode,
472: x_msg => l_retmesg,
473: x_tp_header_id => l_tp_hdr_id,
474: p_party_type => 'I',
477: p_company_admin_email => p_email_id
478: );
479: IF (l_Debug_Level <= 1 ) THEN
480: itg_debug_pub.Add('---------------------------------',1);
481: itg_debug_pub.Add('ecx_tp_api.create_trading_partner returns normal',1);
482: itg_debug_pub.Add('x_return_status ' || l_retcode ,1);
483: itg_debug_pub.Add('x_msg ' || l_retmesg ,1);
484: itg_debug_pub.Add('x_tp_header_id ' || l_tp_hdr_id ,1);
485: itg_debug_pub.Add('---------------------------------',1);
486: END IF;
487: ELSE
488: -- this is an overkill for ITG
489: -- the email id will not be used for anything
490: ecx_tp_api.update_trading_partner(
491: x_return_status => l_retcode,
492: x_msg => l_retmesg,
493: p_tp_header_id => l_tp_hdr_id,
494: p_company_admin_email => p_email_id
495: );
496:
497: IF (l_Debug_Level <= 1 ) THEN
498: itg_debug_pub.Add('---------------------------------',1);
499: itg_debug_pub.Add('ecx_tp_api.update_trading_partner returns normal',1);
500: itg_debug_pub.Add('x_return_status ' || l_retcode ,1);
501: itg_debug_pub.Add('x_msg ' || l_retmesg ,1);
502: itg_debug_pub.Add('---------------------------------' ,1);
503: END IF;
833: -- If detail record is present it updates else inserts
834: -- Arguments
835: -- x_err_buf => API param for concurrent program calls
836: -- x_retcode => API param for concurrent program calls
837: --
839: -- none
840: PROCEDURE add_or_update_tp_detail(
841: x_errbuf OUT NOCOPY VARCHAR2,
1034: RETURN;
1035: END;
1036:
1037: IF NOT l_record_found THEN
1038: ecx_tp_api.create_tp_detail(
1039: x_return_status => l_retcode,
1040: x_msg => l_retmesg,
1041: x_tp_detail_id => l_tp_dtl_id,
1042: p_tp_header_id => p_tp_hdr_id,
1055: );
1056:
1057: IF (l_Debug_Level <= 1) THEN
1058: itg_debug_pub.Add('----------------------------' ,1);
1059: itg_debug_pub.Add('ecx_tp_api.create_tp_detail returns normal',1);
1060: itg_debug_pub.Add('l_retcode ' || l_retcode ,1);
1061: itg_debug_pub.Add('l_retmesg ' || l_retmesg ,1);
1062: itg_debug_pub.Add('l_tp_dtl_id ' || l_tp_dtl_id ,1);
1063: itg_debug_pub.Add('----------------------------',1);
1062: itg_debug_pub.Add('l_tp_dtl_id ' || l_tp_dtl_id ,1);
1063: itg_debug_pub.Add('----------------------------',1);
1064: END IF;
1065: ELSE
1066: ecx_tp_api.update_tp_detail(
1067: x_return_status => l_retcode,
1068: x_msg => l_retmesg,
1069: p_tp_detail_id => l_tp_dtl_id,
1070: p_map_code => p_map,
1084:
1085:
1086: IF (l_Debug_Level <= 1) THEN
1087: itg_debug_pub.Add('----------------------------' ,1);
1088: itg_debug_pub.Add('ecx_tp_api.update_tp_detail returns normal',1);
1089: itg_debug_pub.Add('l_retcode ' || l_retcode ,1);
1090: itg_debug_pub.Add('l_retmesg ' || l_retmesg ,1);
1091: itg_debug_pub.Add('----------------------------',1);
1092: END IF;