flomueller
5th March 2010, 11:38
Hallo,
kann man im Session-Script ein beliebiges Tabellenfeld (z.B.:stsls044.orno) in eine lokale Textdatei oder ähnliches schreiben? Besser noch in eine Variable, die ich unter Windows im cmd.exe verwenden kann.
Ich benötige diese Informationen zum Erstellen eines Dateinamen auf Windowsebene.
Gruß
Florian

bdittmar
5th March 2010, 12:25
Hallo,
kann man im Session-Script ein beliebiges Tabellenfeld (z.B.:stsls044.orno) in eine lokale Textdatei oder ähnliches schreiben? Besser noch in eine Variable, die ich unter Windows im cmd.exe verwenden kann.
Ich benötige diese Informationen zum Erstellen eines Dateinamen auf Windowsebene.
Gruß
Florian

Hallo,

warum nicht mit :

BaanERP Programmers Guide


seq.open.local()

--------------------------------------------------------------------------------

Syntax
long seq.open.local( string filename, string mode(2), [long remove.after.use] )
Description
This opens a specified file on the client system. It returns a file pointer, which you can use to identify the file in subsequent operations. The function supports long file names.

Arguments
filename
The name of the file that must be opened. If you do not specify a path name, the file is searched for in the directory where BW is loaded.

mode
The mode in which the file must be opened. This can be one of the following options:

"r" Open for reading.
w" Create for writing.
"a" Open for writing at end of file, or create for writing.

In addition, you can add "t" to any of the above options if you want the file to be opened in text mode.

remove.after.use
Use this optional argument to specify whether or not the file must be removed after it has been closed by seq.close.local():

<>0 file is removed
0 file is not removed


Note
You cannot use seq.*() functions in combination with the seq.*.local() functions. So, you cannot use seq.seek() or seq.rewind(), for example, on a file that was opened with seq.open.local().

Return values
>=0 Success. File pointer is returned.

<0 Error. File could not be opened.


Context
ttdllbw library function.

Example
seq.open.local("C:\Program Files\Test.txt", "rt", false)

die Datei direkt erstellen ?

Statt .....\Test.txt...... Variablen verwenden.
z.B.

file.create.cmd = "C:\temp\"&str$(tdsls040.orno)&".txt"
ret = seq.open.local(file.create.cmd, "rt", false)

mfg

Bernd