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

Help me - Error ABAP

0 Likes
752

I'm expanding the staff 2lis_11_vaitm extractor.

But I'm with error which indicates that the internal table can not be converted to unicode.

code below:

data:begin of it_lips occurs 0,

vbeln type lips-vgbel,

posnr type lips-posnr,

lfimg type lips-lfimg,

end of it_lips.

data:begin of it_lips_tot occurs 0,

vbeln type lips-vgbel,

posnr type lips-posnr,

lfimg type lips-lfimg,

end of it_lips_tot.

LOOP AT c_t_data INTO r_mc11va0itm.

v_tabix = sy-tabix.

clear : it_lips, it_lips_tot.

select *

from lips

into table it_lips (here is where the error indicates)

where vgbel = R_MC11VA0ITM-vbeln and

posnr = R_MC11VA0ITM-posnr.

sort it_lips.

loop at it_lips.

move-corresponding it_lips to it_lips_tot.

collect it_lips_tot

R_MC11VA0ITM-ZZLFIMG = it_lips_tot-lfmig.

MODIFY c_t_data FROM r_mc11va0itm INDEX v_tabix.

Message error :

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

"IT_LIPS" are not Unicode convertible. .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
714

u can use INTO CORRESPONDING FIELDS OF TABLE IT_LIPS insted of into table it_lips

5 REPLIES 5
Read only

Former Member
0 Likes
714

Hi ,

taht is bcoz in the internal table it_lips ur having only 3 fileds...

vbeln type lips-vgbel,

posnr type lips-posnr,

lfimg type lips-lfimg,

but in the select querry ur tryying to get all fields...(*)

so try this

select *

from lips

into corresponding fields of table it_lips

where vgbel = R_MC11VA0ITM-vbeln and

posnr = R_MC11VA0ITM-posnr.

or

select vbeln

posnr

lfimg

from lips

into table it_lips

where vgbel = R_MC11VA0ITM-vbeln and

posnr = R_MC11VA0ITM-posnr.

Read only

0 Likes
714

In Mr. A's post, the second option is the better one performance wise

Read only

venkat_o
Active Contributor
0 Likes
714

Hello Thiago Mösken, Try to change your code from


into table it_lips
to

into corresponding fields of table it_lips
I believe that it works. Thanks Venkat.O

Read only

former_member229729
Active Participant
0 Likes
714

Hi,

The Internal table you created is:

data:begin of it_lips occurs 0,

vbeln type lips-vgbel,

posnr type lips-posnr,

lfimg type lips-lfimg,

end of it_lips.

(1) While selecting the rows from the standard table, the syntax should be:

into corresponding fields of table it_lips

(2) Otherwise, the Internal table table declaration should be:

data: it_lips like lips occurs 0 with header line.

For your case, we have to adopt the step (1) given above.

Regards,

RamaniN

Read only

Former Member
0 Likes
715

u can use INTO CORRESPONDING FIELDS OF TABLE IT_LIPS insted of into table it_lips