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

Syntax error in insert statment

Former Member
0 Likes
532

I need to insert values an Internal table into a ZTABLE.

<b>INSERT ZTABLE FROM TABLE FINAL.</b>

<i>Error message:</i>

<b>The work area "FINAL" is not long enough.</b>

I have declared the structure of the internal table FINAL same as the ZTABLE. Still I am getting the error message

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
500

I think in the ztable you have a field for mandt and that field you havent included in final internal table.

declare as follows:

data: begin of final occurs 0.

include structure zfinal.

data: end of final.

Regards,

Ravi

3 REPLIES 3
Read only

Former Member
0 Likes
501

I think in the ztable you have a field for mandt and that field you havent included in final internal table.

declare as follows:

data: begin of final occurs 0.

include structure zfinal.

data: end of final.

Regards,

Ravi

Read only

Former Member
0 Likes
500

Hi Viven,

Try this

DATA: lit_ztable TYPE TABLE OF ztable,

.

.

.

INSERT ztable FROM TABLE lit_ztable ACCEPTING DUPLICATE KEYS.

Rgds,

Prakash

<b>Rward useful answer</b>

Read only

Manohar2u
Active Contributor
0 Likes
500

This error is because FINAL is not defined as an internal table.

Declare it as

data : final like ztable occurs 0 with header line.

Regds

Manohar