Reg. Updation Of Several Lines

Hi Pioneers,

Actually I am updating the line data,consisting of ItemId ,ItemName fields , on the basis of "Production Order…But I am seeing that, in case, the Production Order consists of multiple BOMs, it is fetching and updating with only one BOM…All Lines are not coming.

I am sharing my code below :

void updateBOM()

{

ProdBOM _prodBom;

InventTransferLine _inventTransferLine;

;

while select _prodBom where InventTransferTable.ProdId == _prodBom.ProdId

{

info(strfmt("%1…%2…%3…%4",_prodBom.ItemId,_prodBom.InventDimId,inventTransferLine.ItemId,inventTransferLine.InventDimId));

ttsbegin;

//inventTransferLine_ds.create();

inventTransferLine.initValue();

inventTransferLine.ItemId = _prodBom.ItemId;

inventTransferLine.God_QuantityinKg = _prodBom.RemainBOMPhysical;

inventTransferLine.god_UnitInPcs = _prodBom.UnitId;

inventTransferLine.InventDimId = _prodBom.InventDimId;

inventDim.data(InventDim::find(inventTransferLine.InventDimId));

inventTransferLine.insert(true);

ttscommit;

} }