
I am trying to add a newline between XMLPorts, but I either get no newline or I get a space added at the beginning of the newline.
Here the current code, the newline woks but I get an empty space character at the beginning of the new line.
If I remove one of the two character form the CRLF, the newline doesn't work.
txtCRLF := 'XX';
txtCRLF[1] := 13;
txtCRLF[2] := 10;
exportFile.CREATE('payment.txt');
exportFile.CREATEOUTSTREAM(exportOutput);
XMLPORT.EXPORT(XMLPORT::"Payment Export Header", exportOutput);
exportOutput.WRITE(txtCRLF);
XMLPORT.EXPORT(XMLPORT::"Payment Export Batch", exportOutput);
exportOutput.WRITE(txtCRLF);
XMLPORT.EXPORT(XMLPORT::"Payment Export Payment", exportOutput);
exportFile.CLOSE;
*This post is locked for comments
I have the same question (0)Got it working with exportOutput.WRITETEXT();
exportFile.CREATE('payment.txt');
exportFile.CREATEOUTSTREAM(exportOutput);
XMLPORT.EXPORT(XMLPORT::"Payment Export Header", exportOutput);
exportOutput.WRITETEXT();
XMLPORT.EXPORT(XMLPORT::"Payment Export Batch", exportOutput);
exportOutput.WRITETEXT();
XMLPORT.EXPORT(XMLPORT::"Payment Export Payment", exportOutput);
exportFile.CLOSE;