2009 May 21 4:11 AM
Hello Experts,
I would like to ask how to refresh the data in the ALV grid display after the user has pressed on a button. I am using the Function Module REUSE_ALV_GRID_DISPLAY.
Thanks.
Hello Experts,
I would like to ask how to refresh the data in the ALV grid display after the user has pressed on a button. I am using the Function Module REUSE_ALV_GRID_DISPLAY.
Thanks.
2009 May 21 4:28 AM
try this one.
form user_command using ucomm type sy-ucomm
selfield type slis_selfield.
selfield-refresh = 'X'.
endform.
regards
Prabhu
2009 May 21 5:47 AM
Hi,
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Regards,
Bhanu
2009 May 21 6:04 AM
Hi,
At u'r output screen first create a button for refresh data.
when clicking the button.
write the below code under form user_command and endform.
CONSTANTS: l_c_repid TYPE sy-repid VALUE '/CCC/RDSDSLSR_GTS_RECON'.
DATA: l_i_seltab TYPE TABLE OF rsparams.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = l_c_repid
IMPORTING
SP =
TABLES
selection_table = l_i_seltab
EXCEPTIONS
not_found = 1
no_report = 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.
ELSE.
SUBMIT /ccc/rdsdslsr_gts_recon WITH SELECTION-TABLE l_i_seltab.
ENDIF.
ENDFORM.
Regards,
Naveen M.
2009 May 21 6:20 AM
Create a button in alv toolbar with some function code.
In the at-usercommand event ,
Check whether sy-ucomm = 'The function code for refresh button".
If yes , then set the value of field 'slis_selfield-refresh' to 'X'.
this will help to refresh the alv .
2009 May 21 6:22 AM
Dear,
To refresh the data in the ALV grid display after the user has pressed on a button you can use
this Function Module 'RS_REFRESH_FROM_SELECTOPTIONS'
Cheers
fareed
2019 Sep 04 3:22 PM
OUFFF OK!!!!, just to clarify what is the only good answer to the question:
The problem risen here is that following a user action, the context may have changed and you need to reflect that change in the ALV.
Simple example:
I had that vendor blocking program to do. I was displaying an alv of the selected vendors with one of the fields being the block status. Then at the push of a button, I was blocking the unblocked vendors one by one, modifying the blocking status field of the feeding internal table along the way.
If I had not done anything specifically to refresh the ALV, after button action was completed, the block fields on the screen would have not been updated accordingly.
So, as one guy said above, the trick is crazy simple:
selfield-refresh = 'X'!!!!
As you know, to respond to user action you have to pass a user command form to your ALV call. The structure of that form is mandatory and as below(you can change the namings as you like, as long as you have a ucomm field followed by a slis_selfield).
And bingo, if you change back the parameter selfield-refresh to 'X', it will trigger automatically a refresh from your modified internal table that feeds your ALV
form user_command using ucomm type sy-ucomm selfield type slis_selfield.
...
...
selfield-refresh = 'X'.
...
...
endform.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |