NextEffDt

Mon 01 January 2018

Syntax

NextEffDt(field)

Description

Use the NextEffDt function to return the value of the specified field from the record with the next effective date (and effective sequence number if specified). The return value is an Any data type. This function is valid only for effective-dated records.

If the next record doesn't exist, the statement is skipped. If the NextEffDt function isn't a top-level statement, that is, if it's contained within a compound statement or a loop, the statement is skipped and execution restarts 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 NextEffDt fails to find next record */ 
   If    STD_HOURS <> NextEffDt(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 NextEffDt fails, run to here directly */