QUERY TO EXTRACT TO PURCHASE ORDERS DATA
select pha.SEGMENT1 , pha.ATTRIBUTE9 LEGACY_PO , pha.COMMENTS Description , pha.CREATION_DATE , aps.SEGMENT1 VENDOR_NUM , aps.VENDOR_NAME , hlv.LOCATION_CODE SHIP_TO , hlv.LOCATION_CODE BILL_TO , pha.CURRENCY_CODE , pha.RATE_TYPE , pha.RATE_DATE , pha.RATE , papf.full_name , pla.LINE_NUM , msik.CONCATENATED_SEGMENTS ITEM , msik.ATTRIBUTE1 ban_code , msik.ITEM_TYPE , pla.UNIT_MEAS_LOOKUP_CODE , pla.QUANTITY , pla.UNIT_PRICE , plla.NEED_BY_DATE , ppa.SEGMENT1 PROJECT , ptv.TASK_NUMBER , pda.EXPENDITURE_TYPE , pda.EXPENDITURE_ITEM_DATE , haou.NAME EXPENDITURE_ORG , gcck.CONCATENATED_SEGMENTS CHARGE_ACCOUNT , papf2.FULL_NAME PR_UNIT_HEAD , haou2.NAME DEPARTMENT , pha.ATTRIBUTE14 DEPARTMENT_HEADER from PO_HEADERS_All pha , AP_SUPPLIERS aps , HR_LOCATIONS_V hlv , HR_LOCATIONS_V hlv2 , per_all_people_f papf , po_lines_all pla , mtl_system_items_kfv msik , PA_PROJECTS_ALL ppa , pa_tasks_v ptv , po_distributions_all pda , hr_all_organization_units haou , gl_code_combinations_kfv gcck , p...