Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV not getting refresh?

Former Member
0 Likes
2,875

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.

1 ACCEPTED SOLUTION
Read only

Former Member
1,925

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

13 REPLIES 13
Read only

Former Member
Read only

former_member219399
Active Participant
0 Likes
1,925

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

Read only

ferry_lianto
Active Contributor
0 Likes
1,925

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

Read only

0 Likes
1,925

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.

Read only

Former Member
0 Likes
1,925

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

Read only

0 Likes
1,925

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.

Read only

0 Likes
1,925

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

Read only

ferry_lianto
Active Contributor
0 Likes
1,925

Hi,

Did you set 'X' to selfield-refresh?


RS_SELFIELD-REFRESH = 'X'.     "Structure SLIS_SELFIELD

Regards,

Ferry Lianto

Read only

0 Likes
1,925

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.

Read only

0 Likes
1,925

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.

Read only

Former Member
1,926

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

Read only

0 Likes
1,925

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

Read only

0 Likes
1,925

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