Convert Char to ASCII in EEC 6

DATA: class_convert TYPE REF TO cl_abap_conv_out_ce,
      ascii TYPE xstring,
      char(10) TYPE c VALUE 'A'.

class_convert = cl_abap_conv_out_ce=>create( encoding = 'UTF-8'
                                             endian = 'L' ).

CALL METHOD class_convert->write( data = char n = 1 ).
" n = jumlah binary-nya. 1 --> '00'

ascii = class_convert->get_buffer( ).

WRITE:/ ascii.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s