Error Axt 2012 tts

I encountered an error while updating an entry in the invention table. I am using the following code example.

static void Job4(Args _args) { CsInvBOMSplitQtyCalcHelper bomCalc; Qty qty; InventTable inventTable; InventTable updateInventTable; BOM bom; boolean result; BOMId bomId; BOMVersion bomVersion; ItemId item = "1000M-3C-Pcs"; select firstOnly * from bomversion where bomversion.Active == true && bomversion.ItemId == item && csIsLengthItem(item) == false; if (0 != bomVersion.RecId) { select * from bom where bom.BOMId == bomversion.BOMId exists join inventTable where bom.ItemId == inventTable.ItemId && inventTable.CsIsLengthItem == true; } if (0 != bom.RecId) { result = true; bomCalc = CsInvBOMSplitQtyCalcHelper::construct(item); qty = bomCalc.getAdvicedBOMSpoolQty(); } ttsBegin; while select forUpdate updateInventTable where updateInventTable.ItemId == item { updateInventTable.CsInvBOMSplitQty = qty; updateInventTable.update(); } ttsCommit; info(strFmt('%1, %2, %3', result, qty, inventTable.CsInvBOMSplitQty)); } 

This is the error I get:

enter image description here

Please help me in solving this problem.

+5
source share
1 answer

The error, obviously, was not caused by this task (but, possibly, by an earlier version).

Just run this small job at the reset TTS level:

 static ttsAbort(Args args) { ttsabort; } 

TTS level errors are usually caused by programming errors, for example by calling return before ttsCommit .

+4
source

Source: https://habr.com/ru/post/1208109/


All Articles