Skip to Content

How to CONVERT EBCDIC to ASCII in ABAP?

Hi ,

I have a requirement to read EBCDIC files in ABAP. is there any FM that converts EBCDIC to ASCII. so that we can persist the data as ASCII rather than EBCDIC.

In general suggest me what we have to do when reading EBCDIC files.

Thanks

NB

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 18, 2017 at 02:27 PM

    Look at methods cl_abap_codepage=>convert_from/to. (or cl_abap_conv_in/out_ce for older versions)


    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • I think you can do it via method CONVERT_STRUC, and you'll need to define a target structure, defining the character and packed fields in the same sequence of the fields from the input EBCDIC bytes.