This discussion is archived
1 Reply Latest reply: Aug 29, 2012 1:33 PM by 787476 RSS

Facing problem with INV_LOT_API_PUB.UPDATE_INV_LOT api

515986 Newbie
Currently Being Moderated
Hi,

I'm working on an object which calculates lot expiration date based on item principles. Once the expiration date is calculated I have to update that to EXPIRATION_DATE column in MTL_LOT_NUMBERS table. To do this, I'm using Oracle Standard API i.e., INV_LOT_API_PUB.UPDATE_INV_LOT.

When I'm trying to update EXPIRATION_DATE in MTL_LOT_NUMBERS table, not only this column but there are other columns which are getting updated. Also, WHO columns are are NOT getting updated. Below is the code I'm using.

Code:
===========
declare
l_return_status VARCHAR2(10);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_inventory_item_id mtl_system_items_b.inventory_item_id%TYPE := 12345; --Inventory Item ID
l_organization_id mtl_lot_numbers.organization_id%TYPE := 118; -- Inventory Organization ID
l_lot_number mtl_lot_numbers.lot_number%TYPE := 'INT3049'; -- Lot Number
l_expiration_date mtl_lot_numbers.expiration_date%TYPE := sysdate; -- Expiration Date
l_attributes_tbl inv_lot_api_pub.char_tbl;
l_c_attributes_tbl inv_lot_api_pub.char_tbl;
l_n_attributes_tbl inv_lot_api_pub.number_tbl;
l_d_attributes_tbl inv_lot_api_pub.date_tbl;

begin

l_d_attributes_tbl(1) := add_months(sysdate, -1); -- D_atttribute1
l_c_attributes_tbl(10) := 'YES'; -- C_attribute10
inv_lot_api_pub.update_inv_lot (x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_inventory_item_id => l_inventory_item_id,
p_organization_id => l_organization_id,
p_lot_number => l_lot_number,
p_expiration_date => l_expiration_date,
p_attributes_tbl => l_attributes_tbl,
p_c_attributes_tbl => l_c_attributes_tbl,
p_n_attributes_tbl => l_n_attributes_tbl,
p_d_attributes_tbl => l_d_attributes_tbl,
p_source => 401--l_application_id for application 'INV'
);

commit;

end;
=====================================================

Can someone look into this and do help me if you have any clue on this?

Thanks in advance.

Venkatesh

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points