220: and hierarchy_type =
221: FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
222: and g_source_name <> 'LNS'
223: UNION
224: select p_party_id from dual
225: UNION
226: select hz_party_id
227: from LNS_LOAN_PARTICIPANTS_V
228: where loan_id = g_source_id
441: and effective_end_date >= sysdate
442: and hierarchy_type =
443: FND_PROFILE.VALUE(''AR_CMGT_HIERARCHY_TYPE'')
444: and :4 <> ''LNS''
445: union select :5 from dual
446: union
447: select hz_party_id
448: from LNS_LOAN_PARTICIPANTS_V
449: where loan_id = :6
522: and effective_start_date <= sysdate
523: and effective_end_date >= sysdate
524: and hierarchy_type =
525: FND_PROFILE.VALUE(''AR_CMGT_HIERARCHY_TYPE'')
526: union select :4 from dual
527: ))
528: and currency = :5
529: and largest_inv_cust_trx_id is not null
530: and as_of_date >= ADD_MONTHS(sysdate,(-:6)) )
681: BEGIN
682:
683: /* 6513911 - revised sql to not require all currencies
684: This code now selects the converted amount and date
685: (max) at one time, then substr them out to individual
686: fields for the datapoint(s). Incidentally, the original
687: logic returned the raw amount (in AR_TRX_SUMMARY currency)
688: rather than the converted amount -- I considered this a bug
689: and now return the converted amount (to CF currency) */
713: AND hierarchy_type =
714: FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
715: AND g_source_name <> 'LNS'
716: UNION
717: SELECT p_party_id FROM DUAL
718: UNION
719: SELECT hz_party_id
720: FROM LNS_LOAN_PARTICIPANTS_V
721: WHERE loan_id = g_source_id
835: and effective_start_date <= sysdate
836: and effective_end_date >= sysdate
837: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
838: and g_source_name <> 'LNS'
839: union select p_party_id from dual
840: UNION
841: select hz_party_id
842: from LNS_LOAN_PARTICIPANTS_V
843: where loan_id = g_source_id
868: and effective_start_date <= sysdate
869: and effective_end_date >= sysdate
870: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
871: and g_source_name <> 'LNS'
872: union select p_party_id from dual
873: UNION
874: select hz_party_id
875: from LNS_LOAN_PARTICIPANTS_V
876: where loan_id = g_source_id
1087: and effective_end_date >= sysdate
1088: and hierarchy_type =
1089: FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
1090: and g_source_name <> 'LNS'
1091: union select p_party_id from dual
1092: UNION
1093: select hz_party_id
1094: from LNS_LOAN_PARTICIPANTS_V
1095: where loan_id = g_source_id
2663: g_data_case_folder_exists := 'N';
2664: -- Get id from sequence
2665: SELECT ar_cmgt_case_folders_s.nextval
2666: INTO p_case_folder_id
2667: FROM dual;
2668:
2669: IF pg_wf_debug = 'Y'
2670: THEN
2671: ar_cmgt_util.wf_debug(p_case_folder_id,
2676: IF p_case_folder_number IS NULL
2677: THEN
2678: SELECT ar_cmgt_case_folder_number_s.nextval
2679: INTO l_case_folder_number
2680: FROM dual;
2681: ELSE
2682: l_case_folder_number := p_case_folder_number;
2683: END IF;
2684: -- insert into case_folder table
2741: WHEN NO_DATA_FOUND THEN
2742: BEGIN
2743: SELECT ar_cmgt_case_folders_s.nextval
2744: INTO g_data_case_folder_id
2745: FROM dual;
2746: g_data_case_folder_exists := 'N';
2747: AR_CMGT_CONTROLS.populate_case_folder (
2748: p_case_folder_id => g_data_case_folder_id,
2749: p_case_folder_number => l_case_folder_number,
4798: and effective_start_date <= sysdate
4799: and effective_end_date >= sysdate
4800: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
4801: and g_source_name <> 'LNS'
4802: union select p_party_id from dual
4803: UNION
4804: select hz_party_id
4805: from LNS_LOAN_PARTICIPANTS_V
4806: where loan_id = g_source_id
5200: and effective_start_date <= sysdate
5201: and effective_end_date >= sysdate
5202: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
5203: and g_source_name <> 'LNS'
5204: union select p_party_id from dual
5205: UNION
5206: select hz_party_id
5207: from LNS_LOAN_PARTICIPANTS_V
5208: where loan_id = g_source_id
5454: and effective_start_date <= sysdate
5455: and effective_end_date >= sysdate
5456: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
5457: and g_source_name <> 'LNS'
5458: union select p_party_id from dual
5459: UNION
5460: select hz_party_id
5461: from LNS_LOAN_PARTICIPANTS_V
5462: where loan_id = g_source_id
5558: and effective_start_date <= sysdate
5559: and effective_end_date >= sysdate
5560: and hierarchy_type = FND_PROFILE.VALUE('AR_CMGT_HIERARCHY_TYPE')
5561: and g_source_name <> 'LNS'
5562: union select p_party_id from dual
5563: UNION
5564: select hz_party_id
5565: from LNS_LOAN_PARTICIPANTS_V
5566: where loan_id = g_source_id