Showing posts with label Order Management. Show all posts
Showing posts with label Order Management. Show all posts

Thursday, February 24, 2011

WSH_DELIVERY_DETAILS.RELEASED_STATUS ( Pick Release Status)



Below post will give you the details about the pick release status
Instance: 11i or R12
Table: WSH_DELIVERY_DETAILS
Column: RELEASED_STATUS
Possible Values:
B: Backordered- Line failed to be allocated in Inventory
C: Shipped -Line has been shipped
D: Cancelled -Line is Cancelled
N: Not Ready for Release -Line is not ready to be released
R: Ready to Release: Line is ready to be released
S: Released to Warehouse: Line has been released to Inventory for processing
X: Not Applicable- Line is not applicable for Pick Release
Y: Staged- Line has been picked and staged by Inventory
Delivery line statuses in detail
 Not Applicable (Code X)  
The delivery line can be invoiced but non-shippable, for example, a service line or a warranty line.
Not Ready for Release (Code N)
 The delivery line is not eligible for pick release. This happens when the order line is manually imported into Oracle Shipping Execution using the Import Delivery Line concurrent process or the corresponding order line has not reached the Awaiting Shipping workflow activity.
Ready for Release (Code R)
  The delivery line is eligible for pick release.  Occurs when the order line has reached the Awaiting Shipping workflow activity (it is booked, scheduled, and in Oracle Shipping Execution).
Submitted to Warehouse (Code S)
Pick release has processed the delivery line and has:
1.       Created move order headers and lines.
2.       Found available quantity and created inventory allocations.
3.       Not pick confirmed. If you are using auto-pick confirm, it changes release status to Staged. If you are not using auto-pick confirm and want to progress the delivery lines, navigate to Oracle Inventory Move Order Transaction window and perform manual pick confirm.
Staged (Code Y)
 The delivery line is pick confirmed; inventory is transferred from storage sub-inventory to staging sub-inventory.  It remains staged until ship confirm.
 Backordered (Code B)
Some of the circumstances that can causes this status are listed below
Ø  Pick release has processed the delivery line and cannot find the entire quantity.  This typically occurs when the Oracle Inventory indicates that there is not enough material (either because there is not enough material or because the inventory balance is incorrect).  
Ø  At ship confirm, you: Enter Shipped Quantity that is less than Original Requested Quantity Backorder the entire delivery quantity transfer a reservation to cycle count.
Ø  This typically occurs when the material that you want to ship:
1.       Has become unavailable, for example, damaged, between picking and shipping.
2.       Is available and you backorder material for specific business reasons. For example, all available material has been allocated to a specific customer when you find out additional supply for other orders will be delayed.
  Shipped (Code C)
  The delivery line’s delivery is ship confirmed and posted as in-transit, OM Interface and Inventory Interface have processed, and the trip is closed.
  Cancelled (Code D)
  The order line that the delivery line supports is cancelled.

Thursday, February 24, 2011 by Team search · 12

Thursday, February 3, 2011

Autocreate Deliveries Through API WSH_DELIVERY_DETAILS_PUB.AUTOCREATE_DELIVERIES

                                                                                                                          

Below script will help you to Autocreate Delivery and assign them to Delivery Details using the API WSH_DELIVERY_DETAILS_PUB.AUTOCREATE_DELIVERIES. This generally create a new delivery in WSH_NEW_DELIVERIES table and assign it to the delivery details in WSH_DELIVERY_ASSIGNMENTS Table. 

We have tested this script in Oracle Apps R12.1.1 instance.

SCRIPT:

set serveroutput on;
Declare
x_return_status VARCHAR2 (2);
x_msg_count     NUMBER;
x_msg_data      VARCHAR2 (2000);
p_line_rows     WSH_UTIL_CORE.ID_TAB_TYPE;
x_del_rows      WSH_UTIL_CORE.ID_TAB_TYPE;
p_count         NUMBER;

v_context       VARCHAR2(100);


FUNCTION set_context( i_user_name    IN  VARCHAR2
                     ,i_resp_name    IN  VARCHAR2
                     ,i_org_id       IN  NUMBER)
RETURN VARCHAR2
IS
v_user_id      NUMBER;
v_resp_id      NUMBER;
v_resp_appl_id NUMBER;
v_lang         VARCHAR2(100);
v_session_lang VARCHAR2(100):=fnd_global.current_language;
v_return       VARCHAR2(10):='T';
v_nls_lang     VARCHAR2(100);
v_org_id       NUMBER:=i_org_id;
/* Cursor to get the user id information based on the input user name */
CURSOR cur_user
IS
    SELECT     user_id
    FROM       fnd_user
    WHERE      user_name  =  i_user_name;
/* Cursor to get the responsibility information */
CURSOR cur_resp
IS
    SELECT     responsibility_id
              ,application_id
              ,language
    FROM       fnd_responsibility_tl
    WHERE      responsibility_name  =  i_resp_name;
/* Cursor to get the nls language information for setting the language context */
CURSOR cur_lang(p_lang_code VARCHAR2)
IS
    SELECT    nls_language
    FROM      fnd_languages
    WHERE     language_code  = p_lang_code;
BEGIN
    /* To get the user id details */
    OPEN cur_user;
    FETCH cur_user INTO v_user_id;
    IF cur_user%NOTFOUND
    THEN
        v_return:='F';
       
    END IF;
    CLOSE cur_user;

    /* To get the responsibility and responsibility application id */
    OPEN cur_resp;
    FETCH cur_resp INTO v_resp_id, v_resp_appl_id,v_lang;
    IF cur_resp%NOTFOUND
    THEN
        v_return:='F';
       
    END IF;
    CLOSE cur_resp;
   
    DBMS_OUTPUT.PUT_LINE (v_user_id||' ' ||v_resp_id|| ' ' ||v_resp_appl_id);

    /* Setting the oracle applications context for the particular session */
    fnd_global.apps_initialize ( user_id      => v_user_id
                                ,resp_id      => v_resp_id
                                ,resp_appl_id => v_resp_appl_id);

    /* Setting the org context for the particular session */
    mo_global.set_policy_context('S',v_org_id);

    /* setting the nls context for the particular session */
    IF v_session_lang != v_lang
    THEN
        OPEN cur_lang(v_lang);
        FETCH cur_lang INTO v_nls_lang;
        CLOSE cur_lang;
        fnd_global.set_nls_context(v_nls_lang);
    END IF; --IF v_session_lang != v_lang

    RETURN v_return;
EXCEPTION
WHEN OTHERS THEN
    RETURN 'F';
END set_context;

BEGIN

DBMS_OUTPUT.PUT_LINE('1');
--1. Set applications context if not already set.
v_context := set_context('&USERID','&RESPONSIBILITY_Id',93);
IF v_context = 'F'
    THEN
        DBMS_OUTPUT.PUT_LINE('Error while setting the context');       
    END IF;
DBMS_OUTPUT.PUT_LINE('2');

mo_global.init ('ONT');
p_line_rows (1) :=218027 ; -- Delivery_detail_id from WSH_DELIVERY_DETAILS

-- API Call for Auto Create Deliveries
WSH_DELIVERY_DETAILS_PUB.AUTOCREATE_DELIVERIES
        (
              p_api_version_number => 1.0,
              p_init_msg_list      => apps.fnd_api.g_true,
              p_commit             => apps.fnd_api.g_true,
              x_return_status      => x_return_status,
              x_msg_count          => x_msg_count,
              x_msg_data           => x_msg_data,
              p_line_rows          => p_line_rows,
              x_del_rows           => x_del_rows
            );

IF x_return_status = 'S' THEN
   DBMS_OUTPUT.put_line('Delivery Got Sucessfully created and assigned to delivery details '||x_del_rows(1));
ELSE
   DBMS_OUTPUT.put_line('Message count ' || x_msg_count);
   IF x_msg_count = 1 THEN
      DBMS_OUTPUT.put_line('x_msg_data '||x_msg_data);
   ELSIF x_msg_count > 1 THEN
   LOOP
      p_count := p_count+1;
      x_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
      IF x_msg_data IS NULL THEN
      EXIT;
      END IF;
      DBMS_OUTPUT.put_line('Message' || p_count ||'---'||x_msg_data);
      END LOOP;
      END IF;
END IF;

END;

Thursday, February 3, 2011 by Team search · 0

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.