‎2006 Jan 22 8:55 PM
**Using a unicode system ECC 5.0**
I'm getting this error with this function module "Error occurred during character conversion". I need to convert character string of length 255 to binary/raw with length also 255.
DATA: BEGIN OF itab OCCURS 0,
line(255).
DATA: END OF itab.
DATA: BEGIN OF xtab OCCURS 0.
INCLUDE STRUCTURE bapicontent255.
DATA: END OF xtab.
DATA: L_SIZE TYPE I.
CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
IMPORTING
OUTPUT_LENGTH = l_size
TABLES
text_tab = I_SOLI
binary_tab = DATA_BIN
EXCEPTIONS
FAILED = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Your help are highly appreciated. Thanks!
‎2006 Jan 22 9:23 PM
hi ,
I had executed the same code as urs with itab content as itab-line = DEVELOPER.
i got output in xtab-line as 444556454C4F5045520D0A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<b>code</b>
&----
*& Report YCHATEST *
*& *
&----
*& *
*& *
&----
REPORT YCHATEST .
DATA: BEGIN OF itab OCCURS 0,
line(255).
DATA: END OF itab.
DATA: BEGIN OF xtab OCCURS 0.
INCLUDE STRUCTURE bapicontent255.
DATA: END OF xtab.
DATA: L_SIZE TYPE I.
itab-line = 'DEVELOPER'.
append itab.
clear itab.
CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
IMPORTING
OUTPUT_LENGTH = l_size
TABLES
text_tab = Itab
binary_tab = xtab
EXCEPTIONS
FAILED = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at xtab.
write xtab-line.
endloop.
.
‎2006 Nov 03 5:29 PM
Hi,
Did you get solution to this problem.
I also have same problem, with SCMS_TEXT_TO_BINARY
When I pass internal table with huge data it give Error....
How did u solve problem with this excess data...
Regards
Vijay