Create Stock Locator By Using API(EBS R12)
项目上对一期的采购接受接口导入程序进行更改,增加货位信息,要求:货位 = 子库存 + 项目 + 任务。由于子库启用了动态货位控制,所以需要在程序中动态创建货位,所以周折了一番。
1. 接口表: rcv_transactions_interface
字段: locator_id
API: inv_loc_wms_pub.create_locator
2. 注意点: 动态创建货位时,首先会创建货位弹性域。而创建货位弹性域时,对子库存会进行值集的验证(INV_SRS_SUBINV),值集INV_SRS_SUBINV中,WHERE里对PROFILE.MFG_ORGANIZATION_ID做了限制,所以,在并发请求中,需要进行fnd_profile.put('MFG_ORGANIZATION_ID',111)的处理。否则会报值集验证不通过。
3. 范例脚本
DECLARE
x_return_status VARCHAR2(1000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(1000);
x_inventory_location_id NUMBER;
x_locator_exists VARCHAR2(100);
BEGIN
BEGIN
fnd_global.apps_initialize(user_id => 1192,
resp_id => 51519,
resp_appl_id => 211);
fnd_profile.put('MFG_ORGANIZATION_ID',111);
END;
inv_loc_wms_pub.create_locator(x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
x_inventory_location_id => x_inventory_location_id,
x_locator_exists => x_locator_exists,
p_organization_id => 111,
p_organization_code => 'T01',
p_concatenated_segments => '.1995.PJ_TEST_01.1..',
p_description => NULL,
p_inventory_location_type => 3,
p_picking_order => NULL,
p_location_maximum_units => NULL,
p_subinventory_code => '1115',
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,
p_dropping_order => NULL);
COMMIT;
END;
成长
/ | \
学习 总结 分享
QQ交流群:122230156