‎2008 Mar 18 6:42 AM
hi mates,
im trying to insert a row in ztable using abap code. im gettin an error ' type of database table and work area(or internal table)
are not unicode convertible'. find my code below. and help me .
tables: z50911_chkemp.
parameters: empnum like z50911_chkemp-empno,
empnam like z50911_chkemp-name,
emploc like z50911_chkemp-location.
types: begin of z_chk,
empno type z50911_chkemp-empno,
name type z50911_chkemp-name,
loc type z50911_chkemp-location,
include type Z50911_STRUCT.
end of z_chk.
data: z_it type table of z_chk,
z_wa type z_chk.
start-of-selection.
z_wa-empno = empnum.
z_wa-name = empnam.
z_wa-loc = emploc.
append z_wa to z_it.
insert z50911_chkemp from table z_it.
*modify z50911_chkemp.
if sy-subrc = 0.
message e000(10) with 'record inserted successfully'.
endif.
regards
mano
‎2008 Mar 18 7:22 AM
Hi
the internal table declaration should be same as of Ztable it should have all the fields including MANDT also
cheeck the same and change accordingly
Regards
Shiva
‎2008 Mar 18 7:16 AM
Hello,
While inserting data/row into a table u need to make sure that the internal table used for inserting is having the same structure of the table to be inserted.I hope these 2 in ur code is having mismatch in the structure.
Check the same .
Neeraj
‎2008 Mar 18 7:20 AM
yeap i have checked that:
my z table structure has three fields and one mandt field.
my internal table has three fields same as z table.
regards
mano
‎2008 Mar 18 7:22 AM
Hi
the internal table declaration should be same as of Ztable it should have all the fields including MANDT also
cheeck the same and change accordingly
Regards
Shiva