[Stackoverflow] [Progress OpenEdge ABL] Skip assigning if found duplicates

Status
Not open for further replies.
M

Martin

Guest
I have a procedure that assigns values and sends it back. I need to implement a change that it would skip the assigning process whenever it finds duplicate iban code. It would be in this FOR EACH. Some kind of IF or something else. Basically, when it finds an iban code that was already used and assigned it would not assign it for the second or third time. I am new to OpenEdge Progress so it is really hard for me to understand correctly the syntax and write the code by myself yet. So if anyone could explain how I should implement this, give any pieces of advice or tips I would be very thankful.

Thank you!

FOR EACH viewpoint WHERE viewpoint.cif = cif.cif AND NOT viewpoint.close NO-LOCK:
DEFINE VARIABLE cIban AS CHARACTER NO-UNDO.

FIND FIRST paaa WHERE paaa.cif EQ cif.cif AND paaa.paaa = viewpoint.aaa AND NOT paaa.close NO-LOCK NO-ERROR.

cIban = viewpoint.aaa.

IF AVAILABLE paaa THEN DO:
cIban = paaa.vaaa.

CREATE tt_account_rights.
ASSIGN
tt_account_rights.iban = cIban.
END.

Continue reading...
 
Status
Not open for further replies.
Top