1363: select fl.file_name, dbms_lob.getlength(fl.file_data)
1364: from fnd_documents d,
1365: fnd_attached_documents ad,
1366: fnd_doc_category_usages dcu,
1367: fnd_attachment_functions af,
1368: fnd_lobs fl
1369: where ((ad.pk1_value = to_char(l_po_header_id) and ad.entity_name = 'PO_HEADERS')
1370: OR
1371: (ad.pk1_value = to_char((select vendor_id from po_headers_all
1412: select fl.file_name, dbms_lob.getlength(fl.file_data)
1413: from fnd_documents d,
1414: fnd_attached_documents ad,
1415: fnd_doc_category_usages dcu,
1416: fnd_attachment_functions af,
1417: fnd_lobs fl
1418: where ((ad.pk1_value = to_char((select po_header_id from po_releases_all
1419: where po_release_id = l_po_release_id
1420: )) and ad.entity_name = 'PO_HEADERS')
1626: select fl.file_name
1627: from fnd_documents d,
1628: fnd_attached_documents ad,
1629: fnd_doc_category_usages dcu,
1630: fnd_attachment_functions af,
1631: fnd_lobs fl
1632: where ((ad.pk1_value = to_char((select po_header_id from po_releases_all
1633: where po_release_id = l_document_id
1634: )) and ad.entity_name = 'PO_HEADERS')
1689: select fl.file_name
1690: from fnd_documents d,
1691: fnd_attached_documents ad,
1692: fnd_doc_category_usages dcu,
1693: fnd_attachment_functions af,
1694: fnd_lobs fl
1695: where ((ad.pk1_value = to_char(l_document_id) and ad.entity_name = 'PO_HEADERS')
1696: OR
1697: (ad.pk1_value = to_char((select vendor_id from po_headers_all
4528: select fl.file_name
4529: from fnd_documents d,
4530: fnd_attached_documents ad,
4531: fnd_doc_category_usages dcu,
4532: fnd_attachment_functions af,
4533: fnd_lobs fl
4534: where (ad.pk1_value=to_char((select po_header_id from po_releases_all
4535: where po_release_id=p_document_id
4536: ))and ad.entity_name='PO_HEADERS')
4548: select fl.file_name
4549: from fnd_documents d,
4550: fnd_attached_documents ad,
4551: fnd_doc_category_usages dcu,
4552: fnd_attachment_functions af,
4553: fnd_lobs fl
4554: where (
4555: (ad.pk1_value=to_char(p_document_id) and ad.entity_name='PO_RELEASES'))
4556: and d.document_id = ad.document_id
4566: select fl.file_name
4567: from fnd_documents d,
4568: fnd_attached_documents ad,
4569: fnd_doc_category_usages dcu,
4570: fnd_attachment_functions af,
4571: fnd_lobs fl
4572: where (
4573: (ad.pk1_value=to_char((select pha.vendor_id
4574: from po_headers_all pha,po_releases_all pra
4588: select fl.file_name
4589: from fnd_documents d,
4590: fnd_attached_documents ad,
4591: fnd_doc_category_usages dcu,
4592: fnd_attachment_functions af,
4593: fnd_lobs fl
4594: where (
4595: (ad.pk1_value in (select po_line_id from po_line_locations_all
4596: where po_release_id=p_document_id
4609: select fl.file_name
4610: from fnd_documents d,
4611: fnd_attached_documents ad,
4612: fnd_doc_category_usages dcu,
4613: fnd_attachment_functions af,
4614: fnd_lobs fl
4615: where (
4616: (ad.pk1_value in (select line_location_id from po_line_locations_all
4617: where po_release_id=p_document_id
4630: select /*+ leading(AD) */ fl.file_name
4631: from fnd_documents d,
4632: fnd_attached_documents ad,
4633: fnd_doc_category_usages dcu,
4634: fnd_attachment_functions af,
4635: fnd_lobs fl
4636: where ( /*bug 13528070*/
4637: (ad.pk2_value in (select /*+ push_subq no_unnest */ pl.item_id
4638: from po_lines_all pl, po_line_locations_all pll
4662: select fl.file_name
4663: from fnd_documents d,
4664: fnd_attached_documents ad,
4665: fnd_doc_category_usages dcu,
4666: fnd_attachment_functions af,
4667: fnd_lobs fl
4668: where (ad.pk1_value=to_char(p_document_id) and ad.entity_name='PO_HEADERS')
4669: and d.document_id = ad.document_id
4670: and dcu.category_id = d.category_id
4679: select fl.file_name
4680: from fnd_documents d,
4681: fnd_attached_documents ad,
4682: fnd_doc_category_usages dcu,
4683: fnd_attachment_functions af,
4684: fnd_lobs fl
4685: where (
4686: (ad.pk1_value=to_char((select vendor_id from po_headers_all
4687: where po_header_id=p_document_id)) and ad.entity_name='PO_VENDORS'))
4699: select fl.file_name
4700: from fnd_documents d,
4701: fnd_attached_documents ad,
4702: fnd_doc_category_usages dcu,
4703: fnd_attachment_functions af,
4704: fnd_lobs fl
4705: where ( /*bug 13528070 Changing to to_char*/
4706: (ad.pk1_value in (select to_char(po_line_id) from po_lines_all
4707: where po_header_id=p_document_id
4720: select fl.file_name
4721: from fnd_documents d,
4722: fnd_attached_documents ad,
4723: fnd_doc_category_usages dcu,
4724: fnd_attachment_functions af,
4725: fnd_lobs fl
4726: where (
4727: (ad.pk1_value in (select from_header_id from po_lines_all
4728: where po_header_id=p_document_id
4742: select fl.file_name
4743: from fnd_documents d,
4744: fnd_attached_documents ad,
4745: fnd_doc_category_usages dcu,
4746: fnd_attachment_functions af,
4747: fnd_lobs fl
4748: where (
4749: (ad.pk1_value in (select from_line_id from po_lines_all
4750: where po_header_id=p_document_id
4764: select fl.file_name
4765: from fnd_documents d,
4766: fnd_attached_documents ad,
4767: fnd_doc_category_usages dcu,
4768: fnd_attachment_functions af,
4769: fnd_lobs fl
4770: where (
4771: (ad.pk1_value in (select line_location_id from po_line_locations_all
4772: where po_header_id=p_document_id
4786: select /*+ leading(AD) */ fl.file_name
4787: from fnd_documents d,
4788: fnd_attached_documents ad,
4789: fnd_doc_category_usages dcu,
4790: fnd_attachment_functions af,
4791: fnd_lobs fl
4792: where ( /*bug 13528070*/
4793: (ad.pk2_value in (select /*+ push_subq no_unnest */ item_id from po_lines_all
4794: where po_header_id=p_document_id
6273: FROM fnd_documents_long_text fds ,
6274: FND_ATTACHED_DOCUMENTS AD,
6275: FND_DOCUMENTS_TL DT ,
6276: FND_DOCUMENTS D ,
6277: FND_ATTACHMENT_FUNCTIONS AF,
6278: fnd_doc_category_usages DCU,
6279: po_lines_all plx
6280: WHERE ( ad.entity_name=''PO_LINES''
6281: AND ad.pk1_value=to_char ( plx.po_line_id ) )
6294: FROM fnd_documents_long_text fds ,
6295: FND_ATTACHED_DOCUMENTS AD,
6296: FND_DOCUMENTS_TL DT ,
6297: FND_DOCUMENTS D ,
6298: FND_ATTACHMENT_FUNCTIONS AF,
6299: fnd_doc_category_usages DCU,
6300: po_lines_all plx
6301: WHERE ( ad.entity_name=''PO_HEADERS''
6302: AND ad.pk1_value=to_char ( plx.from_header_id )
6316: FROM fnd_documents_long_text fds ,
6317: FND_ATTACHED_DOCUMENTS AD,
6318: FND_DOCUMENTS_TL DT ,
6319: FND_DOCUMENTS D ,
6320: FND_ATTACHMENT_FUNCTIONS AF,
6321: fnd_doc_category_usages DCU,
6322: po_lines_all plx
6323: WHERE ( ad.entity_name=''PO_IN_GA_LINES''
6324: AND ad.pk1_value=to_char ( plx.from_line_id )
6338: FROM fnd_documents_long_text fds ,
6339: FND_ATTACHED_DOCUMENTS AD,
6340: FND_DOCUMENTS_TL DT ,
6341: FND_DOCUMENTS D ,
6342: FND_ATTACHMENT_FUNCTIONS AF,
6343: fnd_doc_category_usages DCU,
6344: po_lines_all plx
6345: WHERE ( ad.entity_name=''PO_HEADERS''
6346: AND ad.pk1_value=to_char ( plx.CONTRACT_ID )
6360: FROM fnd_documents_long_text fds ,
6361: FND_ATTACHED_DOCUMENTS AD,
6362: FND_DOCUMENTS_TL DT ,
6363: FND_DOCUMENTS D ,
6364: FND_ATTACHMENT_FUNCTIONS AF,
6365: fnd_doc_category_usages DCU,
6366: po_lines_all plx
6367: WHERE ( ad.entity_name=''MTL_SYSTEM_ITEMS''
6368: AND ad.pk1_value=to_char ( PO_COMMUNICATION_PVT.getInventoryOrgId ( ) )