PriorEffDt
Mon 01 January 2018Syntax
PriorEffDt(field)
Description
Use the PriorEffDt function to return the value of the specified field from the record with the prior effective date. This function is valid only for effective-dated records.
If the record contains an effective sequence number field, the value of this field is compared along with the effective-date field when the prior effective date/effective record sequence is determined. Therefore, if there is an effective-sequence number, it's possible that the effective-date field will be the same as the current record, but the sequence number would be earlier.
If a prior record does not exist, the statement is skipped. If the PriorEffDt function is not a top-level statement, that is, if it's contained with a compound statement or a loop, the statement is skipped and execution begins with the next top-level statement.
In the following example, execution skips to the top If statement:
If ACTION <> "REH" Then /* skip to here if PriorEffdt fails to find prior recordâ
*/
If STD_HOURS <> PriorEffdt(STD_HOURS) And
Day(EFFDT) <> 1 Then
Error MsgGet(30000, 8, "Meldung nicht vorhanden - WAZ bzw.â
Beschäftigungsgradänderungen sind nur zum ersten eines Monats zulässig.")
End-If;
End-If;
/* if PriorEffdt fails, run to here directly */