PROCEDURE create_lot_number(p_item_id IN NUMBER,
p_lot_number IN VARCHAR2,
p_end_date IN DATE,
p_organization_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_data OUT NOCOPY VARCHAR2) IS
l_expiration_date DATE;
l_object_id NUMBER;
l_msg_count NUMBER;
BEGIN
-- 计算批次的到期日
IF p_end_date IS NULL THEN
l_expiration_date := add_months(SYSDATE, 12);
ELSE
l_expiration_date := p_end_date;
END IF;
inv_lot_api_pub.insertlot(p_api_version => 1.0,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_f
EBS开发_INV生成物料批次API
![](https://img-home.csdnimg.cn/images/20240711042549.png)