we tried to write a program exporting the results of Quick-Viewer-Reports into a file while batch processing. This worked out fine with the coding below.
But as soon as there are currency-fields SAP aborts with "UC_OBJECTS_NOT_CHARLIKE".
DATA: filename LIKE rlgrap-filename.
IF list_id = 'G00'.
filename = '/usr/sap/trans/tmp/'.
filename+19 = program.
filename+120 = sy-datum.
REPLACE ALL OCCURRENCES OF '=' IN filename WITH ' '.
CONDENSE filename NO-GAPS.
OPEN DATASET filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
LOOP AT datatab.
TRANSFER datatab TO filename.
CLOSE DATASET filename.
MESSAGE w111(z1) WITH filename.
Wie tried various kinds of "open dataset... encoding utf-8/non-unicode... ignoring conversion errors..." but nothing worked. Binary mode isn't helpful because the data in the file have to be useful for the user instantly.
Who can help?
Thanks in advance!