static void DataToTxtFile(Args _args)
{
TextIO file;
container line;
InventTable invenTable;
#define.filename('E:\\items.txt') // Set location where you want to store the file.
#File
;
file = new TextIO(#filename, #io_write);
if (!file || file.status() != IO_Status::Ok)
{
throw error("File cannot be opened.");
}
file.outFieldDelimiter(';');// for semicolon seperator
while select invenTable
{
line = [invenTable.ItemId,invenTable.ItemName,invenTable.ItemGroupId];
file.writeExp(line);
}
Info ("Task Done");
}
{
TextIO file;
container line;
InventTable invenTable;
#define.filename('E:\\items.txt') // Set location where you want to store the file.
#File
;
file = new TextIO(#filename, #io_write);
if (!file || file.status() != IO_Status::Ok)
{
throw error("File cannot be opened.");
}
file.outFieldDelimiter(';');// for semicolon seperator
while select invenTable
{
line = [invenTable.ItemId,invenTable.ItemName,invenTable.ItemGroupId];
file.writeExp(line);
}
Info ("Task Done");
}
No comments:
Post a Comment