Compilation issue on InventCostClosingCancel_WorkInvent class


This is the system class and not modified anything in it and even macro also not modified, Please go through the peace of code below,

InventSettlement cancelSettlenent;
InventSettlement inventSettlement;
insert_recordset inventSettlement ( #InventSettlementFields )
select #InventSettlementFieldsChanged from cancelSettlenent

both the macro has same number of fields in it, and records are fetching from same table inserting back based on some filteration, but I’m getting an error on the above statement while compilation.
Error message - “The size of variable newVoucher does not match the size of field InventSettlement.Voucher. A loss of data is possible.”

I’m not getting what is the issue.

Ambanna Yatnal

The newVoucher variable and the field Voucher in the InventSettlement both extend the same dataType Voucher…

so there should not be any variation in the size of the fields…

Check whether any changes are done to the field properties…

no properties of fields are changed, all are same as system setings

The error seems to be a run time error rather than complie error…