Skip to Content
avatar image
Former Member

transfer problem

Hi ,

I tried to send the data to application server using the below code.

After the execution of below code it is resulting in dump.

I cannot use 'ENCODING UNICODE' option because the client system is nonunicode system.

Please reply me with solution .

DATA : out_file(120) TYPE c.

TYPES: BEGIN OF t_file,

data(1000) TYPE c,

END OF t_file.

DATA: i_file TYPE t_file OCCURS 0 WITH HEADER LINE,

w_file(1500) TYPE c.

START-OF-SELECTION.

i_file = 'Test by writing €'.

APPEND i_file.

out_file = '
tmp\interface.tmp11'.

OPEN DATASET out_file FOR OUTPUT IN TEXT MODE

ENCODING NON-UNICODE .

LOOP AT i_file.

MOVE i_file-data

TO w_file.

TRANSFER w_file TO out_file.

  • MESSAGE i000(00) WITH 'Conversion error'.

ENDLOOP.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 17, 2007 at 05:13 AM

    Hi,

    Change this

    OPEN DATASET out_file FOR OUTPUT IN TEXT MODE

    ENCODING NON-UNICODE .

    <b>IF Sy-subrc = 0.</b>

    LOOP AT i_file.

    MOVE i_file-data

    TO w_file.

    TRANSFER w_file TO out_file.

    • MESSAGE i000(00) WITH 'Conversion error'.

    ENDLOOP.

    <b>ENDIF.</b>

    Regards,

    Atiss

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 05:13 AM

    DATA : out_file(120) TYPE c.

    TYPES: BEGIN OF t_file,

    data(1000) TYPE c,

    END OF t_file.

    DATA: i_file TYPE t_file OCCURS 0 WITH HEADER LINE,

    w_file(1500) TYPE c.

    START-OF-SELECTION.

    i_file = 'Test by writing €'.

    APPEND i_file.

    out_file = '
    tmp\interface.tmp11'.

    OPEN DATASET out_file FOR OUTPUT IN TEXT MODE

    <b>IGNORING CONVERSION ERRORS</b> .

    LOOP AT i_file.

    MOVE i_file-data

    TO w_file.

    TRANSFER w_file TO out_file.

    • MESSAGE i000(00) WITH 'Conversion error'.

    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 05:23 AM

    I tried them but still not fulfilled my requirement .

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      OPEN DATASET w_fic_phfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

      IF sy-subrc = 0.

      LOOP AT tbl_fic_out.

      TRANSFER tbl_fic_out TO w_fic_phfile LENGTH 297.

      CLEAR tbl_fic_out.

      ENDLOOP.

      CLOSE DATASET w_fic_phfile.

      ELSE.

      MESSAGE e000(zv02) WITH text-003 w_fic_phfile.

      ENDIF. "end of sy-subrc

  • avatar image
    Former Member
    Aug 17, 2007 at 05:42 AM

    if i use ' ignoring conersion errors ' it is displaying thespecial characters as # .

    But i think this is not the solution .

    Add comment
    10|10000 characters needed characters exceeded