1. Add Enum control in Form
2 .Enum Contol AutoDeclaration property set to Yes.
3 .in control modified method add below code.
public boolean modified()
{
int ret;
QueryBuildRange range;
;
ret = super();
range = SysQuery::findOrCreateRange(
purchTable_DS.query().dataSourceTable(tablenum(PurchTable)),
fieldnum(PurchTable, PurchStatus));
range.value(queryValue(controlname.selection()));
purchTable_DS.executeQuery();
return ret;
}