2023 Sep 26 4:27 PM
with regards to oops, I have declared 3 methods inside class definition.
1. getdata
2. display
3. handle_hotspot_click
in get data method the code is as below.
You can see I have called display inside method getdata.
in the method display I have called screen 200. (to display alv grid).The pbo of the screen 200 is to display alv grid.
I have given types and data declaration is protected section of the class.
after the start of selection, I am calling method using object (instance method).
As all the methods are inside the same class, Ideally , I should not face any issue in accessing the data.
But it is showing the internal table as unknown.
can some one suggest me why it is throwing error as I am working in the same class methods ?
2023 Sep 26 5:55 PM
Hi Mohammad Pasha
Think about coding using the class: cl_salv_table=>factory(...)
Robert
2023 Sep 26 6:27 PM
Based on the code you have posted, nowhere you have defined LT_FINAL hence the error.
Maybe you are using Ctrl+F3 (activate current include) to activate your code instead of Ctrl+F7 (activate all includes).
2023 Sep 26 8:50 PM
DATA : user_cont TYPE REF TO cl_gui_custom_container,
user_grid TYPE REF TO cl_gui_alv_grid.
Data : gs_layout type LVC_S_LAYO.
data : LT_FCAT type LVC_T_FCAT,
LS_FCAT LIKE LINE OF LT_FCAT.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME title t1.
SELECT-OPTIONS : so_bname FOR lv_bname.Every thing was working fine as long as I kept the above types and data declarations outside the class.As I am using the oops abap, so I was planning to make the method public and its types and data declarations under protected section.
2023 Sep 27 6:35 AM
You have declare something in the protected section of a class and you expect to be access from a MODULE of a Dynpro ?
First of all, WHY did you try to declare this in the class and why in the protected section ?
Why do you put ":" after statement METHOD ?
Why do you use local class ?
Why do you use old method statement : CREATE OBJECT blabla. ==> blabla = new class( importing_param = 'toto' ).
So.
in a program, the data declared before the local class definition could be accessed by anybody.
The data declare in the public section of a local class, could be accessed by the program through an instance of a class.
The data declare in the protected section of a local class, could be accessed only by a LOCAL FRIEND of the local class (pretty sure you don't want that).
Fred