update record in x++ :
static void Job15tyo(Args _args)
{
InventTable _inventTable;
InventItemGroupItem _inventItemGroupItem;
ItemGroupId _ItemGroupId = _inventItemGroupItem.ItemGroupId ;
ttsBegin;
while select forUpdate _inventTable
exists join _inventItemGroupItem
where _inventItemGroupItem.ItemGroupId == "WIP" && _inventTable.TECIsOverideInvTransParam == NoYescombo::Yes
{
_inventTable.TECIsOverideInvTransParam = NoYesCombo::No;
_InventTable.update();
}
ttsCommit;
info('Finish');
}
===== ATAU ====
static void OAY_InventTableUptadeProductGroups(Args _args)
{
InventTable InventTable;
OAY_InventTableUpdateTable OAY_InventTableUpdateTable;
;
ttsbegin;
while select forupdate InventTable
{
while select OAY_InventTableUpdateTable
where OAY_InventTableUpdateTable.ItemId == InventTable.ItemId
{
InventTable.BlnProductGroupID = OAY_InventTableUpdateTable.BlnProductGroupID;
InventTable.BlnItemTypeID = OAY_InventTableUpdateTable.BlnItemTypeID;
InventTable.BlnItemLicenseID = OAY_InventTableUpdateTable.BlnItemLicenseID;
InventTable.InventSubGroupId = OAY_InventTableUpdateTable.InventSubGroupId;
InventTable.doUpdate();
}
}
ttscommit;
info("bitti");
}
static void Job15tyo(Args _args)
{
InventTable _inventTable;
InventItemGroupItem _inventItemGroupItem;
ItemGroupId _ItemGroupId = _inventItemGroupItem.ItemGroupId ;
ttsBegin;
while select forUpdate _inventTable
exists join _inventItemGroupItem
where _inventItemGroupItem.ItemGroupId == "WIP" && _inventTable.TECIsOverideInvTransParam == NoYescombo::Yes
{
_inventTable.TECIsOverideInvTransParam = NoYesCombo::No;
_InventTable.update();
}
ttsCommit;
info('Finish');
}
===== ATAU ====
static void OAY_InventTableUptadeProductGroups(Args _args)
{
InventTable InventTable;
OAY_InventTableUpdateTable OAY_InventTableUpdateTable;
;
ttsbegin;
while select forupdate InventTable
{
while select OAY_InventTableUpdateTable
where OAY_InventTableUpdateTable.ItemId == InventTable.ItemId
{
InventTable.BlnProductGroupID = OAY_InventTableUpdateTable.BlnProductGroupID;
InventTable.BlnItemTypeID = OAY_InventTableUpdateTable.BlnItemTypeID;
InventTable.BlnItemLicenseID = OAY_InventTableUpdateTable.BlnItemLicenseID;
InventTable.InventSubGroupId = OAY_InventTableUpdateTable.InventSubGroupId;
InventTable.doUpdate();
}
}
ttscommit;
info("bitti");
}
0 comments:
Post a Comment