Loading

Tuesday, August 24, 2010

API to get open sales order quantity in oracle apps (OE_LINE_UTIL.GET_OPEN_QUANTITY)


In this post, I have discussed an API named OE_LINE_UTIL.GET_OPEN_QUANTITY. The purpose of this API is to get the open quantity based on ordered quantity and shipped quantity. Here the formula involved is

open_quantity = ordered_quantity – shipped_quantity – reserved_quantity

Script:

SET serveroutput ON;
DECLARE
  P_HEADER_ID NUMBER;
  P_LINE_ID NUMBER;
  P_ORDERED_QUANTITY NUMBER;
  P_SHIPPED_QUANTITY NUMBER;
  v_Return NUMBER;
BEGIN
  P_HEADER_ID := 6220;
  P_LINE_ID := 4850;
  P_ORDERED_QUANTITY := 110;
  P_SHIPPED_QUANTITY := NULL;

  v_Return := OE_LINE_UTIL.GET_OPEN_QUANTITY(
    P_HEADER_ID => P_HEADER_ID,
    P_LINE_ID => P_LINE_ID,
    P_ORDERED_QUANTITY => P_ORDERED_QUANTITY,
    P_SHIPPED_QUANTITY => P_SHIPPED_QUANTITY
  );
  DBMS_OUTPUT.PUT_LINE('v_Return = ' || v_Return);
END;

0 Responses to “API to get open sales order quantity in oracle apps (OE_LINE_UTIL.GET_OPEN_QUANTITY)”

Post a Comment

Disclaimer

The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.