Thursday, 14 June 2012

PO_LINES 2 MTL -- INVENTORY

PO_LINES_ALL 

SELECT
    PLA.PO_LINE_ID,
    PLA.LINE_NUM                     "LINE NUM",
    MS.SEGMENT1                       "ITEM NAME",
    PLA.ITEM_REVISION                  "ITEM REVISION",
    MC.SEGMENT1                       "ITEM CATEGORY",
    PLA.ITEM_DESCRIPTION                "ITEM DESCRIPTION",
    PLA.UNIT_MEAS_LOOKUP_CODE          "UOM",
    PLA.UNIT_PRICE * PLA.QUANTITY          "AMOUNT"
FROM
    PO_HEADERS_ALL PHA,
    PO_LINES_ALL PLA,
    MTL_SYSTEM_ITEMS_B MS,
    MTL_CATEGORIES_B MC
WHERE
    MS.ORGANIZATION_ID = '204'                   AND
    PHA.PO_HEADER_ID = '32495'                   AND
    PHA.PO_HEADER_ID = PLA.PO_HEADER_ID           AND
    PLA.ITEM_ID = MS.INVENTORY_ITEM_ID          AND
    PLA.CATEGORY_ID = MC.CATEGORY_ID
 

No comments:

Post a Comment