22. September 2006 10:45
22. September 2006 10:53
22. September 2006 10:57
22. September 2006 11:05
22. September 2006 21:19
27. September 2006 14:05
27. September 2006 19:43
27. September 2006 20:24
28. September 2006 02:08
Fehlermerker:=FALSE;
i:=1;
CASE DestTable OF
0: ZeilenLänge:=80; //Bemerkungen (Artikelnotiz)
1: ZeilenLänge:=50; //Textbaustein (Artikellangtext)
END;
WHILE i < Sourcetext.LENGTH DO BEGIN
Position:=i;
IF Sourcetext.GETSUBTEXT(extractedText,Position ,ZeilenLänge) >0 THEN BEGIN
IF PADSTR(extractedText,1)='[' THEN BEGIN
i:=STRPOS(extractedText,']');
extractedText:=PADSTR(extractedText,i);
END ELSE BEGIN;
testzahl:=0;
WHILE (testzahl <> 255) AND (testzahl <> 10)
AND (Position+ZeilenLänge>i) AND ( i <= Sourcetext.LENGTH) DO BEGIN
i:=i+1;
Sourcetext.GETSUBTEXT(Testtext,i,1);
testchar:=Testtext[1];
testzahl:=testchar;
END;
IF i = Position + ZeilenLänge THEN BEGIN
IF Sourcetext.GETSUBTEXT(Testtext,i,1) >0 THEN BEGIN
WHILE (Testtext <> ' ') AND (Position<i) DO BEGIN
i:=i-1;
Sourcetext.GETSUBTEXT(Testtext,i,1);
END;
IF i<= Position THEN BEGIN
i:=Position+ZeilenLänge-1;
IF NOT Fehlermerker THEN BEGIN
write2file('Die '+FORMAT(DestTable)+' konnte nicht sauber vor '
+ FORMAT(ZeilenLänge) + ' Zeichen getrennt werden.');
write2file('Bitte bearbeiten Sie die ' + FORMAT(DestTable) + ' nach dem Import.');
END;
Fehlermerker:=TRUE;
END;
END;
END;
Sourcetext.GETSUBTEXT(extractedText,Position,i-Position);
i:=i+1;
END;
InsertNote(extractedText,DestTable)
END;
END;
Name DataType Length
Position Integer
i Integer
extractedText Text 80
Testtext Text 10
Fehlermerker Boolean
ZeilenLänge Integer
testchar Char
testzahl Integer
IF DELCHR(TextValue,'>',' ')=''THEN EXIT; //keine Leerzeilen hinzufügen
CASE DestTable OF
0:
WITH ItemNote DO BEGIN
INIT;
"Table Name":=3;
"No.":="Import-Item-No.";
Comment:=TextValue;
CommentLine.SETRANGE("Table Name","Table Name");
CommentLine.SETRANGE("No.","No.");
CommentLine.SETRANGE(Date,WORKDATE);
IF NOT CommentLine.FIND('-') THEN BEGIN
Date := WORKDATE;
"Line No.":= 10000;
END ELSE BEGIN
CommentLine.SETRANGE(Date);
IF CommentLine.FIND('+') THEN
"Line No.":=CommentLine."Line No." +10000;
END;
INSERT;
END;
1:
BEGIN
LangCode:='';
TextNo:=1;
ETHeader2.RESET;
ETHeader2.SETRANGE("Table Name",2);
ETHeader2.SETRANGE("No.","Import-Item-No.");
ETHeader2.SETRANGE("Text No.",TextNo);
ETHeader2.SETRANGE("Language Code",LangCode);
IF NOT ETHeader2.FIND('-') THEN BEGIN
ETHeader.INIT;
ETHeader."Table Name":=2;
ETHeader."No.":="Import-Item-No.";
ETHeader."Language Code":=LangCode;
ETHeader."Text No.":=TextNo;
ETHeader.INSERT;
END;
WITH ExtratextLine DO BEGIN
INIT;
"Table Name":=2;
"No.":="Import-Item-No.";
"Language Code":=LangCode;
"Text No.":=TextNo;
Text:=TextValue;
ETLine.SETRANGE("Table Name","Table Name");
ETLine.SETRANGE("No.","No.");
ETLine.SETRANGE("Language Code",LangCode);
ETLine.SETRANGE("Text No.",TextNo);
IF NOT ETLine.FIND('+') THEN
"Line No.":= 10000
ELSE
"Line No.":=ETLine."Line No." +10000;
INSERT;
END;
END;
END;
Name DataType Subtype
ItemNote Record Comment Line
CommentLine Record Comment Line
ETHeader Record Extended Text Header
ETHeader2 Record Extended Text Header
ExtratextLine Record Extended Text Line
ETLine Record Extended Text Line
28. September 2006 17:17