When any field value comes with changed value then only table needs to update.
to know whether any field values has changed we can use a method pmfTablehadChanged(table)
// when any field value comes with changes of existing record
if (pmfTablehadChanged(xTable))
{
xTable.update();
}
or
if (xTable != xTable.orig())
Example:
SalesTable = xTable;
xTable.ContactNo = '12345';
if (pmfTablehadChanged(xTable))
{
xTable.status = xStatus::processed;
}
xtable.update();