DBA Data[Home] [Help]

APPS.JTF_IH_PURGE dependencies on JTF_IH_INTERACTIONS

Line 57: nInteraction_Id JTF_IH_INTERACTIONS.INTERACTION_ID%TYPE;

53: nCount NUMBER;
54: nCountMedia NUMBER;
55: sSql VARCHAR2(2000);
56: nRowTrn NUMBER;
57: nInteraction_Id JTF_IH_INTERACTIONS.INTERACTION_ID%TYPE;
58: ErrNoPartyType EXCEPTION;
59: ErrInteraction EXCEPTION;
60: ErrStartEndDate EXCEPTION;
61: ErrEndDateNull EXCEPTION; -- Added for Bug# 4063673

Line 102: sSql := 'SELECT DISTINCT JTFI.INTERACTION_ID FROM JTF_IH_INTERACTIONS JTFI, JTF_IH_ACTIVITIES ACT ';

98:
99: -- Now I'm going to build a dynamic sql statement based on input parameters.
100: --
101: IF p_ActivityOutcome IS NOT NULL OR p_ActivityResult IS NOT NULL OR p_ActivityReason IS NOT NULL THEN
102: sSql := 'SELECT DISTINCT JTFI.INTERACTION_ID FROM JTF_IH_INTERACTIONS JTFI, JTF_IH_ACTIVITIES ACT ';
103: -- If you've set up some value to p_Party_Type parameter, then include HZ_PARTIES table
104: -- to major sql statement, based on JTF_IH_INTERACTION.Party_ID
105: IF p_Party_Type IS NOT NULL THEN
106: sSql := sSql || ', HZ_PARTIES HZ ';

Line 117: sSql := 'SELECT INTERACTION_ID FROM JTF_IH_INTERACTIONS JTFI ';

113: END IF;
114:
115: ELSE
116:
117: sSql := 'SELECT INTERACTION_ID FROM JTF_IH_INTERACTIONS JTFI ';
118: IF p_Party_Type IS NOT NULL THEN
119: sSql := sSql ||', HZ_PARTIES HZ ';
120: END IF;
121: --sSql := sSql || 'WHERE JTFI.ACTIVE = '''||p_Active||'''';

Line 208: sSql := 'SELECT INTERACTION_ID FROM JTF_IH_INTERACTIONS WHERE ACTIVE = :active ORDER BY INTERACTION_ID ';

204: sSql := sSql || ' AND ACT.REASON_ID IN ('||p_ActivityReason||') ';
205: END IF;
206:
207: ELSE
208: sSql := 'SELECT INTERACTION_ID FROM JTF_IH_INTERACTIONS WHERE ACTIVE = :active ORDER BY INTERACTION_ID ';
209: END IF;
210:
211: -- This piece of code need for debugging a sql statement
212: /*

Line 304: DELETE FROM JTF_IH_INTERACTIONS WHERE INTERACTION_ID = nInteraction_Id;

300: DELETE FROM JTF_IH_INTERACTION_INTERS WHERE
301: (INTERACT_INTERACTION_IDRELATES = nInteraction_Id)
302: OR (INTERACT_INTERACTION_ID = nInteraction_Id);
303: -- Clean Up current Intraction.
304: DELETE FROM JTF_IH_INTERACTIONS WHERE INTERACTION_ID = nInteraction_Id;
305: EXCEPTION
306: WHEN OTHERS THEN
307: --DBMS_OUTPUT.PUT_LINE('JTF_IH_PURGE: Interaction_ID = '||nInteraction_Id||' has an error:');
308: --DBMS_OUTPUT.PUT_LINE('JTF_IH_PURGE: '||SQLERRM);

Line 634: FROM JTF_IH_INTERACTIONS

630:
631: IF l_int_ids.COUNT > 0 THEN
632: FORALL j IN l_int_ids.FIRST..l_int_ids.LAST
633: DELETE
634: FROM JTF_IH_INTERACTIONS
635: WHERE interaction_id = l_int_ids(j)
636: AND
637: NOT EXISTS (SELECT 1
638: FROM JTF_IH_ACTIVITIES