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: Need help with error messages

Former Member
0 Likes
1,669

Hi,

I am getting the following error message several time on different internal table declarations:

"Tables with headers are no longer supported in the OO context."

This is the data declaration that it refers to:

I_ZDAILY_MVMT TYPE TABLE OF ZDAILY_MVMT WITH HEADER LINE.

Also, I am getting the following:

You cannot use the "RANGES" statement within classes. Instead, use the "DATA"

statement with the type "TYPE/LIKE RANGE OF" . . . . . . . . .

This is for the following data declaration:

RANGES: I_WERKS FOR EBAN-WERKS, "PLANT RANGE

I_VTWEG FOR I_TVTW-VTWEG,

I_VTWEG2 FOR I_TVTW-VTWEG,

I_VKORG FOR I_TVKO-VKORG,

I_AUART FOR I_TVAK-AUART.

What do I change and then how do i populate them?

Thanks,

John

Message was edited by:

John Damion

5 REPLIES 5
Read only

Former Member
0 Likes
1,020

Hi JOhn,

The error message means what it says.

You cannot have internal tables with headers in OO Context.

You have to declare an explicit hedaer line for the itabs.

like this..

data: I_ZDAILY_MVMT TYPE TABLE OF ZDAILY_MVMT,

WA_ZDAILY_MVMT TYPE ZDAILY_MVMT.

Read only

amit_khare
Active Contributor
0 Likes
1,020

We dont use tables with header lines any more.

Declare a work area and use it transfer the data.

e.g.

types: types_ZDAILY_MVMT TYPE standard table of TABLE OF ZDAILY_MVMT.

data: I_ZDAILY_MVMT TYPE type_ZDAILY_MVMT,

wa_zdaily type zdaily_mvmt.

Now use this work area to move data into the table.

Regards,

Amit

Reward all helpful replies.

Read only

0 Likes
1,020

How do incorporate a work into say a select or a loop?

Read only

0 Likes
1,019

It will work as normal internal table only since it has header line.

regards,

  • Dj

reward for all useful answers.

Read only

0 Likes
1,019

So i just have to change the data declaration and thats all?