Wednesday, June 23, 2010

API to confirm on Order Line Status (OE_LINE_STATUS_PUB)


We have an API to check whether the Line has crossed each of the important statuses.
For example with the below script we can check the particular lines picking status.

SET SERVEROUTPUT ON;
DECLARE
  P_LINE_ID         NUMBER;
  X_RESULT          VARCHAR2(200);
  X_PICKED_QUANTITY NUMBER;
  X_PICKED_QUANTITY_UOM VARCHAR2(200);
BEGIN
  P_LINE_ID:= 1358;

  OE_LINE_STATUS_PUB.GET_PICK_STATUS(
    P_LINE_ID             => P_LINE_ID,
    X_RESULT              => X_RESULT,
    X_PICKED_QUANTITY     => X_PICKED_QUANTITY,
    X_PICKED_QUANTITY_UOM => X_PICKED_QUANTITY_UOM
  );
  DBMS_OUTPUT.PUT_LINE('X_RESULT = ' || X_RESULT);
  DBMS_OUTPUT.PUT_LINE('X_PICKED_QUANTITY = ' || X_PICKED_QUANTITY);
  DBMS_OUTPUT.PUT_LINE('X_PICKED_QUANTITY_UOM = ' || X_PICKED_QUANTITY_UOM);
END;
/

Below is the list other procedures available in the package OE_LINE_STATUS_PUB,

SI NO
Procedure
Parameters
IN
OUT
1
GET_CLOSED_STATUS
p_line_id
x_result
2
GET_CLOSED_STATUS
p_line_id
x_result, x_result_date
3
GET_CANCELLED_STATUS
p_line_id
x_result
4
GET_CANCELLED_STATUS
p_line_id
x_result, x_result_date
5
GET_PURCHASE_RELEASE_STATUS
p_line_id
x_result
6
GET_PURCHASE_RELEASE_STATUS
p_line_id
x_result, x_result_date
7
GET_SHIP_STATUS
p_line_id
x_result
8
GET_SHIP_STATUS
p_line_id
x_result, x_result_date
9
GET_PICK_STATUS
p_line_id
x_result
10
GET_PICK_STATUS
p_line_id
x_result, x_result_date
11
GET_RECEIVED_STATUS
p_line_id
x_result
12
GET_RECEIVED_STATUS
p_line_id
x_result, x_result_date
13
GET_INVOICED_STATUS
p_line_id
x_result
14
GET_INVOICED_STATUS
p_line_id
x_result, x_result_date


Apart from the above Procedures we have one Function also

FUNCTION Get_Line_Status
( p_line_id                  IN   NUMBER
 ,p_flow_status_code         IN   VARCHAR2)
RETURN VARCHAR2;


0 Responses to “API to confirm on Order Line Status (OE_LINE_STATUS_PUB)”

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.