‎2010 Sep 07 9:35 AM
Need an SAP Expert -
If table gt_data contains more than 14 item, the Function Call SAPGUI_SET_FUNCTIONCODE does not work anymore.
Wenn gt_data mehr als 14 Positionen hat, funktioniert der SAPGUI_Set_Functioncode nicht mehr.
Aufruf im PBO / Call in PBO
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'LTAP'
is_variant = my_variant
i_save = 'X'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_field_cat
it_outtab = gt_data
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = 'REFRESH'
EXCEPTIONS
function_not_supported = 1
OTHERS = 2.
IF sy-subrc <> 0.
"Some error handling
ENDIF.
‎2010 Sep 07 10:35 AM
Instead of this function use
gr_alv->set_function_code( CHANGING c_ucomm = cl_gui_alv_grid=>MC_FC_REFRESH ).
Regards
Marcin
‎2010 Sep 07 12:06 PM
Hi Marcin,
thank you for the quick response.
With the method implementation the auto-refresh does not work at all. It does not refresh even if the table gt_data has less than 14 items.
For me it seems like it has something to do with the set_table_for_first_display. Im wondering why the call function does not trigger PAI if there are more than 14 items in the table for ALV.
Any ideas ?
‎2010 Sep 07 2:57 PM
Hi Alex,
what exactly to you want?
If you need to refresh the table display, use grid method REFRESH_TABLE_DISPLAY.
If you want a timer-controlled autorefresh, you may use CL_GUI_TIMER and CL_GUI_CFW=>SET_NEW_OK_CODE.
Regards,
Clemens