‎2007 Aug 28 2:25 AM
Friends :
ALV refresh screen is not happening.
I have 2 alv screens . from l one screen I post 2 materials , I get 2 errors on 2nd screen in terms of log.when I go back & post single material this time, I still get the 2 materials on the log screen, actually the internal table contains only one material when 2nd time the alv list is called.
It means that it is not removing from control.
Any idea how can we eliminate the error.
Regards
Prashant
‎2007 Aug 28 4:46 AM
If you are using ALV class object try calling this method
CALL METHOD obj_ALV_grid->refresh_table_display
where obj_ALV_grid is an instance of class cl_gui_alv_grid.
Hope this helps.
Raj
‎2007 Aug 28 3:54 AM
‎2007 Aug 28 4:46 AM
If you are using ALV class object try calling this method
CALL METHOD obj_ALV_grid->refresh_table_display
where obj_ALV_grid is an instance of class cl_gui_alv_grid.
Hope this helps.
Raj
‎2007 Aug 28 4:55 AM
Hi,
If you are using REUSE
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = pt_grpfcat[]
it_excluding = p_grpexcltab2[]
is_layout = pt_grplayout2
i_callback_program = sy-repid
i_callback_html_top_of_page = p_header
i_callback_pf_status_set = v_status_set1
i_callback_user_command = f_user_command1
i_screen_start_column = 25
i_screen_start_line = 5
i_screen_end_column = 80
i_screen_end_line = 20
it_events = i_events[]
tables
t_outtab = i_grpoutput.
else.
message i367(yscc) with v_plgrp..
endif.
endform. " F_f4_help_fieldname
*
*&---------------------------------------------------------------------*
* Form f_user_command1 *
*&---------------------------------------------------------------------*
* This form will handle the user command from fm REUSE *
*----------------------------------------------------------------------*
form f_user_command1 using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
data p_ref1 type ref to cl_gui_alv_grid.
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = p_ref1.
call method p_ref1->check_changed_data.
case p_ucomm.
when 'BACK'.
leave to screen 0.
endcase.
rs_selfield-refresh = c_x. " Grid refresh
endform. " F_user_command1
a®
‎2007 Aug 28 4:57 AM
If u r using Reuse FM's then in user_command form try this,
P_SELFLD-REFRESH = 'X'.
Reward if useful.
‎2007 Aug 28 5:10 PM
I am using Class method , the table refresh method is also not giving any help here.
‎2007 Aug 28 5:18 PM
Hi,
Use the following in your user command PAI as first statement , system automatically fills the changed entries into your output tab.
call method g_grid->check_changed_data
importing
e_valid = v_valid.
aRs
‎2007 Aug 28 5:40 PM
I want to refresh the control , but ALV refresh is not working,
I used different referenace object & different container also.
‎2007 Aug 28 5:57 PM
Hi,
After the method i mentioned in my previous thread. then call method Refresh_table_display in the PBO.
aRs
‎2007 Aug 28 10:42 PM
Thanks everybody.Finally it worked.
if gv_grid_data_log is initial.
CREATE OBJECT gv_grid_data_log
EXPORTING i_parent = gv_container_d0011.
PERFORM prepare_field_catalog :
USING 'ZRECID' 'Record ID'(s01) space 10 0,
USING 'MBLNR' 'Material Document'(s26) space 15 0,
USING 'TYPE' 'Message'(s27) space 4 0,
USING 'MESSAGE' 'Message Text'(s28) space 20 0.
CALL METHOD gv_grid_data_log->set_table_for_first_display
EXPORTING
is_layout = gs_layout
i_default = 'X'
CHANGING
it_outtab = gt_error_data[]
it_fieldcatalog = gt_fldcat[].
REFRESH : gt_error_data.
else.
call method gv_grid_data_log->refresh_table_display.
endif.
solution is You don't have to call the set_table_for_first_display again, on 2nd time
just call refresh_table_display. I put the If /else condition & it worked.
Thanks to everybody who spent some time for me.