='Printed Pick Slip' AND fad.pk1_value = wdd.source_line_id ) PICKING_INSTRUCTION, (SELECT listagg(fdst.short_text, ', ') WITHIN GROUP ( ORDER BY fad.seq_num) FROM fnd_attached_documents fad , fnd_documents_vl fd , fnd_documents_short_text fdst, fnd_document_categories_vl fdc WHERE fad.document_id = fd.document_id AND fdst.media_id = fd.media_id AND SYSDATE BETWEEN NVL(fd.start_date_active, SYSDATE - 1) AND NVL(fd.end_date_active, SYSDATE + 1) AND fad.entity_name = 'OE_ORDER_HEADERS' AND fd.category_id = fdc.category_id(+) AND fd.datatype_name = 'Short Text' AND fdc.user_name ='Printed Pick Slip' AND fad.pk1_value = ooha.header_id ) HEADER_PICK_INSTR , ooha.attribute20 ir_delivery_note, (SELECT fl.meaning shipping_method FROM fnd_lookup_values fl WHERE ooha.shipping_method_code = fl.lookup_code(+) AND fl.language = userenv('LANG') AND fl.lookup_type = 'SHIP_METHOD' AND fl.enabled_flag = 'Y' AND SYSDATE BETWEEN fl.start_date_active AND NVL (fl.end_date_active, SYSDATE + 1 ) ) freight_code , NULL from_subinventory , NULL from_locator_id , NULL to_subinventory , NULL to_locator_id , NULL transaction_id , NULL rev_txn_id , NULL move_order_line_id , NULL detailing_date , 'PICKED' line_status , NVL(wdd.picked_quantity,wdd.requested_quantity) primary_qty, (SELECT mtrh.request_number FROM mtl_txn_request_headers mtrh, mtl_txn_request_lines mtrl WHERE mtrh.header_id = mtrl.header_id AND mtrl.line_id = wdd.move_order_line_id ) mo_number, ( SELECT USER_NAME FROM fnd_user WHERE user_id = ooha.created_by ) entered_by , NULL mo_line_id, (SELECT mtrl.line_number FROM mtl_txn_request_lines mtrl WHERE mtrl.line_id = wdd.move_order_line_id ) mo_line_number , wdd.delivery_detail_id delivery_detail_id1 , wdd.delivery_detail_id ser_dd_id , wdd.source_header_number , TO_CHAR(wdd.source_header_id) order_n_header_char, TO_CHAR(wdd.source_line_id) order_n_line_char1 , wdd.source_header_id , wdd.source_line_id , TO_CHAR(wdd.source_header_id) source_header_chr , TO_CHAR(wdd.source_line_id) source_line_chr , wdd.shipping_instructions , wdd.ship_tolerance_above , wdd.ship_tolerance_below , wdd.inventory_item_id , wdd.inventory_item_id WDD_INV_ITEM , wdd.organization_id WDD_ORGANIZATION , wdd.requested_quantity_uom , NVL( (SELECT listagg(xiab.trade_attribute13, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = wdd.organization_id AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) , (SELECT listagg(xiab.trade_attribute13, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = (SELECT organization_id FROM foobar_2 WHERE organization_code ='000' ) AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) ) CF_ECCN, NVL( (SELECT listagg(xiab.trade_attribute14, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = wdd.organization_id AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) , (SELECT listagg(xiab.trade_attribute14, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = (SELECT organization_id FROM foobar_2 WHERE organization_code ='000' ) AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) ) HTS, NVL( (SELECT listagg(xiab.trade_attribute18, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = wdd.organization_id AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) , (SELECT listagg(xiab.trade_attribute18, ', ') WITHIN GROUP ( ORDER BY wdd.inventory_item_id) FROM foobar_1 xiab WHERE xiab.organization_id = (SELECT organization_id FROM foobar_2 WHERE organization_code ='000' ) AND wdd.inventory_item_id = xiab.inventory_item_id AND :P_ECCN_CTY_ORIGIN = 'Y' ) ) CF_CTY_ORIGIN, wnd.delivery_id , TO_CHAR(wnd.delivery_id) delivery_chr , wnd.name delivery_name , wnd.initial_pickup_location_id , oola.ordered_quantity line_ordered_quantity , f_currency.symbol currency_symbol , oola.unit_selling_price , (oola.unit_selling_price * oola.ordered_quantity) line_extended_total, oola.line_number sales_line_number , (SELECT DECODE(ship_loc.country,'US',xiab.attribute1, 'CA',xiab.attribute2, 'MX',xiab.attribute11, 'TT',xiab.attribute12, xiab.attribute1) FROM foobar_1 xiab, mtl_parameters mp WHERE xiab.inventory_item_id = oola.inventory_item_id AND xiab.organization_id = mp.master_organization_id AND mp.organization_id = oola.ship_from_org_id ) us_sds_num, TO_CHAR(wdd.inventory_item_id) item_info , DECODE(:P_ITEM_DISPLAY,'F',NULL,msitl.description) item_desc , msik.revision_qty_control_code , DECODE(:P_ITEM_DISPLAY,'D',NULL,msik.segment1) segment1 , DECODE(wdd.released_status,'B', '(Backorder line)',NULL) BACKORDER, os.set_name , NULL CUSTOMER_FLAG1 , NULL order_number_flag , NULL subinventory_flag , NULL customer_flag , NULL ship_to_flag , NULL carrier_flag , NULL shipment_priority_flag , NULL trip_stop_flag , NULL delivery_flag , (SELECT wpgr.NAME FROM mtl_txn_request_headers mtrh,