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

correction in code

Former Member
0 Likes
535

i have old syntax in my program like 'TRANSLATE header-id FROM CODE PAGE file_tab-codepage'.

i am replacing the above syntax with the follwing code and can u correct me if i am wrong

data:

buffer1 type xstring,

conv type ref to cl_abap_conv_in_ce,

int type i.

conv = cl_abap_conv_in_ce=>create(

encoding = 'file_tab-codepage'

endian = 'L' ).

buffer1 = '41424320'.

conv->convert(

exporting input = buffer1

importing data = header-id ).

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
502

encoding = 'file_tab-codepage' "--single quotes not required here

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
503

encoding = 'file_tab-codepage' "--single quotes not required here

Read only

0 Likes
502

thank you very much mr.keshav you are helping me a lot .

actually i am new to this upgrading and iam the only developer in the team i need support from you very much

I will be posting questions regularly i hope u r the one with good knowledge.

thank you once again see u next thread.

Read only

0 Likes
502

i am upgrading a old report i got a unicode error

actually the report has the followig structure

tables: arc_buffer.

DATA: BEGIN OF class_package OCCURS 0.

INCLUDE STRUCTURE arch_packa.

DATA: END OF class_package.

now the report has following syntax

APPEND arc_buffer-segment TO class_package.

when i try to execute it it gives error that

'a line of class_package and arc_buffer-segment are not mutually convertible in a unicode program.'

can any one help me to resolve this.