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

insert statement

Former Member
0 Likes
641

Hi

loop at it_tel into wa_tel.
insert into adr2 values wa_tel .
clear wa_tel.
 endloop.

for the above code i get the error as

"work area WA_TEL is not long enough. long enough"

Plz suggest what could have gone wrong.

if I use it_tel in the insert stmt.....even then i am getting same error as not long enough.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
611

hi in your code

wa_tel should be same type of adr2.

make it_tel and wa_tel of type adr2 and use corresponding fields in select query.

reward if useful.

4 REPLIES 4
Read only

Former Member
0 Likes
612

hi in your code

wa_tel should be same type of adr2.

make it_tel and wa_tel of type adr2 and use corresponding fields in select query.

reward if useful.

Read only

Former Member
0 Likes
611

First things first. Inserting records in to a standard SAP table can be dangerous.

The structure of the work area must be exactly the same as your table being updated.

Regards,

Ravi Kanth talagana

Read only

Former Member
0 Likes
611

Hi Alchemi,

According to your requirement check for any BAPIs or FMs which suits ur requirement

check the where-used-list of table ADR2 and checkout if any exists

Read only

Former Member
0 Likes
611

hi,

delcare your workarea as


data : wa_tel like it_tel. 

Regards,

Santosh