Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Oops ALV screen refresh issue when using SAPGUI_SET_FUNCTIONCODE

Hi All,

I am facing issue while I am trying to refresh ALV data 2nd time (update with new data), when using FM - SAPGUI_SET_FUNCTIONCODE.

If I comment this FM, then refresh works ok.

My scenario is as per below, no POV event used.


  1. Above part of screen has some display only fields, suppose ITEM1.
  2. Below part has Oops ALV grid (using cl_gui_alv_grid) with an editable checkbox, like available inventory for this ITEM1.
  3. User selects check-box one by one in this ALV and without any further action from user, there should be a popup to tell that ITEM1 is fulfilled (suppose after 3 records selected). To do this popup,  I am calling FM - SAPGUI_SET_FUNCTIONCODE in event handling of alv.
  4. Once control reach PAI via this FM, some calculations are done in PAI and popup shown if required.
  5. When user gets popup that ITEM1 is done, they will press a pushbutton 'NEXT' which will show ITEM2 in top screen part and corresponding ITEM2 inventory records should be shown in ALV area now so that user can select again.

Point 5 is not working, no matter what I do, even on ITEM2 system is still showing ALV records of ITEM1 only.

I am using refresh_table_display and internal table is populated correctly with ITEM2 data, but still ITEM1 data is shown. If I comment FM - SAPGUI_SET_FUNCTIONCODE, then everything is working well.

I also tried to replace with CL_GUI_CFW=>SET_NEW_OK_CODE, but same refresh problem occurs.

Please help, let me know if more details are required.

Former Member
Not what you were looking for? View more on this topic or Ask a question