Wednesday, June 23, 2010

API to confirm on Order Header Status (OE_HEADER_STATUS_PUB)


We have an API to check whether the Order has crossed its important statuses.
For example with the below script we can check whether the particular order got CLOSED or not.

SET SERVEROUTPUT ON;
DECLARE
  P_HEADER_ID   NUMBER;
  X_RESULT      VARCHAR2(200);
  X_RESULT_DATE DATE;
BEGIN
  P_HEADER_ID := 1331;

  OE_HEADER_STATUS_PUB.GET_CLOSED_STATUS(
    P_HEADER_ID   => P_HEADER_ID,
    X_RESULT      => X_RESULT,
    X_RESULT_DATE => X_RESULT_DATE
  );
  DBMS_OUTPUT.PUT_LINE('X_RESULT = ' || X_RESULT);
  DBMS_OUTPUT.PUT_LINE('X_RESULT_DATE = ' || X_RESULT_DATE);
END;

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

SI NO
Procedure
Parameters
IN
OUT
1
GET_BOOKED_STATUS
p_header_id
x_result
2
GET_BOOKED_STATUS
p_header_id
x_result, x_result_date
3
GET_CLOSED_STATUS
p_header_id
x_result
4
GET_CLOSED_STATUS
p_header_id
x_result, x_result_date
5
GET_CANCELLED_STATUS
p_header_id
x_result
6
GET_CANCELLED_STATUS
p_header_id
x_result, x_result_date


0 Responses to “API to confirm on Order Header Status (OE_HEADER_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.