cancel
Showing results for 
Search instead for 
Did you mean: 

problem reading excel file from application server

Former Member
0 Kudos

Hi expert ,

When I upload file by using  binary mode in cg3z tranjection and try to read the file by this bellow code it can not read file and it will give dump

( A character set conversion is not possible.) .but when i upload exact file by using ascii mode i can read this file .

I think may be bold part of coding is any wrong .So can anyone help me what is the exact problem ?


Code:-


OPEN DATASET ofile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
     DO.
       READ DATASET ofile INTO wa_tab .
       IF sy-subrc EQ 0.
         APPEND wa_tab TO it_tab .
       ELSE .
         CLOSE DATASET ofile.
       ENDIF.
     ENDDO .
close DATASET ofile .

Thanks & Regards

Rajesh

Accepted Solutions (0)

Answers (1)

Answers (1)

jie
Advisor
Advisor
0 Kudos

Hello Rajesh,

I suggest you to firstly conver the binary file to UTF-8 format and then upload it into system if your
system is unicode.Pls aslo refer to the note 752835 and 747615.

Regards

Jie Bai

Former Member
0 Kudos

Hi Jie

Thank you for replying me .I have no any idea abt file format . But now when i am uploading this file using ascii format ,i can read this file .So how can i know my system is unicoded or not . If you have any idea please share me .

Florian
Active Contributor
0 Kudos

Hi Rajesh,

if your system is unicode or not, that should be a basic thing you have to know. Your a developer!

Work through the suggested notes and if you are facing again problems, you come back again and ask for further support. There is a lot of discussions here, what you can do to get your question answered.

IT is also the wrong space, this space is the correct one for questions like that.

~Florian

PS: Read through the ROE. 3rd and 4th point right here