1: PACKAGE BODY PO_Mass_Close_PO_PVT AS
2: /* $Header: PO_Mass_Close_PO_PVT.plb 120.7.12010000.2 2008/08/05 08:24:24 rramasam ship $*/
3:
4: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
5: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
6: g_pkg_name CONSTANT VARCHAR2(100) := 'PO_Mass_Close_PO_PVT';
7: g_log_head CONSTANT VARCHAR2(1000) := 'po.plsql.' || g_pkg_name || '.';
8:
1: PACKAGE BODY PO_Mass_Close_PO_PVT AS
2: /* $Header: PO_Mass_Close_PO_PVT.plb 120.7.12010000.2 2008/08/05 08:24:24 rramasam ship $*/
3:
4: g_debug_stmt CONSTANT BOOLEAN := PO_DEBUG.is_debug_stmt_on;
5: g_debug_unexp CONSTANT BOOLEAN := PO_DEBUG.is_debug_unexp_on;
6: g_pkg_name CONSTANT VARCHAR2(100) := 'PO_Mass_Close_PO_PVT';
7: g_log_head CONSTANT VARCHAR2(1000) := 'po.plsql.' || g_pkg_name || '.';
8:
9: TYPE g_close_po IS REF CURSOR;
75: g_supplier_id := p_supplier_id;
76:
77: IF g_debug_stmt THEN
78:
79: PO_DEBUG.debug_begin(l_log_head);
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
76:
77: IF g_debug_stmt THEN
78:
79: PO_DEBUG.debug_begin(l_log_head);
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
77: IF g_debug_stmt THEN
78:
79: PO_DEBUG.debug_begin(l_log_head);
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
78:
79: PO_DEBUG.debug_begin(l_log_head);
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
86: PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
79: PO_DEBUG.debug_begin(l_log_head);
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
86: PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
87:
80: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_type );
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
86: PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
87:
88: END IF;
81: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_no_from',p_document_no_from );
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
86: PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
87:
88: END IF;
89:
82: PO_DEBUG.debug_var(l_log_head,l_progress,'p_document_type',p_document_no_to ); --
83: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_from',p_date_from);
84: PO_DEBUG.debug_var(l_log_head,l_progress,'p_date_to',p_date_to);
85: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_id',p_supplier_id);
86: PO_DEBUG.debug_var(l_log_head,l_progress,'p_commit_interval',p_commit_interval);
87:
88: END IF;
89:
90: SAVEPOINT Close_SP;
117: END IF;
118:
119: IF g_debug_stmt THEN
120:
121: PO_DEBUG.debug_var(l_log_head,l_progress,'p_org_name',p_org_name );
122: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_name',p_supplier_name );
123:
124: END IF;
125:
118:
119: IF g_debug_stmt THEN
120:
121: PO_DEBUG.debug_var(l_log_head,l_progress,'p_org_name',p_org_name );
122: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_name',p_supplier_name );
123:
124: END IF;
125:
126: Print_Output(p_org_name,
333: l_progress := '002';
334:
335: IF g_debug_stmt THEN
336:
337: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
338: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_id',l_doc_id );
339: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
340: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_subtype',l_doc_subtype );
341:
334:
335: IF g_debug_stmt THEN
336:
337: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
338: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_id',l_doc_id );
339: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
340: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_subtype',l_doc_subtype );
341:
342: END IF;
335: IF g_debug_stmt THEN
336:
337: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
338: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_id',l_doc_id );
339: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
340: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_subtype',l_doc_subtype );
341:
342: END IF;
343:
336:
337: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
338: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_id',l_doc_id );
339: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
340: PO_DEBUG.debug_var(l_log_head,l_progress,'l_doc_subtype',l_doc_subtype );
341:
342: END IF;
343:
344: l_progress := '003';
361:
362:
363: IF g_debug_stmt THEN
364:
365: PO_DEBUG.debug_var(l_log_head,l_progress,'result',result );
366: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_code',l_return_code );
367:
368: END IF;
369:
362:
363: IF g_debug_stmt THEN
364:
365: PO_DEBUG.debug_var(l_log_head,l_progress,'result',result );
366: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_code',l_return_code );
367:
368: END IF;
369:
370: l_progress := '004';
381: l_progress := '005';
382:
383: IF g_debug_stmt THEN
384:
385: PO_DEBUG.debug_var(l_log_head,l_progress,'l_commit_count',l_commit_count );
386:
387: END IF;
388:
389: fnd_file.put_line(fnd_file.output, rpad(l_po_num,26) || l_doc_type);
549: l_progress := '007';
550:
551: IF g_debug_stmt THEN
552:
553: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
554: PO_DEBUG.debug_var(l_log_head,l_progress,'l_release_id',l_release_id );
555: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
556:
557: END IF;
550:
551: IF g_debug_stmt THEN
552:
553: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
554: PO_DEBUG.debug_var(l_log_head,l_progress,'l_release_id',l_release_id );
555: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
556:
557: END IF;
558:
551: IF g_debug_stmt THEN
552:
553: PO_DEBUG.debug_var(l_log_head,l_progress,'l_po_num',l_po_num );
554: PO_DEBUG.debug_var(l_log_head,l_progress,'l_release_id',l_release_id );
555: PO_DEBUG.debug_var(l_log_head,l_progress,'l_type_code',l_type_code );
556:
557: END IF;
558:
559: l_progress := '008';
575: p_origin_doc_id => NULL);
576:
577: IF g_debug_stmt THEN
578:
579: PO_DEBUG.debug_var(l_log_head,l_progress,'result',result );
580: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_code',l_return_code );
581:
582: END IF;
583:
576:
577: IF g_debug_stmt THEN
578:
579: PO_DEBUG.debug_var(l_log_head,l_progress,'result',result );
580: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_code',l_return_code );
581:
582: END IF;
583:
584:
594: END IF;
595:
596: IF g_debug_stmt THEN
597:
598: PO_DEBUG.debug_var(l_log_head,l_progress,'l_commit_count',l_commit_count );
599:
600: END IF;
601:
602: EXCEPTION
752: l_progress := '001';
753:
754: IF g_debug_stmt THEN
755:
756: PO_DEBUG.debug_var(l_log_head,l_progress,'p_supplier_name',p_supplier_name );
757:
758: END IF;
759:
760: fnd_file.put_line(fnd_file.output, l_msg1);