15. Oktober 2008 09:18
RecRef.OPEN("Table ID",FALSE,"Company Name");
EVALUATE(RecID,"Record ID");
RecRef.GET(RecID);
15. Oktober 2008 09:29
15. Oktober 2008 09:35
15. Oktober 2008 11:57
15. Oktober 2008 12:35
15. Oktober 2008 13:09
15. Oktober 2008 14:36
Table ID: 5001903
Record ID: Zahlungsdatei Nr.: 94, lfd.Nr.: 70000
15. Oktober 2008 16:13
15. Oktober 2008 16:35
29. Oktober 2008 12:43
RecRef.OPEN("Table ID",FALSE,"Company Name");
Fields.RESET;
Fields.SETRANGE(TableNo,"Table ID");
Fields.SETRANGE(FieldName,'Posting Date');
KeyString := "Record ID";
i := 0;
i2 := 0;
IF Fields.FINDFIRST THEN BEGIN
// Werte des Primärschlüssels in KeyString-Array legen
// i gibt an, wieviele Felder es im Primärschlüssel gibt
REPEAT
i += 1;
KeyString := COPYSTR(KeyString,(STRPOS(KeyString,':')+2)); //alles nach dem doppelpunkt
CommaPos := STRPOS(KeyString,','); //nächste Komma-Position
IF STRPOS(KeyString,',') = 0 THEN
KeyValue[i] := KeyString
ELSE
KeyValue[i] := COPYSTR(KeyString,1,(CommaPos-1));
UNTIL CommaPos = 0;
KRef := RecRef.KEYINDEX(1);
FOR i2 := 1 TO i DO BEGIN
FRef := KRef.FIELDINDEX(i2);
IF FORMAT(FRef.TYPE) = 'Integer' THEN BEGIN
EVALUATE(IntValue,KeyValue[i2]);
FRef.SETRANGE(IntValue);
END ELSE
FRef.SETRANGE(KeyValue[i2]);
END;
RecRef.FINDFIRST;
//Posting Date aus Record auslesen
FRef := RecRef.FIELD(Fields."No.");
PostingDate := FRef.VALUE;
Fields.RESET;
Fields.SETRANGE(TableNo,"Table ID");
Fields.SETRANGE(FieldName,"Field Name");
Fields.FINDFIRST;
FRef := RecRef.FIELD(Fields."No.");
FRef.VALUE(PostingDate);
RecRef.MODIFY;
END;
RecRef.CLOSE;