[Home] [Help]
16: l_key VARCHAR2(240);
17: l_exist VARCHAR2(1);
18: l_event_name VARCHAR2(240) := 'oracle.apps.ar.cmgt.CreditRequestRecommendation.implement';
19: l_credit_request_id NUMBER;
20: l_source_name AR_CMGT_CREDIT_REQUESTS.source_name%TYPE;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
17: l_exist VARCHAR2(1);
18: l_event_name VARCHAR2(240) := 'oracle.apps.ar.cmgt.CreditRequestRecommendation.implement';
19: l_credit_request_id NUMBER;
20: l_source_name AR_CMGT_CREDIT_REQUESTS.source_name%TYPE;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
18: l_event_name VARCHAR2(240) := 'oracle.apps.ar.cmgt.CreditRequestRecommendation.implement';
19: l_credit_request_id NUMBER;
20: l_source_name AR_CMGT_CREDIT_REQUESTS.source_name%TYPE;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
19: l_credit_request_id NUMBER;
20: l_source_name AR_CMGT_CREDIT_REQUESTS.source_name%TYPE;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
20: l_source_name AR_CMGT_CREDIT_REQUESTS.source_name%TYPE;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
28: l_source_org_id ar_cmgt_credit_requests.SOURCE_ORG_ID%type;
21: l_source_column1 AR_CMGT_CREDIT_REQUESTS.source_column1%TYPE;
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
28: l_source_org_id ar_cmgt_credit_requests.SOURCE_ORG_ID%type;
29: l_case_folder_exists VARCHAR2(1);
22: l_source_column2 AR_CMGT_CREDIT_REQUESTS.source_column2%TYPE;
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
28: l_source_org_id ar_cmgt_credit_requests.SOURCE_ORG_ID%type;
29: l_case_folder_exists VARCHAR2(1);
30:
23: l_source_column3 AR_CMGT_CREDIT_REQUESTS.source_column3%TYPE;
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
28: l_source_org_id ar_cmgt_credit_requests.SOURCE_ORG_ID%type;
29: l_case_folder_exists VARCHAR2(1);
30:
31: CURSOR get_case_folder_info (p_cf_id IN NUMBER) IS
24: l_source_user_id ar_cmgt_credit_requests.SOURCE_USER_ID%type;
25: l_source_resp_id ar_cmgt_credit_requests.SOURCE_RESP_ID%type;
26: l_source_resp_appln_id ar_cmgt_credit_requests.SOURCE_RESP_APPLN_ID%type;
27: l_source_security_group_id ar_cmgt_credit_requests.SOURCE_SECURITY_GROUP_ID%type;
28: l_source_org_id ar_cmgt_credit_requests.SOURCE_ORG_ID%type;
29: l_case_folder_exists VARCHAR2(1);
30:
31: CURSOR get_case_folder_info (p_cf_id IN NUMBER) IS
32: SELECT cr.credit_request_id,
36: cr.source_resp_id,
37: cr.source_resp_appln_id,
38: cr.source_security_group_id,
39: cr.source_org_id
40: FROM ar_cmgt_credit_requests cr,
41: ar_cmgt_case_folders cf
42: WHERE case_folder_id = p_cf_id
43: and cr.credit_request_id = cf.credit_request_id;
44:
509: itemKey => itemkey,
510: aname => 'CREDIT_ANALYST_DISPLAY_NAME',
511: avalue => l_display_name);
512:
513: UPDATE ar_cmgt_credit_requests
514: set credit_analyst_id = l_resource_id,
515: last_update_date = sysdate,
516: last_updated_by = fnd_global.user_id,
517: last_update_login = fnd_global.login_id
633: l_sic_code hz_parties.sic_code%type;
634: l_postal_code hz_parties.postal_code%type;
635: l_party_name hz_parties.party_name%type;
636: l_employees_total hz_parties.employees_total%type;
637: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
638: l_amount ar_cmgt_credit_requests.limit_amount%type;
639: l_review_type ar_cmgt_credit_requests.review_type%type;
640: l_profile_class_name hz_cust_profile_classes.name%type;
641: l_currency ar_cmgt_credit_requests.limit_currency%type;
634: l_postal_code hz_parties.postal_code%type;
635: l_party_name hz_parties.party_name%type;
636: l_employees_total hz_parties.employees_total%type;
637: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
638: l_amount ar_cmgt_credit_requests.limit_amount%type;
639: l_review_type ar_cmgt_credit_requests.review_type%type;
640: l_profile_class_name hz_cust_profile_classes.name%type;
641: l_currency ar_cmgt_credit_requests.limit_currency%type;
642: l_party_id hz_parties.party_id%type;
635: l_party_name hz_parties.party_name%type;
636: l_employees_total hz_parties.employees_total%type;
637: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
638: l_amount ar_cmgt_credit_requests.limit_amount%type;
639: l_review_type ar_cmgt_credit_requests.review_type%type;
640: l_profile_class_name hz_cust_profile_classes.name%type;
641: l_currency ar_cmgt_credit_requests.limit_currency%type;
642: l_party_id hz_parties.party_id%type;
643:
637: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
638: l_amount ar_cmgt_credit_requests.limit_amount%type;
639: l_review_type ar_cmgt_credit_requests.review_type%type;
640: l_profile_class_name hz_cust_profile_classes.name%type;
641: l_currency ar_cmgt_credit_requests.limit_currency%type;
642: l_party_id hz_parties.party_id%type;
643:
644:
645: BEGIN
653: INTO l_country, l_state, l_province, l_sic_code,
654: l_party_name, l_employees_total, l_credit_classification,
655: l_amount, l_review_type, l_currency,
656: l_profile_class_name, l_postal_code, l_state, l_party_id
657: FROM ar_cmgt_credit_requests c,
658: hz_parties p,
659: hz_cust_profile_classes profclass,
660: hz_customer_profiles prof
661: WHERE c.credit_request_id = p_credit_request_id
711:
712: l_user_name VARCHAR2(60);
713: l_display_name VARCHAR2(240);
714: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
715: l_credit_analyst_id ar_cmgt_credit_requests.credit_analyst_id%type;
716: l_employee_id per_people_f.person_id%type;
717: l_dummy VARCHAR2(1);
718: BEGIN
719: IF funcmode = 'RUN'
736: THEN
737: BEGIN
738: SELECT a.CREDIT_ANALYST_ID
739: INTO l_credit_analyst_id
740: FROM hz_customer_profiles a, ar_cmgt_credit_requests b
741: WHERE b.credit_request_id = itemkey
742: AND a.party_id = b.party_id
743: AND a.cust_account_id = decode(b.cust_account_id,-99,-1,b.cust_account_id)
744: AND nvl(a.site_use_id,-99) = nvl(b.site_use_id, -99);
799: END;
800:
801: get_employee_details(l_employee_id,l_user_name, l_display_name);
802:
803: UPDATE ar_cmgt_credit_requests
804: SET credit_analyst_id = l_credit_analyst_id,
805: last_update_date = sysdate,
806: last_updated_by = fnd_global.user_id,
807: last_update_login = fnd_global.login_id
950: actid in number,
951: funcmode in varchar2,
952: resultout out NOCOPY varchar2) IS
953:
954: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
955: l_party_id ar_cmgt_credit_requests.party_id%type;
956: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
957: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
958:
951: funcmode in varchar2,
952: resultout out NOCOPY varchar2) IS
953:
954: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
955: l_party_id ar_cmgt_credit_requests.party_id%type;
956: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
957: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
958:
959: l_sql_statement VARCHAR2(2000);
952: resultout out NOCOPY varchar2) IS
953:
954: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
955: l_party_id ar_cmgt_credit_requests.party_id%type;
956: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
957: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
958:
959: l_sql_statement VARCHAR2(2000);
960:
953:
954: l_credit_classification ar_cmgt_credit_requests.credit_classification%type;
955: l_party_id ar_cmgt_credit_requests.party_id%type;
956: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
957: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
958:
959: l_sql_statement VARCHAR2(2000);
960:
961: BEGIN
962: IF funcmode = 'RUN'
963: THEN
964: SELECT credit_classification, party_id, cust_account_id, site_use_id
965: INTO l_credit_classification, l_party_id, l_cust_account_id, l_site_use_id
966: FROM ar_cmgt_credit_requests
967: WHERE credit_request_id = itemkey;
968:
969: IF l_credit_classification IS NULL
970: THEN
971:
972: l_credit_classification := AR_CMGT_UTIL.get_credit_classification(p_party_id => l_party_id,
973: p_cust_account_id => l_cust_account_id,
974: p_site_use_id => l_site_use_id);
975: UPDATE ar_cmgt_credit_requests
976: SET credit_classification = l_credit_classification
977: WHERE credit_request_id = itemkey;
978: END IF; -- end of credit classification
979: -- Now update the credit classification in wf
1000: BEGIN
1001:
1002: IF funcmode = 'RUN'
1003: THEN
1004: UPDATE ar_cmgt_credit_requests
1005: SET status = 'IN_PROCESS',
1006: last_update_date = sysdate,
1007: last_updated_by = fnd_global.user_id,
1008: last_update_login = fnd_global.login_id
1022: BEGIN
1023:
1024: IF funcmode = 'RUN'
1025: THEN
1026: UPDATE ar_cmgt_credit_requests
1027: SET status = 'SUBMIT',
1028: last_update_date = sysdate,
1029: last_updated_by = fnd_global.user_id,
1030: last_update_login = fnd_global.login_id
1103: actid in number,
1104: funcmode in varchar2,
1105: resultout out NOCOPY varchar2) IS
1106:
1107: l_party_id ar_cmgt_credit_requests.party_id%type;
1108: l_cust_account_profile_id hz_customer_profiles.cust_account_profile_id%type;
1109: BEGIN
1110: -- need to check and if not exists then craeet party profile(ARCMHZCB.pls AR_CMGT_HZ_COVER_API)
1111: IF funcmode = 'RUN'
1111: IF funcmode = 'RUN'
1112: THEN
1113: SELECT party_id
1114: INTO l_party_id
1115: FROM ar_cmgt_credit_requests
1116: WHERE credit_request_id = itemkey;
1117: -- furst check whether the profile record exists or not. if exists
1118: -- then do n't create else create a record in hz_customer_profiles
1119: WF_ENGINE.setItemAttrNumber(itemtype => itemtype,
1152: l_credit_classification ar_cmgt_check_lists.credit_classification%TYPE;
1153: l_review_type ar_cmgt_check_lists.review_type%TYPE;
1154: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1155: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
1156: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
1157: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
1158: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1159: l_source_name ar_cmgt_credit_requests.source_name%type;
1160: l_classification_meaning ar_lookups.meaning%type;
1153: l_review_type ar_cmgt_check_lists.review_type%TYPE;
1154: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1155: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
1156: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
1157: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
1158: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1159: l_source_name ar_cmgt_credit_requests.source_name%type;
1160: l_classification_meaning ar_lookups.meaning%type;
1161: l_review_type_meaning ar_lookups.meaning%type;
1155: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
1156: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
1157: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
1158: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1159: l_source_name ar_cmgt_credit_requests.source_name%type;
1160: l_classification_meaning ar_lookups.meaning%type;
1161: l_review_type_meaning ar_lookups.meaning%type;
1162: l_application_number ar_cmgt_credit_requests.application_number%type;
1163: l_score_model_already_set VARCHAR2(1) := 'F';
1158: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1159: l_source_name ar_cmgt_credit_requests.source_name%type;
1160: l_classification_meaning ar_lookups.meaning%type;
1161: l_review_type_meaning ar_lookups.meaning%type;
1162: l_application_number ar_cmgt_credit_requests.application_number%type;
1163: l_score_model_already_set VARCHAR2(1) := 'F';
1164: l_requestor_id ar_cmgt_credit_requests.requestor_id%type;
1165: l_requestor_user_name fnd_user.user_name%type;
1166: l_requestor_display_name per_people_f.full_name%type;
1160: l_classification_meaning ar_lookups.meaning%type;
1161: l_review_type_meaning ar_lookups.meaning%type;
1162: l_application_number ar_cmgt_credit_requests.application_number%type;
1163: l_score_model_already_set VARCHAR2(1) := 'F';
1164: l_requestor_id ar_cmgt_credit_requests.requestor_id%type;
1165: l_requestor_user_name fnd_user.user_name%type;
1166: l_requestor_display_name per_people_f.full_name%type;
1167: l_party_id hz_parties.party_id%type;
1168: l_cust_account_id hz_cust_accounts.cust_account_id%type;
1168: l_cust_account_id hz_cust_accounts.cust_account_id%type;
1169: l_party_name hz_parties.party_name%type;
1170: l_party_number hz_parties.party_number%type;
1171: l_account_number hz_cust_accounts.account_number%type;
1172: l_application_date ar_cmgt_credit_requests.application_date%type;
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1169: l_party_name hz_parties.party_name%type;
1170: l_party_number hz_parties.party_number%type;
1171: l_account_number hz_cust_accounts.account_number%type;
1172: l_application_date ar_cmgt_credit_requests.application_date%type;
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1170: l_party_number hz_parties.party_number%type;
1171: l_account_number hz_cust_accounts.account_number%type;
1172: l_application_date ar_cmgt_credit_requests.application_date%type;
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1178: l_requestor_type ar_cmgt_credit_requests.requestor_type%type;
1171: l_account_number hz_cust_accounts.account_number%type;
1172: l_application_date ar_cmgt_credit_requests.application_date%type;
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1178: l_requestor_type ar_cmgt_credit_requests.requestor_type%type;
1179:
1172: l_application_date ar_cmgt_credit_requests.application_date%type;
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1178: l_requestor_type ar_cmgt_credit_requests.requestor_type%type;
1179:
1180: BEGIN
1173: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1178: l_requestor_type ar_cmgt_credit_requests.requestor_type%type;
1179:
1180: BEGIN
1181: IF funcmode = 'RUN'
1174: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
1175: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
1176: l_notes ar_cmgt_credit_requests.notes%type;
1177: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
1178: l_requestor_type ar_cmgt_credit_requests.requestor_type%type;
1179:
1180: BEGIN
1181: IF funcmode = 'RUN'
1182: THEN
1223: l_party_number,
1224: l_notes,
1225: l_credit_request_type,
1226: l_requestor_type
1227: FROM ar_cmgt_credit_requests req,
1228: ar_lookups lkp1,
1229: ar_lookups lkp2,
1230: hz_parties party
1231: WHERE req.credit_request_id = itemkey
1271: l_currency,
1272: l_amount_requested,
1273: l_credit_request_type,
1274: l_requestor_type
1275: FROM ar_cmgt_credit_requests req,
1276: hz_parties party
1277: WHERE credit_request_id = itemkey
1278: AND req.party_id = party.party_id;
1279:
1484: itemkey => itemkey,
1485: aname => 'CHECK_LIST_ID',
1486: avalue => l_check_list_id);
1487: --Update credit request table with checklistid
1488: UPDATE ar_cmgt_credit_requests
1489: set check_list_id = l_check_list_id
1490: WHERE credit_request_id = itemkey;
1491:
1492: resultout := 'COMPLETE:FOUND';
1587: actid in number,
1588: funcmode in varchar2,
1589: resultout out NOCOPY varchar2) IS
1590:
1591: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1592: l_score_currency ar_cmgt_scores.currency%type;
1593: l_score_model_id ar_cmgt_scores.score_model_id%type;
1594: BEGIN
1595:
1681:
1682: l_credit_classification ar_cmgt_check_lists.credit_classification%TYPE;
1683: l_review_type ar_cmgt_check_lists.review_type%TYPE;
1684: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1685: l_party_id ar_cmgt_credit_requests.party_id%type;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1682: l_credit_classification ar_cmgt_check_lists.credit_classification%TYPE;
1683: l_review_type ar_cmgt_check_lists.review_type%TYPE;
1684: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1685: l_party_id ar_cmgt_credit_requests.party_id%type;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1690: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1683: l_review_type ar_cmgt_check_lists.review_type%TYPE;
1684: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1685: l_party_id ar_cmgt_credit_requests.party_id%type;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1690: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1691: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1684: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
1685: l_party_id ar_cmgt_credit_requests.party_id%type;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1690: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1691: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1692: l_org_id NUMBER ;
1685: l_party_id ar_cmgt_credit_requests.party_id%type;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1690: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1691: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1692: l_org_id NUMBER ;
1693: l_score_model_id NUMBER;
1686: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
1687: l_cust_acct_site_id ar_cmgt_credit_requests.cust_acct_site_id%type;
1688: l_request_id ar_cmgt_credit_requests.credit_request_id%type;
1689: l_trx_currency ar_cmgt_credit_requests.trx_currency%type;
1690: l_limit_currency ar_cmgt_credit_requests.limit_currency%type;
1691: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
1692: l_org_id NUMBER ;
1693: l_score_model_id NUMBER;
1694: l_credit_request_id NUMBER;
1709: source_org_id, case_folder_number
1710: INTO l_credit_classification, l_review_type, l_cust_account_id,
1711: l_party_id, l_cust_acct_site_id, l_trx_currency, l_org_id,
1712: l_case_folder_number
1713: FROM ar_cmgt_credit_requests
1714: WHERE credit_request_id = itemkey;
1715: EXCEPTION
1716: WHEN OTHERS THEN
1717: wf_core.context ('AR_CMGT_WF_ENGINE','GATHER_DATA_POINTS',itemtype,itemkey,
1714: WHERE credit_request_id = itemkey;
1715: EXCEPTION
1716: WHEN OTHERS THEN
1717: wf_core.context ('AR_CMGT_WF_ENGINE','GATHER_DATA_POINTS',itemtype,itemkey,
1718: 'Error while getting records from AR_CMGT_CREDIT_REQUESTS',
1719: 'Sql Error: '||sqlerrm);
1720: raise;
1721: END;
1722: l_check_list_id := WF_ENGINE.getItemAttrNumber
1955: l_score NUMBER;
1956: l_auto_rules_id NUMBER;
1957: l_override_checklist ar_cmgt_auto_rule_dtls.override_checklist_flag%type;
1958: l_skip_approval ar_cmgt_auto_rule_dtls.skip_approval_flag%type;
1959: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
1960: BEGIN
1961: IF funcmode = 'RUN'
1962: THEN
1963:
2488: l_errmsg VARCHAR2(2000);
2489: l_resultout VARCHAR2(1);
2490:
2491:
2492: l_currency_code ar_cmgt_credit_requests.limit_currency%type;
2493: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2494: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
2495: l_exposure NUMBER;
2496: l_risk_factor NUMBER;
2489: l_resultout VARCHAR2(1);
2490:
2491:
2492: l_currency_code ar_cmgt_credit_requests.limit_currency%type;
2493: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2494: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
2495: l_exposure NUMBER;
2496: l_risk_factor NUMBER;
2497:
2490:
2491:
2492: l_currency_code ar_cmgt_credit_requests.limit_currency%type;
2493: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2494: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
2495: l_exposure NUMBER;
2496: l_risk_factor NUMBER;
2497:
2498:
2509: THEN
2510: -- get credit type from credit requests
2511: SELECT CREDIT_TYPE, credit_request_type
2512: INTO l_credit_type, l_credit_request_type
2513: FROM ar_cmgt_credit_requests
2514: WHERE credit_request_id = itemkey;
2515:
2516: -- in case of Guarantor no reco. will be generated
2517: IF l_credit_request_type = 'GUARANTOR'
2739: last_updated_by = fnd_global.user_id,
2740: last_update_login = fnd_global.login_id
2741: WHERE case_folder_id = l_case_folder_id;
2742:
2743: Update ar_cmgt_credit_requests
2744: set status = 'PROCESSED',
2745: last_update_date = sysdate,
2746: last_updated_by = fnd_global.user_id,
2747: last_update_login = fnd_global.login_id
2757: funcmode in varchar2,
2758: resultout out NOCOPY varchar2) IS
2759:
2760: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
2761: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2762: l_party_id ar_cmgt_credit_requests.party_id%type;
2763: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
2764: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
2765: l_error_msg VARCHAR2(2000);
2758: resultout out NOCOPY varchar2) IS
2759:
2760: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
2761: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2762: l_party_id ar_cmgt_credit_requests.party_id%type;
2763: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
2764: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
2765: l_error_msg VARCHAR2(2000);
2766: l_return_status VARCHAR2(1);
2759:
2760: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
2761: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2762: l_party_id ar_cmgt_credit_requests.party_id%type;
2763: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
2764: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
2765: l_error_msg VARCHAR2(2000);
2766: l_return_status VARCHAR2(1);
2767: HOLD_ERROR EXCEPTION;
2760: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
2761: l_credit_type ar_cmgt_credit_requests.credit_type%type;
2762: l_party_id ar_cmgt_credit_requests.party_id%type;
2763: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
2764: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
2765: l_error_msg VARCHAR2(2000);
2766: l_return_status VARCHAR2(1);
2767: HOLD_ERROR EXCEPTION;
2768: l_reco_id ar_cmgt_cf_recommends.RECOMMENDATION_ID%TYPE;
2783: BEGIN
2784: SELECT party_id, decode(cust_account_id,-99,-1,cust_account_id),
2785: decode(site_use_id,-99,null,site_use_id), credit_type
2786: INTO l_party_id, l_cust_account_id, l_site_use_id, l_credit_type
2787: FROM ar_cmgt_credit_requests
2788: WHERE credit_request_id = itemkey;
2789:
2790: END;
2791:
3062: last_updated_by = fnd_global.user_id,
3063: last_update_login = fnd_global.login_id
3064: WHERE case_folder_id = l_case_folder_id;
3065:
3066: Update ar_cmgt_credit_requests
3067: set status = 'PROCESSED',
3068: last_update_date = sysdate,
3069: last_updated_by = fnd_global.user_id,
3070: last_update_login = fnd_global.login_id
3082: funcmode in varchar2,
3083: resultout out NOCOPY varchar2) IS
3084:
3085: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3086: l_party_id ar_cmgt_credit_requests.party_id%type;
3087: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
3088: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
3089: l_credit_limit NUMBER := 0;
3090: l_exposure NUMBER;
3083: resultout out NOCOPY varchar2) IS
3084:
3085: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3086: l_party_id ar_cmgt_credit_requests.party_id%type;
3087: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
3088: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
3089: l_credit_limit NUMBER := 0;
3090: l_exposure NUMBER;
3091: l_risk_factor NUMBER;
3084:
3085: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3086: l_party_id ar_cmgt_credit_requests.party_id%type;
3087: l_cust_account_id ar_cmgt_credit_requests.cust_account_id%type;
3088: l_site_use_id ar_cmgt_credit_requests.site_use_id%type;
3089: l_credit_limit NUMBER := 0;
3090: l_exposure NUMBER;
3091: l_risk_factor NUMBER;
3092: l_limit_currency ar_cmgt_case_folders.limit_currency%type;
3101: BEGIN
3102: SELECT party_id, decode(cust_account_id,-99,-1,cust_account_id),
3103: decode(site_use_id,-99,null,site_use_id)
3104: INTO l_party_id, l_cust_account_id, l_site_use_id
3105: FROM ar_cmgt_credit_requests
3106: WHERE credit_request_id = itemkey;
3107:
3108: END;
3109: l_case_folder_id := WF_ENGINE.GetItemAttrNumber
3159: -- Now Release the parent credit request from HOLD(if any)
3160: BEGIN
3161: SELECT a.parent_credit_request_id
3162: INTO l_parent_credit_request_id
3163: FROM ar_cmgt_credit_requests a, ar_cmgt_credit_requests b
3164: WHERE a.credit_request_id = itemkey
3165: AND a.parent_credit_request_id = b.credit_request_id
3166: AND b.status <> 'PROCESSED';
3167:
3320: actid in number,
3321: funcmode in varchar2,
3322: resultout out NOCOPY varchar2) IS
3323:
3324: l_credit_request_id ar_cmgt_credit_requests.credit_request_id%type;
3325: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3326: l_status ar_cmgt_case_folders.status%type;
3327:
3328: BEGIN
3321: funcmode in varchar2,
3322: resultout out NOCOPY varchar2) IS
3323:
3324: l_credit_request_id ar_cmgt_credit_requests.credit_request_id%type;
3325: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3326: l_status ar_cmgt_case_folders.status%type;
3327:
3328: BEGIN
3329: IF funcmode = 'RUN'
3330: THEN
3331: BEGIN
3332: SELECT r.credit_request_id, r.credit_request_type, r.status
3333: INTO l_credit_request_id, l_credit_request_type, l_status
3334: FROM ar_cmgt_credit_requests r
3335: WHERE r.parent_credit_request_id = itemkey
3336: AND r.status <> 'PROCESSED';
3337:
3338: resultout := 'COMPLETE:N';
3361: resultout out NOCOPY varchar2) IS
3362:
3363: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3364: l_reco_exist VARCHAR2(1) := 'N';
3365: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3366: l_flag varchar2(1);
3367: UNEXP_ERROR EXCEPTION;
3368: --this will check if recommendations exists or not.
3369: CURSOR CHECK_RECO_EXISTS IS
3430: -- do the next validations
3431: BEGIN
3432: SELECT 'X'
3433: INTO l_flag
3434: FROM ar_cmgt_cf_recommends cf, ar_cmgt_credit_requests req
3435: WHERE req.credit_request_id = itemkey
3436: AND req.credit_request_id = cf.credit_request_id
3437: AND req.cust_account_id = -99
3438: AND req.site_use_id = -99
3520: l_errmsg VARCHAR2(2000);
3521: l_resultout VARCHAR2(1);
3522: l_processng_flag VARCHAR2(1);
3523: l_case_rec_num NUMBER;
3524: l_credit_type ar_cmgt_credit_requests.credit_type%type;
3525: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3526: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3527: l_parent_cf_id ar_cmgt_case_folders.case_folder_id%type;
3528: l_parent_creq_id ar_cmgt_credit_requests.parent_credit_request_id%type;
3521: l_resultout VARCHAR2(1);
3522: l_processng_flag VARCHAR2(1);
3523: l_case_rec_num NUMBER;
3524: l_credit_type ar_cmgt_credit_requests.credit_type%type;
3525: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3526: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3527: l_parent_cf_id ar_cmgt_case_folders.case_folder_id%type;
3528: l_parent_creq_id ar_cmgt_credit_requests.parent_credit_request_id%type;
3529: insert_failure EXCEPTION;
3524: l_credit_type ar_cmgt_credit_requests.credit_type%type;
3525: l_credit_request_type ar_cmgt_credit_requests.credit_request_type%type;
3526: l_case_folder_id ar_cmgt_case_folders.case_folder_id%type;
3527: l_parent_cf_id ar_cmgt_case_folders.case_folder_id%type;
3528: l_parent_creq_id ar_cmgt_credit_requests.parent_credit_request_id%type;
3529: insert_failure EXCEPTION;
3530: l_cf_id ar_cmgt_case_folders.case_folder_id%type;
3531: populate_failure EXCEPTION;
3532:
3548: BEGIN
3549:
3550: SELECT credit_request_type
3551: INTO l_credit_request_type
3552: FROM ar_cmgt_credit_requests
3553: WHERE credit_request_id = itemkey;
3554: EXCEPTION
3555: WHEN OTHERS THEN
3556: wf_core.context ('AR_CMGT_WF_ENGINE','APPEAL_RESUB_DECISION',itemtype,itemkey,
3553: WHERE credit_request_id = itemkey;
3554: EXCEPTION
3555: WHEN OTHERS THEN
3556: wf_core.context ('AR_CMGT_WF_ENGINE','APPEAL_RESUB_DECISION',itemtype,itemkey,
3557: 'Error while getting records from AR_CMGT_CREDIT_REQUESTS',
3558: 'Sql Error: '||sqlerrm);
3559: raise;
3560: END;
3561:
3581: BEGIN
3582:
3583: SELECT PARENT_CREDIT_REQUEST_ID
3584: INTO l_parent_creq_id
3585: FROM AR_CMGT_CREDIT_REQUESTS
3586: WHERE CREDIT_REQUEST_ID = itemkey;
3587:
3588: EXCEPTION
3589: WHEN OTHERS THEN
3587:
3588: EXCEPTION
3589: WHEN OTHERS THEN
3590: wf_core.context ('AR_CMGT_WF_ENGINE','APPEAL_RESUB_DECISION',itemtype,itemkey,
3591: 'Error while getting parent records from AR_CMGT_CREDIT_REQUESTS',
3592: 'Sql Error: '||sqlerrm);
3593: raise;
3594: END;
3595:
3807: l_credit_classification ar_cmgt_check_lists.credit_classification%TYPE;
3808: l_review_type ar_cmgt_check_lists.review_type%TYPE;
3809: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
3810: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
3811: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
3812: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
3813: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
3814: l_source_name ar_cmgt_credit_requests.source_name%type;
3815: l_classification_meaning ar_lookups.meaning%type;
3808: l_review_type ar_cmgt_check_lists.review_type%TYPE;
3809: l_check_list_id ar_cmgt_check_lists.check_list_id%TYPE;
3810: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
3811: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
3812: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
3813: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
3814: l_source_name ar_cmgt_credit_requests.source_name%type;
3815: l_classification_meaning ar_lookups.meaning%type;
3816: l_review_type_meaning ar_lookups.meaning%type;
3810: l_score_model_id ar_cmgt_scores.score_model_id%TYPE;
3811: l_currency ar_cmgt_credit_requests.limit_currency%TYPE;
3812: l_amount_requested ar_cmgt_credit_requests.limit_amount%TYPE;
3813: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
3814: l_source_name ar_cmgt_credit_requests.source_name%type;
3815: l_classification_meaning ar_lookups.meaning%type;
3816: l_review_type_meaning ar_lookups.meaning%type;
3817: l_application_number ar_cmgt_credit_requests.application_number%type;
3818: l_score_model_already_set VARCHAR2(1) := 'F';
3813: l_case_folder_number ar_cmgt_case_folders.case_folder_number%type;
3814: l_source_name ar_cmgt_credit_requests.source_name%type;
3815: l_classification_meaning ar_lookups.meaning%type;
3816: l_review_type_meaning ar_lookups.meaning%type;
3817: l_application_number ar_cmgt_credit_requests.application_number%type;
3818: l_score_model_already_set VARCHAR2(1) := 'F';
3819: l_requestor_id ar_cmgt_credit_requests.requestor_id%type;
3820: l_requestor_user_name fnd_user.user_name%type;
3821: l_requestor_display_name per_people_f.full_name%type;
3815: l_classification_meaning ar_lookups.meaning%type;
3816: l_review_type_meaning ar_lookups.meaning%type;
3817: l_application_number ar_cmgt_credit_requests.application_number%type;
3818: l_score_model_already_set VARCHAR2(1) := 'F';
3819: l_requestor_id ar_cmgt_credit_requests.requestor_id%type;
3820: l_requestor_user_name fnd_user.user_name%type;
3821: l_requestor_display_name per_people_f.full_name%type;
3822: l_party_id hz_parties.party_id%type;
3823: l_cust_account_id hz_cust_accounts.cust_account_id%type;
3823: l_cust_account_id hz_cust_accounts.cust_account_id%type;
3824: l_party_name hz_parties.party_name%type;
3825: l_party_number hz_parties.party_number%type;
3826: l_account_number hz_cust_accounts.account_number%type;
3827: l_application_date ar_cmgt_credit_requests.application_date%type;
3828: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
3829: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
3830: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3824: l_party_name hz_parties.party_name%type;
3825: l_party_number hz_parties.party_number%type;
3826: l_account_number hz_cust_accounts.account_number%type;
3827: l_application_date ar_cmgt_credit_requests.application_date%type;
3828: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
3829: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
3830: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3832: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3825: l_party_number hz_parties.party_number%type;
3826: l_account_number hz_cust_accounts.account_number%type;
3827: l_application_date ar_cmgt_credit_requests.application_date%type;
3828: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
3829: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
3830: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3832: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3833: l_limit_currency ar_cmgt_case_folders.limit_currency%TYPE;
3826: l_account_number hz_cust_accounts.account_number%type;
3827: l_application_date ar_cmgt_credit_requests.application_date%type;
3828: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
3829: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
3830: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3832: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3833: l_limit_currency ar_cmgt_case_folders.limit_currency%TYPE;
3834: l_creation_date_time ar_cmgt_case_folders.creation_date_time%TYPE;
3827: l_application_date ar_cmgt_credit_requests.application_date%type;
3828: l_source_column1 ar_cmgt_credit_requests.source_column1%type;
3829: l_source_column2 ar_cmgt_credit_requests.source_column2%type;
3830: l_source_column3 ar_cmgt_credit_requests.source_column3%type;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3832: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3833: l_limit_currency ar_cmgt_case_folders.limit_currency%TYPE;
3834: l_creation_date_time ar_cmgt_case_folders.creation_date_time%TYPE;
3835: l_requestor_type ar_cmgt_credit_requests.requestor_type%TYPE;
3831: l_notes ar_cmgt_credit_requests.notes%type;
3832: l_case_folder_id ar_cmgt_case_folders.case_folder_id%TYPE;
3833: l_limit_currency ar_cmgt_case_folders.limit_currency%TYPE;
3834: l_creation_date_time ar_cmgt_case_folders.creation_date_time%TYPE;
3835: l_requestor_type ar_cmgt_credit_requests.requestor_type%TYPE;
3836: BEGIN
3837: IF funcmode = 'RUN'
3838: THEN
3839:
3871: l_party_name,
3872: l_party_number,
3873: l_notes,
3874: l_requestor_type
3875: FROM ar_cmgt_credit_requests req,
3876: ar_lookups lkp1,
3877: ar_lookups lkp2,
3878: hz_parties party
3879: WHERE req.credit_request_id = itemkey
3917: l_case_folder_number,
3918: l_currency,
3919: l_amount_requested,
3920: l_requestor_type
3921: FROM ar_cmgt_credit_requests req,
3922: hz_parties party
3923: WHERE credit_request_id = itemkey
3924: AND req.party_id = party.party_id;
3925: WHEN OTHERS THEN
4229: resultout out NOCOPY varchar2) IS
4230:
4231: l_score NUMBER;
4232: l_score_model_id ar_cmgt_case_folders.score_model_id%type;
4233: l_credit_type ar_cmgt_credit_requests.credit_type%type;
4234: l_resultout VARCHAR2(1);
4235: l_errmsg VARCHAR2(32767);
4236: l_credit_limit NUMBER := 0;
4237: insert_failure EXCEPTION;
4247:
4248: --get detailz
4249: CURSOR get_details IS
4250: SELECT cf.score_model_id,cr.credit_type
4251: from ar_cmgt_case_folders cf,ar_cmgt_credit_requests cr
4252: where case_folder_id=p_cf_id
4253: and cr.credit_request_id=cf.credit_request_id;
4254:
4255: