‎2008 Oct 27 9:34 AM
Hi Guys , Im showing some registers using classic alv , however some of the registers change theirs values during after push a button in the menu , how can i show the new values for my registers i mean refresh the ALV. thank you
‎2008 Oct 27 9:43 AM
If you are using OOPS ALV,
Call method
REFRESH_TABLE_DISPLAY
else if you are using CALL REUSE_ALV_GRID_DISPLAY
CALL REUSE_ALV_GRID_DISPLAY once again
‎2008 Oct 27 9:43 AM
If you are using OOPS ALV,
Call method
REFRESH_TABLE_DISPLAY
else if you are using CALL REUSE_ALV_GRID_DISPLAY
CALL REUSE_ALV_GRID_DISPLAY once again
‎2008 Oct 27 9:44 AM
if you are using the Grid function, in the user command you have to code like this..
form user_command using p_ucomm type sy-ucomm
p_selfld type slis_selfield.
data ref1 type ref to cl_gui_alv_grid.
"For capturing the selected data
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = ref1.
call method ref1->check_changed_data.
case p_ucomm.
when '&DATA_SAVE'. "based on your action
"Now you see/check here internal table will have changed
"values
p_selfld-refresh = 'X'.
endcase.
endform. "user_command
‎2008 Oct 27 9:48 AM
For resuse alv list display, dont call the function again. Instead do like this :
In the user command of the alv list, set the flag that would refresh the list after a user command is performed
*&---------------------------------------------------------------------*
*& Form USER_COMMAND *
*&---------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
" Check the user command etc...
" refresh the list when the user command to send the IDoc.
rs_selfield-refresh = 'X'.
For oosp use the method as mentioned above.
regards,
Advait.
‎2008 Oct 27 10:05 AM
Hi
when you use the oo ALV you must register foolwing events:
The ENTER: ( you must register it if you use the ITS .. )
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
ERROR = 1
others = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
also the change event if you use the edit function of the alv.. ( Don´t forget the IS_LAYOUT !! )
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
ERROR = 1
others = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.