Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

open data set

Former Member
0 Likes
379

Hello ,

I am sending file from sap system to printer server . File has data for licence tags meaning numbers and some text

that shoul be printed on licence tag with bar code .

Numbers are printed properly but text has errors when we a using some special characters that we found in German or

French alfabet like (éèçà ). Other characters are like A B C are printed properly with no errors .

Data to be send is in table ( OUTREC )with one field type CHAR length 8000 ,

file to be opened (g_filename ) on server is of TYPE string .

My question is should I use FOR OUTPUT IN BINARY MODE instead of actual code ,

to be sure that special characters will be printed in the way tey been send to printer ?

This is actual code

OPEN DATASET g_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.

err_flag = 'X'.

RAISE lbl_create_err.

ENDIF.

LOOP AT outrec.

TRANSFER outrec TO g_filename.

ENDLOOP.

CLOSE DATASET g_filename.

Thank you

2 REPLIES 2
Read only

Former Member
0 Likes
346

Hello,

Check with OPEN DATASET IN BINARY MODE and even if that's not working, try to explicitly mention the code page for the special characters using


OPEN DATASET....IN LEGACY TEXT MODE CODE PAGE 'xxxx'.

Vikranth

Read only

0 Likes
346

Thank you