1: PACKAGE BODY po_headers_draft_pvt AS
2: /* $Header: PO_HEADERS_DRAFT_PVT.plb 120.5.12020000.3 2013/02/10 19:17:48 vegajula ship $ */
3:
4: d_pkg_name CONSTANT varchar2(50) :=
5: PO_LOG.get_package_base('PO_HEADERS_DRAFT_PVT');
6:
7: -----------------------------------------------------------------------
8: --Start of Comments
9: --Name: draft_changes_exist
51: l_dft_exists_index_tbl PO_TBL_NUMBER := PO_TBL_NUMBER();
52:
53: BEGIN
54: d_position := 0;
55: IF (PO_LOG.d_proc) THEN
56: PO_LOG.proc_begin(d_module);
57: END IF;
58:
59: l_index_tbl.extend(p_draft_id_tbl.COUNT);
52:
53: BEGIN
54: d_position := 0;
55: IF (PO_LOG.d_proc) THEN
56: PO_LOG.proc_begin(d_module);
57: END IF;
58:
59: l_index_tbl.extend(p_draft_id_tbl.COUNT);
60: l_dft_exists_tbl.extend(p_draft_id_tbl.COUNT);
100: FOR i IN 1..l_dft_exists_index_tbl.COUNT LOOP
101: l_dft_exists_tbl(l_dft_exists_index_tbl(i)) := FND_API.G_TRUE;
102: END LOOP;
103:
104: IF (PO_LOG.d_stmt) THEN
105: PO_LOG.stmt(d_module, d_position, '# of records that have dft changes',
106: l_dft_exists_index_tbl.COUNT);
107: END IF;
108:
101: l_dft_exists_tbl(l_dft_exists_index_tbl(i)) := FND_API.G_TRUE;
102: END LOOP;
103:
104: IF (PO_LOG.d_stmt) THEN
105: PO_LOG.stmt(d_module, d_position, '# of records that have dft changes',
106: l_dft_exists_index_tbl.COUNT);
107: END IF;
108:
109: RETURN l_dft_exists_tbl;
154:
155: l_exists_tbl PO_TBL_VARCHAR1;
156: BEGIN
157: d_position := 0;
158: IF (PO_LOG.d_proc) THEN
159: PO_LOG.proc_begin(d_module);
160: END IF;
161:
162: l_exists_tbl :=
155: l_exists_tbl PO_TBL_VARCHAR1;
156: BEGIN
157: d_position := 0;
158: IF (PO_LOG.d_proc) THEN
159: PO_LOG.proc_begin(d_module);
160: END IF;
161:
162: l_exists_tbl :=
163: draft_changes_exist
164: ( p_draft_id_tbl => PO_TBL_NUMBER(p_draft_id),
165: p_po_header_id_tbl => PO_TBL_NUMBER(p_po_header_id)
166: );
167:
168: IF (PO_LOG.d_stmt) THEN
169: PO_LOG.stmt(d_module, d_position, 'exists', l_exists_tbl(1));
170: END IF;
171:
172: RETURN l_exists_tbl(1);
165: p_po_header_id_tbl => PO_TBL_NUMBER(p_po_header_id)
166: );
167:
168: IF (PO_LOG.d_stmt) THEN
169: PO_LOG.stmt(d_module, d_position, 'exists', l_exists_tbl(1));
170: END IF;
171:
172: RETURN l_exists_tbl(1);
173:
225: l_msg_data VARCHAR2(2000);
226: l_msg_count NUMBER;
227: BEGIN
228: d_position := 0;
229: IF (PO_LOG.d_proc) THEN
230: PO_LOG.proc_begin(d_module);
231: END IF;
232:
233: IF (p_draft_info.headers_changed = FND_API.G_FALSE) THEN
226: l_msg_count NUMBER;
227: BEGIN
228: d_position := 0;
229: IF (PO_LOG.d_proc) THEN
230: PO_LOG.proc_begin(d_module);
231: END IF;
232:
233: IF (p_draft_info.headers_changed = FND_API.G_FALSE) THEN
234: IF (PO_LOG.d_stmt) THEN
230: PO_LOG.proc_begin(d_module);
231: END IF;
232:
233: IF (p_draft_info.headers_changed = FND_API.G_FALSE) THEN
234: IF (PO_LOG.d_stmt) THEN
235: PO_LOG.stmt(d_module, d_position, 'no change-no need to apply');
236: END IF;
237:
238: RETURN;
231: END IF;
232:
233: IF (p_draft_info.headers_changed = FND_API.G_FALSE) THEN
234: IF (PO_LOG.d_stmt) THEN
235: PO_LOG.stmt(d_module, d_position, 'no change-no need to apply');
236: END IF;
237:
238: RETURN;
239: END IF;