Training

For Online SCM Functional Training Please Contact -
Gmail # rishitechnologies9@gmail.com
Cell # 9071883639

Monday, January 16, 2012

R12 - API To Create Locators In Inventory

Hi,
Today i am posting the sample code to create Locators in Inventory.


Data File :
------------------------------


ORGANIZATION_CODE|SEGMENT1|SEGMENT2|SEGMENT3|SEGMENT4|DECRIPTION|SUBINVENTORY|
M1|2|2|2|2|DESCRIPTION_1|Stores|
M1|3|3|3|3|DESCRIPTION_1|Stores|
M1|4|4|4|4|DESCRIPTION_1|Staging|
M1|5|5|5|5|DESCRIPTION_1|Staging|

-----------------------------------------------------



DECLARE
l_msg_data              VARCHAR2(100);
l_msg_count             NUMBER;
l_return_status         VARCHAR2(1);
l_locator_id            NUMBER;
l_locator_exists        VARCHAR2(1);
l_org_id                NUMBER := 207;
l_organization_code     VARCHAR2(10) := 'M1';
l_sub_code              VARCHAR2(10) ;
l_concatenated_segments VARCHAR2(100); /

BEGIN

    l_concatenated_segments := '2.2.2.2';  --  SEGMENT1.SEGMENT2.SEGMENT3.SEGMENT4
    l_sub_code := 'Stores';
    l_org_id:= 141;

    INV_LOC_WMS_PUB.CREATE_LOCATOR(
            x_return_status             => l_return_status,
            x_msg_count                 => l_msg_count,
            x_msg_data                  => l_msg_data,
            x_inventory_location_id     => l_locator_id,
            x_locator_exists            => l_locator_exists,
            p_organization_id           => l_org_id,
            p_organization_code         => l_organization_code,
            p_concatenated_segments     => l_concatenated_segments,
            p_description               => 'TEST',
            p_inventory_location_type   => 3,         -- Storage locator
            p_picking_order             => NULL,
            p_location_maximum_units    => NULL,
            p_subinventory_code         => l_sub_code,
            p_location_weight_uom_code  => NULL,
            p_max_weight                => NULL,
            p_volume_uom_code           => NULL,
            p_max_cubic_area            => NULL,
            p_x_coordinate              => NULL,
            p_y_coordinate              => NULL,
            p_z_coordinate              => NULL,
            p_physical_location_id      => NULL,
            p_pick_uom_code             => NULL,
            p_dimension_uom_code        => NULL,
            p_length                    => NULL,
            p_width                     => NULL,
            p_height                    => NULL,
            p_status_id                 => 1, -- Default status 'Active'
            p_dropping_order            => NULL
            );
         
         
       DBMS_OUTPUT.PUT_LINE('Return Status '||l_concatenated_segments||' - '||l_return_status);
     
END;

No comments:

Post a Comment