99: ' AND qpt.mandatory_collection_flag = 1' ||
100: ' AND qpt.background_collection_flag = 2' ||
101: ' AND NOT EXISTS' ||
102: ' (SELECT 1' ||
103: ' FROM qa_results qr ' ||
104: ' WHERE qr.plan_id = qpt.plan_id ' ||
105: ' AND qr.collection_id = :c)';
106:
107: OPEN c_plans_results FOR select_stmt USING p_collection_id;
143:
144: FUNCTION parse_value(x_result IN VARCHAR2, n IN INTEGER,
145: p IN OUT NOCOPY INTEGER) RETURN VARCHAR2 IS
146:
147: -- changed the variable type from qa_results.character1%TYPE to
148: -- qa_results.comment1%TYPE for LongComments Project
149: -- Bug 2234299
150: -- rponnusa Thu Mar 14 05:33:00 PST 2002
151:
144: FUNCTION parse_value(x_result IN VARCHAR2, n IN INTEGER,
145: p IN OUT NOCOPY INTEGER) RETURN VARCHAR2 IS
146:
147: -- changed the variable type from qa_results.character1%TYPE to
148: -- qa_results.comment1%TYPE for LongComments Project
149: -- Bug 2234299
150: -- rponnusa Thu Mar 14 05:33:00 PST 2002
151:
152: /*
153: Bug: 2369332
154: rkaza: 05/10/2002. Changing type comment to varchar2(2000) to
155: avoid dependencies on case changes for long comments.
156: */
157: -- value qa_results.comment1%TYPE := '';
158: value varchar2(2000) := '';
159: c VARCHAR2(10);
160: separator CONSTANT VARCHAR2(1) := '@';
161:
193: p INTEGER; -- starting string position
194: q INTEGER; -- ending string position
195: x_char_id NUMBER;
196:
197: -- changed the variable type from qa_results.character1%TYPE to
198: -- qa_results.comment1%TYPE for LongComments Project
199: -- Bug 2234299
200: -- rponnusa Thu Mar 14 05:33:00 PST 2002
201:
194: q INTEGER; -- ending string position
195: x_char_id NUMBER;
196:
197: -- changed the variable type from qa_results.character1%TYPE to
198: -- qa_results.comment1%TYPE for LongComments Project
199: -- Bug 2234299
200: -- rponnusa Thu Mar 14 05:33:00 PST 2002
201:
202: /*
203: Bug: 2369332
204: rkaza: 05/10/2002. Changing type comment to varchar2(2000) to
205: avoid dependencies on case changes for long comments.
206: */
207: -- x_value qa_results.comment1%TYPE;
208: x_value varchar2(2000);
209:
210: BEGIN
211: p := 1;
506: l_insert_values VARCHAR2(10000);
507:
508: BEGIN
509: l_insert_columns :=
510: 'INSERT INTO qa_results ' ||
511: ' (status, plan_id, organization_id, collection_id, occurrence,' ||
512: ' last_update_date, qa_last_update_date, ' ||
513: ' creation_date, qa_creation_date, ' ||
514: ' last_updated_by, qa_last_updated_by, ' ||
629: ' AND qpt.enabled_flag = 1' ||
630: ' AND qpt.background_collection_flag = 1' ||
631: ' AND NOT EXISTS ' ||
632: ' (SELECT 1 ' ||
633: ' FROM qa_results qr ' ||
634: ' WHERE qr.plan_id = qpt.plan_id ' ||
635: ' AND qr.collection_id = :c)';
636:
637: OPEN c FOR select_stmt USING p_collection_id;
692: AND qpt.enabled_flag = 1
693: AND qpt.background_collection_flag = 1
694: AND NOT EXISTS
695: (SELECT 1
696: FROM qa_results qr
697: WHERE qr.plan_id = qpt.plan_id
698: AND qr.collection_id = col_id);
699:
700: plan_id_tab QA_PARENT_CHILD_PKG.ChildPlanArray;
806: parent_rec_found varchar2(1);
807:
808: cursor child_rec(col_id NUMBER) IS
809: select plan_id, occurrence
810: from qa_results
811: where collection_id = col_id;
812:
813: -- 12.1 QWB Usability improvements
814: agg_elements VARCHAR2(4000);
1003: WHERE key='QAGTXNB.SSQR_POST_BACKGROUND_RESULTS' )
1004: AND qpt.enabled_flag = 1
1005: AND qpt.background_collection_flag = 1
1006: AND NOT EXISTS (SELECT 1
1007: FROM qa_results qr
1008: WHERE qr.plan_id = qpt.plan_id
1009: AND qr.collection_id = c_collection_id);
1010:
1011: l_plan_id NUMBER;
1313: 'BEFORE VALIDATING IMMEDIATE CHILD COLLECTION'
1314: );
1315: END IF;
1316:
1317: -- Get all the distinct plans and occurences from QA_RESULTS
1318: -- for the given collection_id
1319: -- Bug 5161719. SHKALYAN 13-Apr-2006
1320: -- Modified cursor to include plan name for the message
1321: SELECT QR.plan_id,
1324: BULK COLLECT INTO
1325: l_plans,
1326: l_plan_names,
1327: l_occurrences
1328: FROM QA_RESULTS QR,
1329: QA_PLANS QP
1330: WHERE QP.plan_id = QR.plan_id
1331: AND QR.collection_id = p_collection_id;
1332:
1549: p_collection_id => p_collection_id,
1550: p_txn_header_id => p_txn_header_id
1551: );
1552:
1553: -- Get all the distinct plans and occurences from QA_RESULTS
1554: SELECT plan_id,
1555: occurrence
1556: BULK COLLECT INTO
1557: l_plan_ids,
1555: occurrence
1556: BULK COLLECT INTO
1557: l_plan_ids,
1558: l_occurrences
1559: FROM QA_RESULTS
1560: WHERE collection_id = p_collection_id;
1561:
1562:
1563: -- Bug 4343758. OA Framework Integration project.
1617: FND_LOG.string
1618: (
1619: FND_LOG.level_statement,
1620: g_pkg_name || '.' || l_api_name,
1621: 'BEFORE ENABLING QA RESULTS'
1622: );
1623: END IF;
1624:
1625: -- Enable the Results
1622: );
1623: END IF;
1624:
1625: -- Enable the Results
1626: UPDATE qa_results
1627: SET status = 2
1628: WHERE collection_id = p_collection_id;
1629:
1630: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN
1763:
1764: -- Bug 4343758
1765: -- R12 OAF Txn Integration Project
1766: -- shkalyan 05/10/2005.
1767: -- This function is used for Purging QA Results and their associated
1768: -- Records. This API is called when the parent Transaction is Unsuccessful.
1769: FUNCTION purge_records(
1770: p_txn_number IN NUMBER,
1771: p_org_id IN NUMBER,
1784: 'ENTERING PROCEDURE: P_TXN_NUMBER: ' || p_txn_number || ' P_ORG_ID: ' || p_org_id || ' P_TXN_HEADER_ID: ' || p_txn_header_id || ' P_COLLECTION_ID: ' || p_collection_id
1785: );
1786: END IF;
1787:
1788: DELETE qa_results
1789: WHERE collection_id = p_collection_id;
1790:
1791: l_result_count := SQL%ROWCOUNT;
1792:
1794: FND_LOG.string
1795: (
1796: FND_LOG.level_statement,
1797: g_pkg_name || '.' || l_api_name,
1798: 'DELETED ' || l_result_count || ' ROWS FROM QA_RESULTS'
1799: );
1800: END IF;
1801:
1802: IF ( l_result_count > 0 ) THEN
1940: p_collection_id => p_collection_id,
1941: p_txn_header_id => p_txn_header_id
1942: );
1943:
1944: -- Get all the distinct plans and occurences from QA_RESULTS
1945: SELECT plan_id,
1946: occurrence
1947: BULK COLLECT INTO
1948: l_plan_ids,
1946: occurrence
1947: BULK COLLECT INTO
1948: l_plan_ids,
1949: l_occurrences
1950: FROM QA_RESULTS
1951: WHERE collection_id = p_collection_id;
1952:
1953: IF l_plan_ids.FIRST IS NOT NULL THEN
1954:
2003: FND_LOG.string
2004: (
2005: FND_LOG.level_statement,
2006: g_pkg_name || '.' || l_api_name,
2007: 'BEFORE ENABLING QA RESULTS'
2008: );
2009: END IF;
2010:
2011: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN
2038: END IF;
2039:
2040: -- Enable the Results
2041: /*
2042: UPDATE qa_results
2043: SET status = 2
2044: WHERE collection_id = p_collection_id;
2045: */
2046:
2216: 'BEFORE ENABLING RESULTS'
2217: );
2218: END IF;
2219:
2220: UPDATE qa_results
2221: SET status=2
2222: WHERE collection_id = p_collection_id;
2223:
2224: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN