‎2009 Jul 07 6:46 AM
Dear Experts
I m coding a ALV report using objects.
I hv collected all teh data into the internal table.
but when i write code as below it gives an error that statement is not accssible.
data: gr_table type ref to cl_salv_table.
call method cl_salv_table=>factory
IMPORTING
R_SALV_TABLE = gr_table
changing
t_table = i_faglflexa_open.
*... Display Table
gr_table->display( ).
Can any one help me in this issue.
Thanks in advance.
Regards
‎2009 Jul 07 6:56 AM
hi,
whenever you work with class try to create the objects as well calling the method inside the start of selection the class definition and implementation can come above it
try calling the method inside start of selection
hope this will surely help you!!!
Thanks & regards,
Punit Raval.
‎2009 Jul 07 6:56 AM
hi,
whenever you work with class try to create the objects as well calling the method inside the start of selection the class definition and implementation can come above it
try calling the method inside start of selection
hope this will surely help you!!!
Thanks & regards,
Punit Raval.
‎2009 Jul 07 10:56 AM
Dear Punit
Thanks for ur reply .
i think ur suggestion wil lwork.
See, I hv declared type and then created an internal table of this type.
data : i_faglflexa_open type table of faglflexa
initial size 0 with header line.
data: gr_table type ref to cl_salv_table.
error msg: - i_faglflexa_open is not type compatible with formal parameter with t_faglflexa
Can u suggest something.
Regards
‎2009 Jul 07 11:59 AM
hi,
there are 2 ways of creating internal table ..
one is an outdated method which sap doesnt recommend any more and the other that you are using.
you have written the correct syntax the only thing is that in this format you dont have to specify the initial size ....
the syntax is :
DATA <itab> TYPE <type>|LIKE <obj> [WITH HEADER LINE].
also the outdated approach in that will use something like:
data : begin of <ittab> occurs n
end of <ittab>
donot specify the inital size 0 ....
also i believe that faglflexa may be a structured. if you have used a table type then write simply
data : <itab> type <internal type>
hope this will surely help you!!!
Thanks & Regards,
Punit Raval.
‎2009 Jul 07 1:34 PM
Get rid of the header line, or pass i_faglflexa_open[] as parameter.
You're sending your header line where the method requires a table.