Friday, July 29, 2016

Query to Find Orders for specific item in r12

SELECT  MSI.SEGMENT1 ORD_EBS_ITEM,
              OOLA. HEADER_ID,
              OOHA. ORDER_NUMBER,
                           OOLA.USER_ITEM_DESCRIPTION ITEM_NUMBER,
                           OOHA. ATTRIBUTE2,
                           SUM(OOLA.ORDERED_QUANTITY) ORDERED_QUANTITY,
                           SUM(OOLA. SHIPPED_QUANTITY) SHIPPED_QUANTITY
                      FROM APPS.OE_ORDER_HEADERS_ALL OOHA,
                           APPS.OE_ORDER_LINES_ALL   OOLA,
                           APPS.MTL_SYSTEM_ITEMS     MSI
                     WHERE 1 = 1
                       AND OOHA.HEADER_ID = OOLA.HEADER_ID
                       AND OOLA.SHIP_FROM_ORG_ID = 1468
                       AND OOLA.CANCELLED_FLAG = 'N'
                       AND OOLA.SHIPPABLE_FLAG = 'Y'
                       AND OOLA.OPEN_FLAG = 'Y'
                       AND OOLA.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID
                       AND OOLA.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
                       AND OOLA.LINE_CATEGORY_CODE = 'ORDER'
                  And oola. user_item_description = '265848'
                     GROUP BY MSI.SEGMENT1,
                     OOLA. HEADER_ID,
                     OOHA. ORDER_NUMBER,
                     OOHA. ATTRIBUTE2,
                              OOLA.USER_ITEM_DESCRIPTION
                              order by ooha. attribute2

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 ...