DBA Data[Home] [Help]

APPS.PO_DRAFT_MERGE_PKG dependencies on FND_ATTACHED_DOCUMENTS

Line 87: fnd_attached_documents2_pkg.

83: pk2 number)
84: is
85: begin
86: -- delete attachments from main document
87: fnd_attached_documents2_pkg.
88: delete_attachments(entity_name,
89: pk1,
90: '',
91: '',

Line 97: fnd_attached_documents2_pkg.

93: '',
94: 'N',
95: NULL);
96: -- copy attachments from draft to main document
97: fnd_attached_documents2_pkg.
98: copy_attachments(entity_name,
99: pk1 || '-' ||pk2,
100: '',
101: '',

Line 134: from fnd_attached_documents

130: po_lines_draft_all pld
131: where phd.draft_id = p_draft_id
132: and phd.po_header_id = pld.po_header_id
133: and exists (select 1
134: from fnd_attached_documents
135: where entity_name = 'PO_LINES'
136: and pk1_value = to_char(pld.po_line_id) || '-' || to_char(p_draft_id));
137:
138: cursor line_locs_with_attachments_c(p_draft_id number) is

Line 146: from fnd_attached_documents

142: po_line_locations_draft_all plld
143: where phd.draft_id = p_draft_id
144: and phd.po_header_id = plld.po_header_id
145: and exists (select 1
146: from fnd_attached_documents
147: where entity_name = 'PO_SHIPMENTS'
148: and pk1_value = to_char(plld.line_location_id) || '-' || to_char(p_draft_id));
149:
150: d_api_name CONSTANT VARCHAR2(30) := 'merge_upgraded_attachments';

Line 164: from fnd_attached_documents

160: select 'Y'
161: into l_header_attach_exist
162: from dual
163: where exists (select 'header attachments exist'
164: from fnd_attached_documents
165: where entity_name = 'PO_HEADERS'
166: and pk1_value = to_char(p_document_id) || '-' || to_char(p_draft_id));
167: exception
168: when others then null;

Line 251: from fnd_attached_documents

247: select 'Y'
248: into l_mod_attach_exist
249: from dual
250: where exists (select 'attachments exist for mod'
251: from fnd_attached_documents
252: where pk1_value LIKE '%-'|| to_char(p_draft_id)
253: and entity_name in ('PO_HEADERS','PO_HEADERS_DEL','PO_LINES','PO_LINES_DEL','PO_SHIPMENTS','PO_SHIPMENTS_DEL'));
254: EXCEPTION
255: WHEN NO_DATA_FOUND THEN NULL;

Line 265: FROM fnd_attached_documents

261: SELECT 'Y'
262: INTO l_attach_with_orig_attach_id
263: FROM DUAL
264: WHERE EXISTS (SELECT 'mod attachments exist with orig attach id not null'
265: FROM fnd_attached_documents
266: WHERE pk1_value LIKE '%-'|| to_char(p_draft_id)
267: AND entity_name in ('PO_HEADERS','PO_HEADERS_DEL','PO_LINES','PO_LINES_DEL','PO_SHIPMENTS','PO_SHIPMENTS_DEL')
268: AND ORIG_ATTACH_DOC_ID IS NOT NULL);
269:

Line 1361: fnd_attached_documents2_pkg.

1357: pk2 VARCHAR2)
1358: is
1359: pragma AUTONOMOUS_TRANSACTION;
1360: begin
1361: fnd_attached_documents2_pkg.
1362: copy_attachments(entity_name,
1363: pk1,
1364: '',
1365: '',

Line 1475: from fnd_attached_documents fad , fnd_documents fd

1471: p_draft_id NUMBER) AS
1472:
1473: cursor modified_header_attachments_c(p_header_id NUMBER,p_draft_id NUMBER,p_entity_name VARCHAR2) is
1474: select fad.ORIG_ATTACH_DOC_ID , fd.datatype_id ,fad.attached_document_id
1475: from fnd_attached_documents fad , fnd_documents fd
1476: where fad.entity_name = p_entity_name
1477: and fad.pk1_value = to_char(p_header_id) || '-' || to_char(p_draft_id)
1478: AND fad.ORIG_ATTACH_DOC_ID IS NOT NULL
1479: AND fd.document_id = fad.document_id

Line 1489: from fnd_attached_documents fad , fnd_documents fd

1485: --Fetch all new attachments other than mod specific attachments as merge
1486: -- is not needed for these attachmnets
1487: cursor headers_with_new_attachments_c(p_header_id NUMBER,p_draft_id NUMBER) is
1488: select fad.attached_document_id, fd.datatype_id , fad.ORIG_ATTACH_DOC_ID
1489: from fnd_attached_documents fad , fnd_documents fd
1490: where fad.entity_name = 'PO_HEADERS'
1491: and fad.pk1_value = to_char(p_header_id) || '-' || to_char(p_draft_id)
1492: AND fad.ORIG_ATTACH_DOC_ID IS NULL
1493: AND fd.document_id = fad.document_id

Line 1516: fnd_attached_documents3_pkg.delete_row

1512: END IF;
1513:
1514: for l_rec in modified_header_attachments_c(p_header_id,p_draft_id,'PO_HEADERS') LOOP
1515: --delete the old records
1516: fnd_attached_documents3_pkg.delete_row
1517: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1518: X_datatype_id => l_rec.datatype_id,
1519: delete_document_flag => 'Y'
1520: );

Line 1523: fnd_attached_documents2_pkg.copy_attachments

1519: delete_document_flag => 'Y'
1520: );
1521:
1522: --copy the new records
1523: fnd_attached_documents2_pkg.copy_attachments
1524: ( X_from_entity_name => 'PO_HEADERS',
1525: X_from_pk1_value => To_Char(p_header_id)||'-'||To_Char(p_draft_id),
1526: X_to_entity_name => 'PO_HEADERS',
1527: X_to_pk1_value => To_Char(p_header_id),

Line 1542: fnd_attached_documents3_pkg.delete_row

1538:
1539:
1540: for l_rec in modified_header_attachments_c(p_header_id,p_draft_id,'PO_HEADERS_DEL') LOOP
1541: --delete the old record
1542: fnd_attached_documents3_pkg.delete_row
1543: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1544: X_datatype_id => l_rec.datatype_id,
1545: delete_document_flag => 'Y'
1546: );

Line 1557: fnd_attached_documents2_pkg.copy_attachments

1553: PO_LOG.stmt(d_module, d_position, x_progress);
1554: END IF;
1555:
1556: FOR l_rec IN headers_with_new_attachments_c(p_header_id,p_draft_id) LOOP
1557: fnd_attached_documents2_pkg.copy_attachments
1558: ( X_from_entity_name => 'PO_HEADERS',
1559: X_from_pk1_value => To_Char(p_header_id)||'-'||To_Char(p_draft_id),
1560: X_to_entity_name => 'PO_HEADERS',
1561: X_to_pk1_value => To_Char(p_header_id),

Line 1588: from fnd_attached_documents fad, po_lines_draft_all pld , fnd_documents fd

1584: procedure MERGE_LINE_ATTACHMENTS(p_draft_id NUMBER) AS
1585:
1586: cursor modified_line_attachments_c(p_draft_id NUMBER,p_entity_name VARCHAR2) is
1587: select pld.po_line_id as po_line_id, fad.attached_document_id , fad.ORIG_ATTACH_DOC_ID ,fd.datatype_id
1588: from fnd_attached_documents fad, po_lines_draft_all pld , fnd_documents fd
1589: where pld.draft_id = p_draft_id
1590: and fad.entity_name = p_entity_name
1591: and fad.pk1_value = to_char(pld.po_line_id) || '-' || to_char(p_draft_id)
1592: AND ORIG_ATTACH_DOC_ID IS NOT NULL

Line 1603: from fnd_attached_documents fad, po_lines_draft_all pld , fnd_documents fd

1599: --Fetch all new attachments other than mod specific attachments as merge
1600: -- is not needed for these attachmnets
1601: cursor new_line_attachments_c(p_draft_id NUMBER) is
1602: select pld.po_line_id as po_line_id, fad.attached_document_id , fad.ORIG_ATTACH_DOC_ID ,fd.datatype_id
1603: from fnd_attached_documents fad, po_lines_draft_all pld , fnd_documents fd
1604: where pld.draft_id = p_draft_id
1605: and fad.entity_name = 'PO_LINES'
1606: and fad.pk1_value = to_char(pld.po_line_id) || '-' || to_char(p_draft_id)
1607: AND ORIG_ATTACH_DOC_ID IS NULL

Line 1631: fnd_attached_documents3_pkg.delete_row

1627: END IF;
1628:
1629: for l_rec in modified_line_attachments_c(p_draft_id,'PO_LINES') LOOP
1630: --delete the old record
1631: fnd_attached_documents3_pkg.delete_row
1632: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1633: X_datatype_id => l_rec.datatype_id,
1634: delete_document_flag => 'Y'
1635: );

Line 1637: fnd_attached_documents2_pkg.copy_attachments

1633: X_datatype_id => l_rec.datatype_id,
1634: delete_document_flag => 'Y'
1635: );
1636: --copy the new records
1637: fnd_attached_documents2_pkg.copy_attachments
1638: ( X_from_entity_name => 'PO_LINES',
1639: X_from_pk1_value => To_Char(l_rec.po_line_id)||'-'||To_Char(p_draft_id),
1640: X_to_entity_name => 'PO_LINES',
1641: X_to_pk1_value => To_Char(l_rec.po_line_id),

Line 1655: fnd_attached_documents3_pkg.delete_row

1651: END IF;
1652:
1653: for l_rec in modified_line_attachments_c(p_draft_id,'PO_LINES_DEL') LOOP
1654: --delete the old record
1655: fnd_attached_documents3_pkg.delete_row
1656: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1657: X_datatype_id => l_rec.datatype_id,
1658: delete_document_flag => 'Y'
1659: );

Line 1671: fnd_attached_documents2_pkg.copy_attachments

1667: END IF;
1668:
1669: FOR l_rec IN new_line_attachments_c(p_draft_id) LOOP
1670: --copy the new attachments
1671: fnd_attached_documents2_pkg.copy_attachments
1672: ( X_from_entity_name => 'PO_LINES',
1673: X_from_pk1_value => To_Char(l_rec.po_line_id)||'-'||To_Char(p_draft_id),
1674: X_to_entity_name => 'PO_LINES',
1675: X_to_pk1_value => To_Char(l_rec.po_line_id),

Line 1703: from fnd_attached_documents fad, po_line_locations_draft_all plld , fnd_documents fd

1699: procedure MERGE_LINE_LOCATION_ATTACHMENT(p_draft_id NUMBER) AS
1700:
1701: cursor modified_line_loc_attachment_c(p_draft_id NUMBER,p_entity_name VARCHAR2) is
1702: select plld.line_location_id as line_location_id, fad.attached_document_id , fad.ORIG_ATTACH_DOC_ID ,fd.datatype_id
1703: from fnd_attached_documents fad, po_line_locations_draft_all plld , fnd_documents fd
1704: where plld.draft_id = p_draft_id
1705: and fad.entity_name = p_entity_name
1706: and fad.pk1_value = to_char(plld.line_location_id) || '-' || to_char(p_draft_id)
1707: AND ORIG_ATTACH_DOC_ID IS NOT NULL

Line 1718: from fnd_attached_documents fad, po_line_locations_draft_all plld , fnd_documents fd

1714: --Fetch all new attachments other than mod specific attachments as merge
1715: -- is not needed for these attachmnets
1716: cursor new_line_loc_attachment_c(p_draft_id NUMBER) is
1717: select plld.line_location_id as line_location_id, fad.attached_document_id , fad.ORIG_ATTACH_DOC_ID ,fd.datatype_id
1718: from fnd_attached_documents fad, po_line_locations_draft_all plld , fnd_documents fd
1719: where plld.draft_id = p_draft_id
1720: and fad.entity_name = 'PO_SHIPMENTS'
1721: and fad.pk1_value = to_char(plld.line_location_id) || '-' || to_char(p_draft_id)
1722: AND ORIG_ATTACH_DOC_ID IS NULL

Line 1745: fnd_attached_documents3_pkg.delete_row

1741: END IF;
1742:
1743: for l_rec in modified_line_loc_attachment_c(p_draft_id,'PO_SHIPMENTS') LOOP
1744: --delete the old records
1745: fnd_attached_documents3_pkg.delete_row
1746: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1747: X_datatype_id => l_rec.datatype_id,
1748: delete_document_flag => 'Y'
1749: );

Line 1751: fnd_attached_documents2_pkg.copy_attachments

1747: X_datatype_id => l_rec.datatype_id,
1748: delete_document_flag => 'Y'
1749: );
1750: --Copy the new records
1751: fnd_attached_documents2_pkg.copy_attachments
1752: ( X_from_entity_name => 'PO_SHIPMENTS',
1753: X_from_pk1_value => To_Char(l_rec.line_location_id)||'-'||To_Char(p_draft_id),
1754: X_to_entity_name => 'PO_SHIPMENTS',
1755: X_to_pk1_value => To_Char(l_rec.line_location_id),

Line 1768: fnd_attached_documents3_pkg.delete_row

1764: PO_LOG.stmt(d_module, d_position, x_progress);
1765: END IF;
1766: for l_rec in modified_line_loc_attachment_c(p_draft_id,'PO_SHIPMENTS_DEL') LOOP
1767: --delete the records
1768: fnd_attached_documents3_pkg.delete_row
1769: ( X_attached_document_id => l_rec.ORIG_ATTACH_DOC_ID,
1770: X_datatype_id => l_rec.datatype_id,
1771: delete_document_flag => 'Y'
1772: );

Line 1783: fnd_attached_documents2_pkg.copy_attachments

1779: PO_LOG.stmt(d_module, d_position, x_progress);
1780: END IF;
1781: FOR l_rec IN new_line_loc_attachment_c(p_draft_id) LOOP
1782: --copy the new attachments
1783: fnd_attached_documents2_pkg.copy_attachments
1784: ( X_from_entity_name => 'PO_SHIPMENTS',
1785: X_from_pk1_value => To_Char(l_rec.line_location_id)||'-'||To_Char(p_draft_id),
1786: X_to_entity_name => 'PO_SHIPMENTS',
1787: X_to_pk1_value => To_Char(l_rec.line_location_id),