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

XSTRING to STRING in 4.6c

former_member131774
Contributor
0 Likes
821

Hi,

I have searched but did not get any answer about below questions:

I use below code to do XSTRING to STRING conversion in 7.0

But when I downport these code to 4.6c version, cl_abap_conv_in_ce does

not exist, please suggest how to do the same?


DATA lr_convert_in  TYPE REF TO cl_abap_conv_in_ce.
lr_convert_in = cl_abap_conv_in_ce=>create( input = iv_xstring ).
lr_convert_in->read( IMPORTING data = rv_string ).

Edited by: Vincent Zhao on Nov 29, 2010 8:11 AM

Hi,

I have searched but did not get any answer about below questions:

I use below code to do XSTRING to STRING conversion in 7.0

But when I downport these code to 4.6c version, cl_abap_conv_in_ce does

not exist, please suggest how to do the same?


DATA lr_convert_in  TYPE REF TO cl_abap_conv_in_ce.
lr_convert_in = cl_abap_conv_in_ce=>create( input = iv_xstring ).
lr_convert_in->read( IMPORTING data = rv_string ).

Edited by: Vincent Zhao on Nov 29, 2010 8:11 AM

3 REPLIES 3
Read only

Former Member
0 Likes
717

This message was moderated.

Read only

0 Likes
717

In 4.6c version, cl_abap_conv_in_ce class does not exist...

Read only

0 Likes
717

In 4.6C we dont have any casting issues between x and c and for unicode compactibality SAP launched the class cl_abap_conv_in_ce in ECC, pelase refer the code snippet for both ECC and 4.6C,

ECC

DATA:         l_htab         TYPE x VALUE '09',
                    l_linefeed     TYPE x VALUE '0D'.

  DATA: l_htab_alias(1) TYPE c,
             l_linefeed_alias(1) TYPE c,
            conv TYPE REF TO cl_abap_conv_in_ce,
            len TYPE i.
 
  conv = cl_abap_conv_in_ce=>create( input = l_htab ).
  conv->read( IMPORTING data = l_htab_alias len = len ).

  conv = cl_abap_conv_in_ce=>create( input = l_linefeed ).
  conv->read( IMPORTING data = l_linefeed_alias len = len ).

* First Line in EXCEL - Heading
  CONCATENATE '123' 
                            'Sample'
              SEPARATED BY  l_htab_alias.

4.6C

DATA:         l_htab    TYPE x VALUE '09',
                    l_linefeed    TYPE x VALUE '0D'.

  CONCATENATE 'programmelemente'        
                           'bzeile' 'qualifikationen' INTO l_header
              SEPARATED BY  l_htab.

Regards,

Benu