11-02-2014 5:36 PM
Dear Experts.
I have a use case, where I would like to make some columns appear/disappear on press of an enter. And I have programmed the enter event, using a method called 'handle_data_changed'.
But when is use the following to make the coloumns appear/disappear inside the handle_data_changed method, none of these below work at all.
CALL METHOD g_grid->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = gt_fcat.
CALL METHOD g_grid->get_frontend_layout
IMPORTING
es_layout = gs_layout.
Is the reason behind this a auto refresh of gt_outtab running after the method : handle_data_changed ?
What would the solution this use case ?
Regards,
Naresh
11-04-2014 5:06 PM
Hope you are calling the method for displaying the ALV after this code or refreshing the ALV display .
Can you put the code . That will help in analyzing the issue more closely .
Thanks
Manik
11-05-2014 5:02 AM
Hi,
As you know we cannot use REFRESH_TABLE_DISPLAY method inside event method for handle_data_changed. As the ALV standard say's the refresh is taken care automatically. This why I am not sure is really the refresh happens, also I tried using the refresh method I get a runtime warning message saying 'not to use'.
Regards,
Naresh
11-04-2014 5:15 PM
Hi Naresh,
Are you using refresh method call method g_grid->REFRESH_TABLE_DISPLAY.
If not using it in your development, please use it and see.
Regards,
Rafi
11-05-2014 5:01 AM
Hi,
As you know we cannot use REFRESH_TABLE_DISPLAY method inside event method for handle_data_changed. As the ALV standard say's the refresh is taken care automatically. This why I am not sure is really the refresh happens, also I tried using the refresh method I get a runtime warning message saying 'not to use'.
Regards,
Naresh
11-05-2014 7:24 AM
Hi Naresh,
Could you please try with the below to handle changed data from ALV to Internal table.
DATA: gv_ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = gv_ref1.
CALL METHOD gv_ref1->check_changed_data.
Regards,
Venubabu Divvi
11-06-2014 12:23 PM
Hi,
After the set_frontend_fieldcatalog call
call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Regards,
Ankur Parab