04-20-2007 9:22 AM
Hi,
Is it possible to declare an internal table in a Interface class?
Thanks.
Morten
04-20-2007 9:26 AM
An Interface doesn't have attributes.
And the methids it has are un implemented. Then where can you declare the Internal table?
04-20-2007 9:25 AM
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
04-20-2007 10:20 AM
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
04-20-2007 9:26 AM
An Interface doesn't have attributes.
And the methids it has are un implemented. Then where can you declare the Internal table?
04-20-2007 10:41 AM
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
04-20-2007 11:16 AM