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:=84; /*Organization_id */
l_organization_code VARCHAR2(10):='US2'; /*Organization_Code */
l_sub_code VARCHAR2(10); /*Variable for Subinventory*/
l_concatenated_segments VARCHAR2 ( 100 ); /*Variable for Locator Segment*/
l_user_id NUMBER := 1110 ; /* User ID From FND_users Table */
l_resp_id NUMBER := 20634 ; /*Responsibility Id*/
l_resp_appl_id NUMBER:=401; /* Responsibility Application id */
BEGIN
fnd_global.apps_initialize (fnd_profile.value('USER_ID'), fnd_profile.value('RESP_ID'), fnd_profile.value('RESP_APPL_ID'));
mo_global.set_policy_context ('S', fnd_profile.value('ORG_ID'));
mo_global.init ('ONT');
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=>84,
p_organization_code=>'US2',
p_concatenated_segments=>'100-000-000-0000-319/1.1-0000-0000-0000-0000',
p_description=>'Locator Created By API',/*You can also use here description of Your LocatorCombination*/
p_inventory_location_type=>3,-- Storage locator
p_picking_order=>NULL,
p_location_maximum_units=>NULL,
p_subinventory_code=>'100', /*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(l_locator_id);
END;
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:=84; /*Organization_id */
l_organization_code VARCHAR2(10):='US2'; /*Organization_Code */
l_sub_code VARCHAR2(10); /*Variable for Subinventory*/
l_concatenated_segments VARCHAR2 ( 100 ); /*Variable for Locator Segment*/
l_user_id NUMBER := 1110 ; /* User ID From FND_users Table */
l_resp_id NUMBER := 20634 ; /*Responsibility Id*/
l_resp_appl_id NUMBER:=401; /* Responsibility Application id */
BEGIN
fnd_global.apps_initialize (fnd_profile.value('USER_ID'), fnd_profile.value('RESP_ID'), fnd_profile.value('RESP_APPL_ID'));
mo_global.set_policy_context ('S', fnd_profile.value('ORG_ID'));
mo_global.init ('ONT');
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=>84,
p_organization_code=>'US2',
p_concatenated_segments=>'100-000-000-0000-319/1.1-0000-0000-0000-0000',
p_description=>'Locator Created By API',/*You can also use here description of Your LocatorCombination*/
p_inventory_location_type=>3,-- Storage locator
p_picking_order=>NULL,
p_location_maximum_units=>NULL,
p_subinventory_code=>'100', /*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(l_locator_id);
END;
No comments:
Post a Comment