Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal Table issue

Former Member
0 Likes
433

Hi gurus,

I am trying to insert data from one of my internal table to one of my custom or Z table and for this I have written the following code:

data: begin of it_temp_item occurs 0,

mode1(1),

progid(11),

prodid(20),

volum(10),

status(1),

end of it_temp_item.

it_temp_item-progid = '1000000'.

it_temp_item-mode1 = 'I'.

it_temp_item-PRODID = '1000035'.

it_temp_item-VOLUM = '500'.

it_temp_item-status = 'A'.

append it_temp_item.

clear it_temp_item.

it_temp_item-progid = '1000000'.

it_temp_item-mode1 = 'I'.

it_temp_item-PRODID = '1002556'.

it_temp_item-VOLUM = '750'.

it_temp_item-status = 'B'.

append it_temp_item.

clear it_temp_item.

it_temp_item-progid = '1000001'.

it_temp_item-mode1 = 'I'.

it_temp_item-PRODID = '000600006460064020'.

it_temp_item-VOLUM = '750'.

it_temp_item-status = 'B'.

append it_temp_item.

clear it_temp_item.

insert z_item from table it_temp_item.

if syst-subrc eq 0.

commit work and wait.

else.

rollback work.

now its showing me an error that :

The type of the database table and work area (or internal table)

" "IT_TEMP_ITEM" are not Unicode convertible.

Can you help me out how to resolve this problem.

Thanks

Rajeev Gupta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
412

Declare internal table it_temp_item like:

data it_temp_item type table of z_item with header line.

You will probably have to change your program to populate it correctly.

Rob

Message was edited by:

Rob Burbank

2 REPLIES 2
Read only

Former Member
0 Likes
412

hi,

is ur internal table is same structure of that Z-table?

thanks

Read only

Former Member
0 Likes
413

Declare internal table it_temp_item like:

data it_temp_item type table of z_item with header line.

You will probably have to change your program to populate it correctly.

Rob

Message was edited by:

Rob Burbank