2014 Aug 04 7:53 AM
Is there any way to refresh ALV grid after executing native SQL, like this:
exec sql.
update tbl1 set some_fld=<some value>
endexec.
<refresh ALV grid>.
ALV grid is showing table tbl1.
thanks in advance
Is there any way to refresh ALV grid after executing native SQL, like this:
exec sql.
update tbl1 set some_fld=<some value>
endexec.
<refresh ALV grid>.
ALV grid is showing table tbl1.
thanks in advance
2014 Aug 04 7:57 AM
Hi,
CALL METHOD gr_alvgrid->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
finished = 1
OTHERS = 2 .
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
Parameter Meaning
IS_STABLE
If the row or column field of this structure is set, the position of the scroll bar for the rows or columns remains stable.
I_SOFT_REFRESH
This parameter is used only in exceptional cases. If you set this parameter, any totals created, any sort order defined and any filters set for the data displayed remain unchanged when the grid control is refreshed. This makes sense, for example, if you have not modified the data of the data table and want to refresh the grid control only with regard to layout or field catalog changes.
Regards
Sreekanth
2014 Aug 04 8:18 AM
Thanks you for your answer.
But unfortunately this does not work in my case. I have a main program where the data loads in ALV gris in Screen 0100 (see main.txt). Then, in USER_COMMAND_0100 input on TEST button of screen 0100 i have:
module USER_COMMAND_0100 input.
case OK_CODE.
when 'TEST'.
exec sql.
update "/DURS/OOOP_PORO"
set FLD1=22.
endexec.
CALL METHOD GRID->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
finished = 1
OTHERS = 2 .
IF sy-subrc <> 0.
* --Exception handling
ENDIF.
when 'EXIT'.
leave program.
endcase.
endmodule.
I believe the problem is in native sql and SAP does not refresh data of table which is a part of data dictionary, but used in native sql. Is there any way to do it ?
regards
Miran
2014 Aug 04 8:21 AM
Aha, now I see - I must reload data to see the changes.
regards
Miran
2014 Aug 04 8:35 AM
Hi,
The same thing also true for open SQL .
There is no automatic binding between the SQL results and the presentation .
Welcome to wonderful world of ABAP......
Regards.
2014 Aug 04 8:37 AM
Thank you for your answer.
Database without query performing in 21. century, eh
2014 Aug 04 8:45 AM
2014 Aug 04 8:47 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |