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 dataset binary

andreas_mann3
Active Contributor
0 Likes
1,073

Hi,

I've a problem with the open dataset command and the german umlauts (ä, ö, ü)

here's my coding:


*file is a csv-text file (UTF-8)

DATA: datab LIKE solix OCCURS 0 WITH HEADER LINE.


  OPEN DATASET file FOR INPUT IN legacy binary  mode.
                                                                                DO.
    READ DATASET file INTO datab.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
                                                                                append datab to binary_content.
                                                                                ENDDO.

**     add the binary table  as attachment to document object
      document->add_attachment(
        i_attachment_type    =  p_typ                       "#EC NOTEXT
        i_attachment_subject = 'Meldeliste'                 "#EC NOTEXT
        i_attachment_size    = size
        i_att_content_hex    = binary_content ).


all worked fine, besides the german umlauts (ä, ö, ü)

I get faulty signs like ü

can anyone help.

which addition I must add to the open datset - command

or must I convert the datab-field?

1 REPLY 1
Read only

Former Member
0 Likes
676

Hi Andreas,

have you tried to open dataset with code page UTF-8?

it should be OPEN DATASET file FOR INPUT IN legacy binary mode CODE PAGE cp.

I don't remember which is the cp for utf...

Hope this could be helpful

Andrea

Here maybe there are the encoding

http://wiki.sdn.sap.com/wiki/display/ABAP/Characterencodingconversion

Edited by: Andrea Marangon on Oct 26, 2011 1:03 PM