‎2021 Jan 14 11:48 AM
Dear All,
I created a table using cf gui alv grid. I display database records in it. Is is placed in a subscreen, and in PBO module I call my function module display and I do following in it
CREATE OBJECT lo_event_handler."I create object for handling when user clicks on add button
CALL METHOD lo_event_handler->set_objecttype EXPORTING i_objecttype = iv_objecttype.
CALL METHOD lo_event_handler->set_objectkey EXPORTING i_objectkey = iv_objectkey.
CALL METHOD lo_event_handler->set_alvgrid EXPORTING i_alvgrid = io_alv_grid.
SET HANDLER : lo_event_handler->toolbar FOR io_alv_grid.
SET HANDLER : lo_event_handler->user_command FOR io_alv_grid.
PERFORM build_field_catalog CHANGING lt_fieldcat
PERFORM build_layout CHANGING ls_layout.
PERFORM populate_data USING iv_objecttype iv_objectkey CHANGING lt_chat_history et_return .
* in this I call o_alv_grid->set_table_for_first_display
PERFORM display_chat USING ls_layout io_alv_grid iv_syrepid CHANGING lt_chat_history lt_fieldcat
The problem I dont know how to solve is after the user clicks on the add button, he types text in the dialog windown, I add text to the database in a user_command method of event handler and I call a form - refresh table. In this form it firstly goes to method GET_LINK and it terminates with "1 = es ist kein Service-Request registriert" and a window with Program errors open, with no further detail.
FORM refresh table.
IF NOT o_alv_grid IS INITIAL.
CALL METHOD o_alv_grid->refresh_table_display
EXPORTING
is_stable = lwa_ref
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc = 0 .
"do nothing
ENDIF.
ENDIF.
ENFORM.
I have found this https://answers.sap.com/questions/4119688/to-refresh-the-alv-grid-display.html but I dont know what I am doing wrong.
I appreciate your help a lot. I can provide further details
‎2021 Jan 14 1:28 PM
Don't type code manually to avoid typos: it's CL_GUI_ALV_GRID.
Please attach a screenshot of "window with Program errors open" because I don't understand what it is.
‎2021 Jan 14 2:55 PM
‎2021 Jan 14 3:13 PM
I doubt that it's a SAP message. I guess this message has been created by an ABAP developer at your company. Better attach the whole code (zip txt), otherwise it's impossible to understand.