DuplicateRowCheck
Function DuplicateRowCheck();
Local Rowset &rsLNRow1,&rsSerialrset1;
Local number &k, &L,&SEQ1;
Local string &M, &P;
&rsLNRow1 = GetLevel0()(1).GetRowset(Scroll.RMA_LINE);
For &SEQ1 = 1 To &rsLNRow1.ActiveRowCount
&rsSerialrset1 = &rsLNRow1.GetRow(&SEQ1).GetRowset(Scroll.RMA_SERIAL_LOT);
For &k = 1 To &rsSerialrset1.ActiveRowCount
&M =&rsSerialrset1.GetRow(&k).RMA_SERIAL_LOT.SERIAL_ID.Value;
For &L = &k + 1 To &rsSerialrset1.ActiveRowCount
&P = &rsSerialrset1.GetRow(&L).RMA_SERIAL_LOT.SERIAL_ID.Value;
If &M = &P Then
Error MsgGet(100000, 0, "Duplicate Serial_id in Rownumbers:[ " | &M | " ] and [ " | &P | " ] ");
End-If;
End-For;
End-For;
End-For;
End-Function;
No comments:
Post a Comment