on 06-27-2008 5:38 AM
How to replace the following code during unicode conversion
-
select * into datatab-data from catsdb
where pernr IN select_pernr.
datatab-pernr = datatab-data+3(8).
datatab-tabname = 'CATSDB'.
datatab-dtype = 'C'.
-
where CATSDB is transparent table with 108 fields.
and datatab is a structure of type ZHCLONE_DATATAB which has 4 fields PERNR,DTYPE,TABNAME,DATA.
data is a charater field of length 4999.
Error:CATSDB and DATATAB-DATA are not mutually convertable in unicode conversion.
please provide me the solution as soon as possible.
it will be really helpfull for me.
Thanks and Regards,
Santosh Kumar Barik
Hi,
The Data in the table CATSDB cannot be copied directly into the field datatab-data if the catsdb contains any non-character type fields.
1>First take a work area
wa_catsdb like line of catsdb
2>Select the data from catstab into the the workarea
select * into wa_catstab from catsdb
where pernr IN select_pernr.
3>Now transform the workarea into the datatab-data variable
If the catstab contains complete character fields we can use direct move statement,else we need to use following method
class cl_abap_char_utilities definition load.
CALL METHOD cl_abap_container_utilities=>read_container_c
EXPORTING
im_container = wa_catstab
IMPORTING
ex_value = datatab-data
EXCEPTIONS
illegal_parameter_type = 1
OTHERS = 2.
I trust it will be helpful..
U can reward if u find helpful
Edited by: kumarsap on Jun 27, 2008 9:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it still not been answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.