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

Problem in code page convirsion

former_member240605
Participant
0 Likes
1,589


Hi expert,

                 In my custom program when I am executing it , its giving run time error - 'A character set converesion is not possible. At the conversion of a text  'from codepage '4103' to codepage '1100' - a character was found that can not be displayed in one of the two codepages : - or it was detected  that this conversion is not supported'. I understand that here codepage is - '4103' or '1100'. But I can't understand that what I have to do. Please guide me with your valuable suggestions.

5 REPLIES 5
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,434

Can you please paste relevant code

Read only

0 Likes
1,434

Hi Nabheet ,

here is the code and its showing dump at this line -

TRANSFER lw_out_file TO v_filename.

This is my complete code :

FORM f_down_aplication .

DATA:

    lw_out_file TYPE ty_out_file.

*#Open File

*  OPEN DATASET v_file_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

  IF v_filename IS INITIAL.

    v_filename = v_file_name.

  ELSE.

    v_filename = v_file_audt.

  ENDIF.

*  OPEN DATASET v_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

  OPEN DATASET v_filename FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.

* OPEN DATASET v_filename FOR OUTPUT IN LEGACY TEXT MODE

*     CODE PAGE '1100' WITH WINDOWS LINEFEED.

IF sy-subrc NE 0.

*   File & open error.

*    MESSAGE e091(zlxxs_001) WITH v_file_name.

    MESSAGE e091(zlxxs_001) WITH v_filename.

ELSE.

*#  For each record found

    LOOP AT it_out_file INTO lw_out_file.

      CONCATENATE lw_out_file c_cr_lf INTO lw_out_file.

*#    Create record in file


*      TRANSFER lw_out_file TO v_file_name.

      TRANSFER lw_out_file TO v_filename.



    ENDLOOP.



*#  Close File

*    CLOSE DATASET v_file_name.

    CLOSE DATASET v_filename.

* En

    IF sy-subrc EQ 0.
* *      MESSAGE s092(zlxxs_001) WITH v_file_name.

*    ELSE.

**     File & open error.

*      MESSAGE e091(zlxxs_001) WITH v_file_name.

      MESSAGE s092(zlxxs_001) WITH v_filename.

    ELSE.

*     File & open error.

      MESSAGE e091(zlxxs_001) WITH v_filename.
  ENDIF.
ENDIF.
ENDFORM.

Read only

0 Likes
1,434

What was the issue with OPEN DATASET v_file_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. It should have solved your porblem. Else you can also try CL_ABAP_CONV_OUT* classes to translate from one code page to other codepage the data

Read only

0 Likes
1,434

Hi Nabhneet,

                      Thanks for your reply. I found for which line its giving dump.  I am descrining it again. 

In  internal table -  it_out_file   there are  12000 records.  It showing dump for line no.- 4105 in production sever. In previous line also same records. But with same data when I am executing it in quality server, its working fine. Now I am confused what to do? is it problem of mass data? If this then what should to do.  Please guide me.

Here I am giving the code snippest :


OPEN DATASET v_filename FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.

LOOP AT it_out_file INTO lw_out_file.

      CONCATENATE lw_out_file c_cr_lf INTO lw_out_file.
*#    Create record in file

TRANSFER lw_out_file TO v_filename.

ENDLOOP.

Read only

0 Likes
1,434

Hi,

Do you have the solution for this? I'm currently having this error. thanks.

Regards,

JB