Monday, May 9, 2016

INV usefull Query

SELECT MSIK.CONCATENATED_SEGMENTS ITEM_NAME,
    POL.ITEM_DESCRIPTION,
    POH.SEGMENT1 PO_NUMBER,
    POR.RELEASE_NUM,
    POL.LINE_NUM PO_LINE_NUM,
    POLL.SHIPMENT_NUM,
    POD.DISTRIBUTION_NUM,
    RSH.RECEIPT_NUM,
    RAE.PRIMARY_QUANTITY,
    POV.VENDOR_NAME,
    MP.ORGANIZATION_CODE,
    RAE.TRANSACTION_DATE,
    NVL(RT.TRANSACTION_TYPE, DECODE(RAE.EVENT_TYPE_ID, 14, 'PERIOD END ACCRUAL')) RCV_TXN_TYPE ,
    RAE.RCV_TRANSACTION_ID TRANSACTION_ID,
    RAE.ORGANIZATION_ID ,
    RAE.ACCOUNTING_EVENT_ID ,
    RAE.PRIMARY_UNIT_OF_MEASURE
  FROM RCV_TRANSACTIONS RT,
    RCV_SHIPMENT_HEADERS RSH,
    PO_VENDORS POV,
    PO_HEADERS_ALL POH,
    PO_LINES_ALL POL,
    PO_LINE_LOCATIONS_ALL POLL,
    PO_DISTRIBUTIONS_ALL POD,
    PO_RELEASES_ALL POR,
    MTL_SYSTEM_ITEMS_KFV MSIK,
    RCV_ACCOUNTING_EVENTS RAE,
    MTL_PARAMETERS MP
  WHERE RAE.PO_HEADER_ID        = POH.PO_HEADER_ID
  AND RAE.PO_LINE_ID            = POL.PO_LINE_ID
  AND RAE.PO_LINE_LOCATION_ID   = POLL.LINE_LOCATION_ID
  AND RAE.PO_DISTRIBUTION_ID    = POD.PO_DISTRIBUTION_ID
  AND RAE.PO_RELEASE_ID         = POR.PO_RELEASE_ID(+)
  AND POH.VENDOR_ID             = POV.VENDOR_ID
  AND RT.SHIPMENT_HEADER_ID     = RSH.SHIPMENT_HEADER_ID(+)
  AND RAE.RCV_TRANSACTION_ID    = RT.TRANSACTION_ID(+)
  AND MSIK.ORGANIZATION_ID(+)   = RAE.ORGANIZATION_ID
  AND MSIK.INVENTORY_ITEM_ID(+) = RAE.INVENTORY_ITEM_ID
  AND MP.ORGANIZATION_ID        = RAE.ORGANIZATION_ID;

No comments:

Post a Comment

Types of animations

Animation is a diverse and creative field with a variety of styles that artists and filmmakers use to bring their visions to life. Here are ...