Thursday, 5 September 2024

Oracle Fusion + Query to fetch Inventory On-hand Available to Reserve quantity

 select 

  NVL(TR_QTY, 0) - (

    NVL(TR_QTY_B, 0) + NVL(TR_QTY_C, 0)

  ) res_qty 

from 

  (

    SELECT 

      (

        SELECT 

          SUM(transaction_quantity) 

        FROM 

          INV_ONHAND_QUANTITIES_DETAIL 

        WHERE 

          inventory_item_id = 100000000615408 

          AND organization_id = 300000002138348 

          AND subinventory_code IN (

            SELECT 

              SECONDARY_INVENTORY_NAME 

            FROM 

              INV_SECONDARY_INVENTORIES 

            WHERE 

              organization_id = 300000002138348 

              AND reservable_type = '2'

          )

      ) AS TR_QTY_C, 

      (

        SELECT 

          SUM(RESERVATION_QUANTITY) 

        FROM 

          INV_RESERVATIONS 

        WHERE 

          inventory_item_id = 100000000615408 

          AND organization_id = 300000002138348

      ) AS TR_QTY_B, 

      (

        SELECT 

          SUM(transaction_quantity) 

        FROM 

          INV_ONHAND_QUANTITIES_DETAIL 

        WHERE 

          inventory_item_id = 100000000615408 

          AND organization_id = 300000002138348

      ) AS TR_QTY 

    from 

      egp_system_items_b MB1 

    where 

      1 = 1 

      AND (

        mb1.organization_id = 300000002138348

      ) 

      AND (

        mb1.inventory_item_id = 100000000615408

      )

  );


2 comments:

anjani02 said...

⭐ Online BA Analyst Course
Enroll in a complete online BA analyst course to learn from fundamentals to advanced topics.
The program covers Agile methodology, stakeholder mapping, and functional modeling.
Practical case studies help you relate concepts to real business problems.
Interactive discussions improve your critical thinking and communication skills.
Expert guidance ensures you understand each concept clearly.
Flexible batches allow you to balance learning with other commitments.
This training equips you for roles like BA consultant, analyst, and project coordinator.

mohdsahil said...

FundedFirm is rapidly establishing itself as the best prop firm of Nigeria, offering talented local traders unprecedented access to institutional capital up to $200,000. Operating on the high-performance MetaTrader 5 (MT5) platform, the firm provides professional trading conditions including 1:100 leverage, zero commissions, and zero-swap accounts specifically tailored for the African market. Traders benefit from industry-leading profit splits starting at 90% and scaling to 100% for top performers. With lightning-fast 24-hour payout processing via Crypto (USDT) and local bank transfers, FundedFirm delivers a transparent, unrestricted environment where news trading is fully permitted and evaluation time limits are eliminated, ensuring your ultimate trading success.

Best prop firm of Nigeria

Post a Comment