This does't work:

Code:
Procedure onConstrain
    String sKto
    Integer iLaenge
    Get Value of oKto to sKto
    Move (Length(sKto)) to iLaenge
    Set psKTO to sKto  <- is defined
    If (sKto<>"") ;
        Constrain rwa as ((left(rwa.KTO,iLaenge)) = psKTO(Self) or (left(rwa.GK,iLaenge)) = psKTO(Self))  <- I want a match of the first one or two characters of the accountnumber rwa.kto
End_Procedure
No error message but no records found.
Without the left() function it is ok.
Embeded DB and I know it can't be optimized.
It is in a RDS-Report.