‎2007 May 18 3:32 PM
Hi Experts,
My ALV flow is like,
1- first time, ALV displaying, fine!
2- If presS F3 or BACK
3- Selection screen comes, fine
4- If user changes the data and enters new input data, and press push button
5- ALV displays second time, But,
The first ALV data is not getting refresh i.e. second time, old data + new data is displaying!
So, How to over come it?
thanq.
‎2007 May 18 6:15 PM
Hi,
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
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,
Bhaskar
‎2007 May 18 3:35 PM
‎2007 May 18 3:36 PM
Hi,
I guess you are not clearing internal table of the ALV. While leaving the program clear the itab. Your problem will get solved.
with regards,
Vamsi
‎2007 May 18 3:36 PM
Hi,
You need to change the data in the internal table to reflect new changes when the user push button (i.e. refresh).
Regards,
Ferry Lianto
‎2007 May 18 3:59 PM
THANQ.
yes, am doing,
1-refreshing bfore displaying alv
2- again put the statement for refresh itab, after
I_OUTTABB = MY_ITAB
refresh my_itab
still, its not refreshing?
any clue?
thanq.
‎2007 May 18 3:40 PM
HI Sridhar,
r u changing data in ITAB when u press push button?
case sy-ucomm.
when 'BUTN'.
select ............. where ur condition that reflects push button changes.
endcase.
can u paste the code so we better help u ..
Regards
SAB
‎2007 May 18 4:32 PM
THANQ.
yes, am doing refreshing the itab, 2 times i.e.
1-refreshing itab, just bfore displaying alv
2- again put the statement for refresh itab in REUSE_ALV_GRID_DISPLAY, after
Tbales
IT_OUTTABB = MY_ITAB
REFRESH MY_ITAB.
still, its not refreshing?
any clue?
thanq.
‎2007 May 18 4:44 PM
It is not refresh ITAB problem...
r u passing data from any other ITAB to MY_ITAB?
check in debug in all the itabs after pressing push button ..how the data is enetering in MY_ITAB.
if possible paste the code .....
Regards
SAB
‎2007 May 18 4:37 PM
Hi,
Did you set 'X' to selfield-refresh?
RS_SELFIELD-REFRESH = 'X'. "Structure SLIS_SELFIELD
Regards,
Ferry Lianto
‎2007 May 18 4:53 PM
hi,
i did not see any structure & field in the code as u mentioned, i.e.
i did not see the following in my code,
RS_SELFIELD-REFRESH = 'X'. "Structure SLIS_SELFIELD
so, what to do now? i mean, shuld i define structure , if so, pls. let me know the syntax.
thanq.
‎2007 May 18 5:15 PM
Write the logic :
CASE R_UCOMM.
when 'Refresh'.
submit ur report again,i mean call the ur perofm routines code after start-of-selection
endcase.
‎2007 May 18 6:15 PM
Hi,
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
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,
Bhaskar
‎2007 May 20 2:59 AM
Hi,
Pls. clarify,
1- where I hv to code the following syntax, I mean, either before REUSE_ALV_GRID_DISPAY or after it?
call method grid (name of grid )->refresh_table_display
2- <STRUCT OF TYPE LVC_S_STBL> With What I hv to replace in place of STRUCT, I mean, Which structure?
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
thanq.
Message was edited by:
Sridhar
‎2007 May 20 3:11 AM
When you Function module - REUSE_ALV_GRID_DISPAY
Then do not use
Below Structure:
call method grid (name of grid )->refresh_table_display
2- <STRUCT OF TYPE LVC_S_STBL> With What I hv to replace in place of STRUCT, I mean, Which structure?
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
<b>Process :</b>
Data Declaration :
DATA : g_user_command type slis_formname value 'USER_COMMAND'.
after completion of ur reuse_ALV_GRID_DISPLAY
need to write form routine ,this is dynamic subroutine.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
CASE R_UCOMM.
WHEN 'REFRESH'.
ENDCASE.
ENDFORM.
Reward Points if it is helpful
Thanks
Seshu