Sunday, 9 September 2018

api to create stock locator in oracle apps


api to create stock locator in oracle apps

 

In this post, we will discuss about api to create stock locator in oracle apps. We create locators under the sub inventories. So, we need to specify the sub inventory name in the api to create locator under this. I am using ‘FGI’ sub-inventory in this case. Here below is the sample code of using api to create stock locator in oracle apps.
 

Example of using api to create stock locator in oracle apps.

 

CREATE TABLE XX_LOCATOR_STAG(LOCATOR VARCHAR2(2000));
-----------------------------------------------------------------------------------
create or replace procedure XX_CREATE_STOCK_LOCATORS
is
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 := :P_ORG_ID;
l_organization_code     VARCHAR2(10) := '430';
l_sub_code              VARCHAR2(10) ;
l_concatenated_segments VARCHAR2(100);
 
CURSOR C1
IS
SELECT * FROM XX_LOCATOR_STAG;
 
BEGIN
 
 
FND_GLOBAL.APPS_INITIALIZE(1233,51007,401);
 
FND_MSG_PUB.INITIALIZE;
 
  FOR I IN C1 LOOP
 
 
    l_concatenated_segments := i.LOCATOR_CONCAT_SEGMENTS;
 
    l_sub_code := 'FGI';
 
    l_org_id:= :P_ORG_ID;
 
    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               => 'DEFAULT', /*You can also use here description of Your Locator Combination*/
            p_inventory_location_type   => 3,         -- Storage locator
            p_picking_order             => NULL,
            p_location_maximum_units    => NULL,
            p_subinventory_code         => l_sub_code, /*Subinventory 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 LOOP;

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *