Search This Blog

Monday, November 6, 2023

Apps R12 Query for Inventory Ledger Report

/* Formatted on 11/6/2023 11:20:13 AM (QP5 v5.336) */
  SELECT ROWID,
         SUBINVENTORY_CODE,
         MCC_CODE,
         REVISION,
         TRANSFER_SUBINVENTORY,
         SHIP_TO_LOCATION_ID,
         COST_GROUP_ID,
         TRANSFER_COST_GROUP_ID,
         LPN_ID,
         CONTENT_LPN_ID,
         TRANSFER_LPN_ID,
         TRANSFER_ORGANIZATION_ID,
         OWNING_ORGANIZATION_ID,
         PLANNING_TP_TYPE,
         OWNING_TP_TYPE,
         PLANNING_ORGANIZATION_ID,
         TRANSACTION_DATE,
         TRANSACTION_ID,
         TRANSACTION_QUANTITY,
         TRANSACTION_UOM,
         PRIMARY_QUANTITY,
         SECONDARY_TRANSACTION_QUANTITY,
         SECONDARY_UOM_CODE,
         SHIPMENT_NUMBER,
         WAYBILL_AIRBILL,
         FREIGHT_CODE,
         NUMBER_OF_CONTAINERS,
         TRANSACTION_REFERENCE,
         COSTED_FLAG,
         OPM_COSTED_FLAG,
         PM_COST_COLLECTED,
         PM_COST_COLLECTOR_GROUP_ID,
         TRANSACTION_GROUP_ID,
         VENDOR_LOT_NUMBER,
         SOURCE_CODE,
         SOURCE_LINE_ID,
         TRANSFER_TRANSACTION_ID,
         PARENT_TRANSACTION_ID,
         LOGICAL_TRANSACTION,
         TRANSACTION_SET_ID,
         RCV_TRANSACTION_ID,
         MOVE_TRANSACTION_ID,
         COMPLETION_TRANSACTION_ID,
         OPERATION_SEQ_NUM,
         SOURCE_PROJECT_ID,
         SOURCE_TASK_ID,
         PROJECT_ID,
         TASK_ID,
         TO_PROJECT_ID,
         TO_TASK_ID,
         EXPENDITURE_TYPE,
         PA_EXPENDITURE_ORG_ID,
         ERROR_CODE,
         ERROR_EXPLANATION,
         transaction_source_name,
         XFR_OWNING_ORGANIZATION_ID,
         TRANSFER_OWNING_TP_TYPE,
         ATTRIBUTE_CATEGORY,
         ATTRIBUTE1,
         ATTRIBUTE2,
         ATTRIBUTE3,
         ATTRIBUTE4,
         ATTRIBUTE5,
         ATTRIBUTE6,
         ATTRIBUTE7,
         ATTRIBUTE8,
         ATTRIBUTE9,
         ATTRIBUTE10,
         ATTRIBUTE11,
         ATTRIBUTE12,
         ATTRIBUTE13,
         ATTRIBUTE14,
         ATTRIBUTE15,
         LAST_UPDATED_BY,
         CREATION_DATE,
         CREATED_BY,
         LAST_UPDATE_LOGIN,
         REQUEST_ID,
         PROGRAM_APPLICATION_ID,
         PROGRAM_ID,
         PROGRAM_UPDATE_DATE,
         LAST_UPDATE_DATE,
         INVENTORY_ITEM_ID,
         ORGANIZATION_ID,
         LOCATOR_ID,
         REASON_ID,
         TRANSFER_LOCATOR_ID,
         TRANSACTION_TYPE_ID,
         TRANSACTION_ACTION_ID,
         TRANSACTION_SOURCE_TYPE_ID,
         TRANSACTION_SOURCE_ID,
         EMPLOYEE_CODE,
         DEPARTMENT_ID,
         MASTER_SCHEDULE_UPDATE_CODE,
         RECEIVING_DOCUMENT,
         PICK_STRATEGY_ID,
         PICK_RULE_ID,
         PUT_AWAY_STRATEGY_ID,
         PUT_AWAY_RULE_ID,
         ORIGINAL_TRANSACTION_TEMP_ID
    FROM MTL_MATERIAL_TRANSACTIONS
   WHERE     TRANSACTION_ACTION_ID != 24
         AND (ORGANIZATION_ID = 2352)
         AND (INVENTORY_ITEM_ID = 127519)
         AND (transaction_date BETWEEN TO_DATE ('01-01-2023 00:00:00',
                                                'DD-MM-YYYY HH24:MI:SS')
                                   AND TO_DATE ('06-11-2023 23:59:59',
                                                'DD-MM-YYYY HH24:MI:SS'))
         AND (LOGICAL_TRANSACTION = 2 OR LOGICAL_TRANSACTION IS NULL)
ORDER BY TRANSACTION_DATE DESC, TRANSACTION_ID DESC, SUBINVENTORY_CODE

No comments:

Post a Comment