2008 May 09 10:06 PM
Hi ,
I am getting error UC_OBJECTS_NOT_CHARLIKE in Unicode program for statement
TRANSFER ls_text TO ls_file.
I checked the error and found ls_text has 4 fields with CURR17.
How to solve this Unicode issue with minimal code changes?
Thanks,
just declare it with enough lenght to put all the fields in the structure.
If the method doesn't work it should need:
class CL_ABAP_CONTAINER_UTILITIES definition load.
2008 May 09 10:11 PM
how are you filling ls_text?
I would suppose that's where the problem is and not in the transfer.
Also post how are you delcaring ls_text.
2008 May 09 10:28 PM
ls_text is declared as :
DATA: BEGIN OF ls_text OCCURS 0,
xblnr(16), .
belnr(10),
...........
.........
wrbtr LIKE /bic/azo_gl01c00-deb_cre_lc "Currency CURR17
END OF ls_text.
The way I am assigning the data is
ls_Text- xblnr = wa_text-xblnr.
ls_Text- wrbtr = /BIC/AZO_GL01C00- DEB_CRE_LC.
TRANSFER ls_text TO ls_file.
2008 May 09 10:32 PM
I tought ls_text was a string...
You need to pass and string to the file.
In unicode it should be done like this, and by the way you should avoid using the header line
ls_string(1000). "depends how big your structure is.
call method CL_ABAP_CONTAINER_UTILITIES =>FILL_CONTAINER_C
exporting IM_VALUE = ls_text
importing EX_CONTAINER = ls_String
exceptions ILLEGAL_PARAMETER_TYPE = 1
others = 2.
transfer ls_String to ls_file.
By the way, you need to loop trough the table to transfer each line to the file
2008 May 09 10:48 PM
ok, just want to clarify this code is in the subroutine which is called in the loop. so I am passing each record to below code.
Also ls_file is char60.....so shall I create ls_string as char60 and pass to the method CL_ABAP_CONTAINER_UTILITIES =>FILL_CONTAINER_C?
Any other code is required to call this method?
Thanks a lot in!
*******************************************************************
ls_text is declared as :
DATA: BEGIN OF ls_text OCCURS 0,
xblnr(16), .
belnr(10),
...........
.........
wrbtr LIKE /bic/azo_gl01c00-deb_cre_lc "Currency CURR17
END OF ls_text.
The way I am assigning the data is
ls_Text- xblnr = wa_text-xblnr.
ls_Text- wrbtr = /BIC/AZO_GL01C00- DEB_CRE_LC.
TRANSFER ls_text TO ls_file.
2008 May 09 10:52 PM
just declare it with enough lenght to put all the fields in the structure.
If the method doesn't work it should need:
class CL_ABAP_CONTAINER_UTILITIES definition load.
2008 May 09 10:58 PM
let me change the code to solve the issue. I get back soon.
Thank you so much!
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |