hi,
I have written interface code for GRN creation.
In that i am getting error as:
WMSINB-22494:Lot/Serial validation failed. Please check log for details.
Txn Success.
for item which having Full control.
For item which having no control GRN is getting created.
which thing i put wrong..?
the code of interface is as:
SELECT COUNT(*)
INTO V_COUNT
FROM MTL_SYSTEM_ITEMS_B B
WHERE INVENTORY_ITEM_ID=I.ITEM_ID
AND LOT_CONTROL_CODE = 2 -- 2 - FULL_CONTROL, 1 - NO CONTROL
AND ORGANIZATION_ID = I.DESTINATION_ORGANIZATION_ID;
IF V_COUNT > 0 THEN
------API for lot contr
L_CHR_LOT_NUMBER :=INV_LOT_API_PUB.AUTO_GEN_LOT
(P_ORG_ID => I.DESTINATION_ORGANIZATION_ID,
P_INVENTORY_ITEM_ID => I.ITEM_ID,
P_PARENT_LOT_NUMBER => NULL,
P_SUBINVENTORY_CODE => NULL,
P_LOCATOR_ID => NULL,
P_API_VERSION => 1.0,
P_INIT_MSG_LIST => 'F',
P_COMMIT => 'T',
P_VALIDATION_LEVEL => 100,
X_RETURN_STATUS => L_CHR_RETURN_STATUS,
X_MSG_COUNT => L_NUM_MSG_COUNT,
X_MSG_DATA => L_CHR_MSG_DATA
);
IF L_CHR_RETURN_STATUS = 'S' THEN
COMMIT;
ELSE
ROLLBACK;
END IF;
INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE
(TRANSACTION_INTERFACE_ID,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_LOGIN,
LOT_NUMBER,
TRANSACTION_QUANTITY,
PRIMARY_QUANTITY,
SERIAL_TRANSACTION_TEMP_ID,
PRODUCT_CODE,
PRODUCT_TRANSACTION_ID)
VALUES
(
MTL_MATERIAL_TRANSACTIONS_S.NEXTVAL, --TRANSACTION_INTERFACE_ID
SYSDATE, --LAST_UPDATE_DATE
M_USER_ID, --LAST_UPDATED_BY
SYSDATE, --CREATION_DATE
M_USER_ID, --CREATED_BY
M_USER_ID,
L_CHR_LOT_NUMBER, --LOT_NUMBER
I.QUANTITY, --TRANSACTION_QUANTITY
I.QUANTITY, --PRIMARY_QUANTITY
NULL, --SERIAL_TRANSACTION_TEMP_ID
'RCV', --PRODUCT_CODE
RCV_TRANSACTIONS_INTERFACE_S.CURRVAL --PRODUCT_TRANSACTION_ID
);
END IF;
Please give me direction to resolve this problem..?