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

Internal tables in Interfaces

Former Member
0 Likes
1,104

Hi,

Is it possible to declare an internal table in a Interface class?

Thanks.

Morten

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,048

An Interface doesn't have attributes.

And the methids it has are un implemented. Then where can you declare the Internal table?

Hi,

Is it possible to declare an internal table in a Interface class?

Thanks.

Morten

5 REPLIES 5
Read only

Former Member
0 Likes
1,048

Hi Morten,

It is possible to declare any thing in Interface class as an attribute. Interface class hold the method definition only not the implmentation.

So you can declare the internal table as attrubute in Interface class. But you can't declared it in the method because they don't have the implementation phase.

Warm Regards,

Vijay

Read only

0 Likes
1,048

Hi Vijay,

Thanks for your quick answer.

Yes I am aware that I can´t do any implementation in the Interface.

But generally you use the implemtation phase to declare your internal table like the example shown below:

types:

it_file_data_records TYPE STANDARD TABLE OF t_upload.

Then you use the type "it_file_data_records" as associated type when declaring your attribute. And that is not possible in Interfaces.

Morten

Read only

Former Member
0 Likes
1,049

An Interface doesn't have attributes.

And the methids it has are un implemented. Then where can you declare the Internal table?

Read only

0 Likes
1,048

Hello Morten

Of couse interfaces can have attributes (e.g. IF_RECA_MESSAGE_LIST). However, since all interface attributes are <b>public</b> you cannot use type definitions for defining a table type attribute. Thus, you have to use <b>table types defined in the DDIC</b> for your itab attributes.

Example: If your interface should have a BAPI message itab define the attribute (e.g. MT_RETURN) of TYPE bapirettab.

Regards

Uwe

Read only

0 Likes
1,048

Hello Uwe,

Thanks, just what I was looking fore.

Regards,

Morten