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;
541: l_insert_values VARCHAR2(10000);
542:
543: BEGIN
544: l_insert_columns :=
545: 'INSERT INTO qa_results ' ||
546: ' (status, plan_id, organization_id, collection_id, occurrence,' ||
547: ' last_update_date, qa_last_update_date, ' ||
548: ' creation_date, qa_creation_date, ' ||
549: ' last_updated_by, qa_last_updated_by, ' ||
664: ' AND qpt.enabled_flag = 1' ||
665: ' AND qpt.background_collection_flag = 1' ||
666: ' AND NOT EXISTS ' ||
667: ' (SELECT 1 ' ||
668: ' FROM qa_results qr ' ||
669: ' WHERE qr.plan_id = qpt.plan_id ' ||
670: ' AND qr.collection_id = :c)';
671:
672: OPEN c FOR select_stmt USING p_collection_id;
727: AND qpt.enabled_flag = 1
728: AND qpt.background_collection_flag = 1
729: AND NOT EXISTS
730: (SELECT 1
731: FROM qa_results qr
732: WHERE qr.plan_id = qpt.plan_id
733: AND qr.collection_id = col_id);
734:
735: plan_id_tab QA_PARENT_CHILD_PKG.ChildPlanArray;
841: parent_rec_found varchar2(1);
842:
843: cursor child_rec(col_id NUMBER) IS
844: select plan_id, occurrence
845: from qa_results
846: where collection_id = col_id;
847:
848: -- 12.1 QWB Usability improvements
849: agg_elements VARCHAR2(4000);
1038: WHERE key='QAGTXNB.SSQR_POST_BACKGROUND_RESULTS' )
1039: AND qpt.enabled_flag = 1
1040: AND qpt.background_collection_flag = 1
1041: AND NOT EXISTS (SELECT 1
1042: FROM qa_results qr
1043: WHERE qr.plan_id = qpt.plan_id
1044: AND qr.collection_id = c_collection_id);
1045:
1046: l_plan_id NUMBER;
1351: 'BEFORE VALIDATING IMMEDIATE CHILD COLLECTION'
1352: );
1353: END IF;
1354:
1355: -- Get all the distinct plans and occurences from QA_RESULTS
1356: -- for the given collection_id
1357: -- Bug 5161719. SHKALYAN 13-Apr-2006
1358: -- Modified cursor to include plan name for the message
1359: SELECT QR.plan_id,
1362: BULK COLLECT INTO
1363: l_plans,
1364: l_plan_names,
1365: l_occurrences
1366: FROM QA_RESULTS QR,
1367: QA_PLANS QP
1368: WHERE QP.plan_id = QR.plan_id
1369: AND QR.collection_id = p_collection_id;
1370:
1587: p_collection_id => p_collection_id,
1588: p_txn_header_id => p_txn_header_id
1589: );
1590:
1591: -- Get all the distinct plans and occurences from QA_RESULTS
1592: SELECT plan_id,
1593: occurrence
1594: BULK COLLECT INTO
1595: l_plan_ids,
1593: occurrence
1594: BULK COLLECT INTO
1595: l_plan_ids,
1596: l_occurrences
1597: FROM QA_RESULTS
1598: WHERE collection_id = p_collection_id;
1599:
1600:
1601: -- Bug 4343758. OA Framework Integration project.
1655: FND_LOG.string
1656: (
1657: FND_LOG.level_statement,
1658: g_pkg_name || '.' || l_api_name,
1659: 'BEFORE ENABLING QA RESULTS'
1660: );
1661: END IF;
1662:
1663: -- Enable the Results
1660: );
1661: END IF;
1662:
1663: -- Enable the Results
1664: UPDATE qa_results
1665: SET status = 2
1666: WHERE collection_id = p_collection_id;
1667:
1668: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN
1801:
1802: -- Bug 4343758
1803: -- R12 OAF Txn Integration Project
1804: -- shkalyan 05/10/2005.
1805: -- This function is used for Purging QA Results and their associated
1806: -- Records. This API is called when the parent Transaction is Unsuccessful.
1807: FUNCTION purge_records(
1808: p_txn_number IN NUMBER,
1809: p_org_id IN NUMBER,
1822: '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
1823: );
1824: END IF;
1825:
1826: DELETE qa_results
1827: WHERE collection_id = p_collection_id;
1828:
1829: l_result_count := SQL%ROWCOUNT;
1830:
1832: FND_LOG.string
1833: (
1834: FND_LOG.level_statement,
1835: g_pkg_name || '.' || l_api_name,
1836: 'DELETED ' || l_result_count || ' ROWS FROM QA_RESULTS'
1837: );
1838: END IF;
1839:
1840: IF ( l_result_count > 0 ) THEN
1978: p_collection_id => p_collection_id,
1979: p_txn_header_id => p_txn_header_id
1980: );
1981:
1982: -- Get all the distinct plans and occurences from QA_RESULTS
1983: SELECT plan_id,
1984: occurrence
1985: BULK COLLECT INTO
1986: l_plan_ids,
1984: occurrence
1985: BULK COLLECT INTO
1986: l_plan_ids,
1987: l_occurrences
1988: FROM QA_RESULTS
1989: WHERE collection_id = p_collection_id;
1990:
1991: IF l_plan_ids.FIRST IS NOT NULL THEN
1992:
2041: FND_LOG.string
2042: (
2043: FND_LOG.level_statement,
2044: g_pkg_name || '.' || l_api_name,
2045: 'BEFORE ENABLING QA RESULTS'
2046: );
2047: END IF;
2048:
2049: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN
2076: END IF;
2077:
2078: -- Enable the Results
2079: /*
2080: UPDATE qa_results
2081: SET status = 2
2082: WHERE collection_id = p_collection_id;
2083: */
2084:
2254: 'BEFORE ENABLING RESULTS'
2255: );
2256: END IF;
2257:
2258: UPDATE qa_results
2259: SET status=2
2260: WHERE collection_id = p_collection_id;
2261:
2262: IF ( FND_LOG.level_statement >= FND_LOG.g_current_runtime_level ) THEN