How to Arrange/ Sort/ Filter/ Change Translate Value or Prompt Table
Local Rowset &Xlat;
&Xlat = CreateRowset(Record.PSXLATITEMLANG);
&Xlat.Flush();
/*– Decode Value and Sort of Translate Value–*/
rem &Xlat.Fill(“Where fieldname = ‘Field Name’ order by decode(Fieldvalue,’Jan’,1,0),fieldvalue”);
/*– Filter Value and Change Long Name of Translate Value –*/
&Xlat.Fill(“Where fieldname = ‘WO_WO_TYPE’ AND FIELDVALUE NOT IN ( ‘0’,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’10’,’12’) ORDER BY decode(XLATLONGNAME,’Income’,0,’Value Creation’,’2′ ,’Benchmarking’,’3′ ,’Risk Management’,3 ,’KPI Main’,3,1)”);
WO_TBL.WO_WO_TYPE.ClearDropDownList();
&j = &Xlat.ActiveRowCount + 1;
For &i = 1 To &Xlat.ActiveRowCount
&Value = &Xlat.GetRow(&i).PSXLATITEMLANG.FIELDVALUE.Value;
&descr = &Xlat.GetRow(&i).PSXLATITEMLANG.XLATLONGNAME.Value;
rem DERIVED_WO.WO_WO_TYPE.AddDropDownItem(&Value, &Descr);
If &Value = “11” Then
&descr = “Value Creation Special”;
End-If;
WO_TBL.WO_WO_TYPE.AddDropDownItem(&Value, Rept(Char(9), &j – &i) | &descr);
End-For;