10-08-2008 10:44 AM
Hi,
All,
I am facing a problem with Transalte statement
'Translate string to code page '9902' in ecc6.0'. Translate is obsolote statement in ECC6.0 .
I tried with a class CL_ABAP_CONV_IN_CE with method CONVERT_STRUC mentioned in F1 help .
Please help regarding this issue.
10-08-2008 11:18 AM
What problem are you experiencing?
Example code from the documentation for class CL_ABAP_CONV_IN_CE is
DATA:
BEGIN OF struc,
text(5) TYPE c,
int TYPE i,
END OF struc.
DATA:
buffer TYPE xstring,
conv TYPE REF TO cl_abap_conv_in_ce,
view TYPE REF TO cl_abap_view_offlen.
conv = cl_abap_conv_in_ce=>create(
encoding = '0120'
endian = 'B' ).
view = cl_abap_view_offlen=>create_legacy_view( struc ).
buffer = 'C18283F1F250505000010002'.
conv->convert_struc(
EXPORTING input = buffer
view = view
IMPORTING data = struc ).
Regards,
Steve.
10-10-2008 4:46 AM
Hi,
Just see the below code . I am facing a problem with the statement transalete code page statement.
I used whatever you have given that code . I didn't understand that buffer concept.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(IN_STRING)
*" EXPORTING
*" REFERENCE(OUT_STRING)
*" EXCEPTIONS
*" ERROR
*"----
*DATA: str type ZCHAR60. "D49K900158 (IBM INIDA)
DATA: str type ZCHAR60.
str = in_string.
translate str to upper case.
translate str to code page '9902'. "D49K900158 (IBM INIDA)
out_string = str.
ENDFUNCTION.