‎2011 Jul 05 1:17 PM
Hello there,
I use an function module that provides me an internal table which has the reference type of the DDIC object zml_output. Furthermore I call this function module within a global class that should keep the result of the function module into the attribute lt_result, that is declared as private and typed with
lt_result TYPE zml_output.
Even the definition of that attribute causes the following error message:
"lt_result" is not an internal table.
I don't have any clue how to type lt_result differently. Actually I would need the following type of typing "TYPE TABLE OF" but that does not exist within the class builder.
Thanks for your help in advanced!
Robert
‎2011 Jul 05 3:25 PM
Hello ,
Maybe you could use a table type and not an internal table.
What is the code you would like to write in the global class?
Could you provide it to me ?
‎2011 Jul 05 2:08 PM
you can use the "local types" tab or "types" tab in se24 to declare your types.
Please note that if you declare your type in "local types " then that can be used as impor/export parameter of a private method only . To use the type for public method , define type in "types" tab ....
‎2011 Jul 05 2:34 PM
hey rajesh,
Thanks for your reply. I defined my type through the "Types" tab. Unfortunatelly I get now the error message that my type lt_result is unknown ("It was not defined neither in the mentioned table nor within a DATA command").
Do you have any further idea?
‎2011 Jul 05 3:25 PM
Hello ,
Maybe you could use a table type and not an internal table.
What is the code you would like to write in the global class?
Could you provide it to me ?
‎2011 Jul 05 3:38 PM
Hi Konstantinidis ...
Of course I can provide it to you. The code of my methode load_data reads as follows:
method LOAD_DATA.
CALL FUNCTION 'ZDATAGET'
EXPORTING
iv_dat = iv_dat
iv_time1 = iv_time1
iv_delta = iv_delta
TABLES
et_result = lt_result.
endmethod.
Especially the lt_result causes the mentioned error message
The compiler seems to expect something "TABLE" like for attribute lt_result. But whatever I tried it doesn't seem to work out.
Many thanks for help...
‎2011 Jul 05 4:30 PM
Hello,
I did a test with success.
I went to the attribute ( lt_result) and i pressed the arrow button after the "typing" column ( the column that you set the TYPE,LIKE,etc) . i wrote there a new variable of table type internal table ( for exampe tlt_result) and now i have defined a new variable which is an internal table.
An other solution is to change the lt_result in the function module and do it table type . then you need do nothing.
I hope i help you. if not let me know .
Antonis.
‎2011 Jul 05 4:44 PM
Thank your very much!
I didn't know that the green arrow can be used to declare instance attributes. Great thing!