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

Extended Program check getting this error

Former Member
0 Likes
844

LOOP AT LT_LINES.

CONCATENATE IT_FINAL-TEXT LT_LINES-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.

ENDLOOP.

APPEND W_FINAL TO IT_FINAL.

CLEAR W_FINAL.

*****************************************************************************

In extended program check iam getting the error as : At "LOOP AT itab" one of the additions "INTO", "ASSIGNING" or "TRANSPORTING NO

FIELDS" is required in the OO context . .can any one suggest me to avoid this error

Moderator message - Moved to the correct forum

Edited by: Rob Burbank on May 19, 2009 9:06 AM

7 REPLIES 7
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
809

Hi,

Create a work area for the intenral table LT_LINES and then use loop at LT_LINES into wa.

Read only

Former Member
0 Likes
809

HI,

You need to have the internal tables without header line. As in OO context table with header line is not supported. So it is shown as the error in Code Inspector.

To overcome this..

DATA WA_LINES LIKE LINE OF LT_LINES.

LOOP AT LT_LINES INTO WA_LINES.
CONCATENATE IT_FINAL-TEXT WA_LINES-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.
ENDLOOP.

APPEND W_FINAL TO IT_FINAL.
CLEAR W_FINAL

Read only

Former Member
0 Likes
809

Hi,

I think you have declared the internal table LT_LINES with header lines. Instead just declare it without using the statement with header lines. Create the work area for LT_LINES and use that instead to move the data to WA_FINAL.

types: begin of ty_lines,

........

end of ty_lines/

DATA: LT_lines type standard table of ty_lines,

wa_lines type ty_lines.

Loop at it_lines into wa_lines.

CONCATENATE WA_FINAL-TEXT wa_LINES-TDLINE INTO Wa_FINAL-TEXT SEPARATED BY SPACE

endloop.

Regards,

Nikhil

Read only

former_member242255
Active Contributor
0 Likes
809

create the work area like the following example

IT_FINAL TYPE STANDARD TABLE OF TY_FINAL and

WA_FINAL TYPE TY_FINAL.

for LT_LINES and write as

LOOP at LT_LINES into WA_LINES.

....

ENDLOOP.

Read only

Former Member
0 Likes
809

Hi,

    • Create a work area W_LINES for the internal table LT_LINES and access the contents of the internal table LT_LINES using the work area created.

    • Then you need to create a work area W_FINAL for IT_FINAL also because you cannot access the contents of the internal table IT_FINAL directly .

Loop at LT_LINES into W_LINES.

CONCATENATE W_FINAL-TEXT W_LINES-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.

ENDLOOP.

APPEND W_FINAL TO IT_FINAL.

CLEAR W_FINAL.

Note : If you are using INTO clause, then you need to create a workarea W_LTLINES or if you are using ASSIGNING clause you need to use a field symbol in the loop statement.

Regards,

Shyamala S

Read only

Former Member
0 Likes
809

Hi,

Since header line concept has become obsolete now a days using the concepts of header lines will give an EPC error. something like the one which you have got. this is one of the concept of header line.

So it is better to create a work area of the table which you have declared and then in loop at lt_lines use the addition into work_area, something similar to the code below.....

data : fs_work_area like line of lt_lines.
LOOP AT LT_LINES INTO fs_work_area.
CONCATENATE IT_FINAL-TEXT fs_work_area-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.
ENDLOOP.

in the code whereever you uare using lt_lines as a work area just change it with fs_work_area only for work area purpose....

Regards,

Siddarth

Read only

Former Member
0 Likes
809

This message was moderated.