Application Development 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: 

Usage of Conversion Classes During Unicode Conversion

Former Member
0 Kudos

Hi,

I have code

"TRANSLATE BBKF-SGTXT FROM CODE PAGE '0100' TO '0120'" Now During Unicode i need to Use the Conversion classes

Can any one help to proceede further on this

Actually I am using CL_ABAP_CONV_OUT_CE and I am getting the Data in Binary Format But I want that to be in Character format can any one suggest me

Thanks & Regards,

Prasad

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Do you have an EBCDIC system with code page 0100? (check it using SNLS transaction)

In that case, CL_ABAP_CONV_OUT_CE is okay.

After having converted to code page 0120 (into xstring), here is how to cast xstring variable to character.


DATA x TYPE x LENGTH 800. " so that to compile, x length
                          " must be a multiple of 4 (don't ask why)
FIELD-SYMBOLS <c> TYPE c.
x = xstring. "make sure x is long enough
ASSIGN x TO <c> CASTING.

BBKF-SGTXT = <c>.

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos

Do you have an EBCDIC system with code page 0100? (check it using SNLS transaction)

In that case, CL_ABAP_CONV_OUT_CE is okay.

After having converted to code page 0120 (into xstring), here is how to cast xstring variable to character.


DATA x TYPE x LENGTH 800. " so that to compile, x length
                          " must be a multiple of 4 (don't ask why)
FIELD-SYMBOLS <c> TYPE c.
x = xstring. "make sure x is long enough
ASSIGN x TO <c> CASTING.

BBKF-SGTXT = <c>.