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

problems with ALV refreshing

Former Member
0 Likes
928

I have a button to refresh an ALV. The first time it does it but the nexts doesn't. I want the ALV to have the last modifications of table pa0000 (HR) when I refresh it instead of having the modifications made before, in the last loop. It seems that takes no updated data of pa0000 when I call it, so I don't know how to change it because I am doing a refresh table and clear table to have new data to print. Perhaps it is something referred to commit but I have tried it and does not work neither.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
904

Hi Maria,

i think the parameters on which you fill your itab

are lost??.

I do it on this way:

fill itab.

make ALV-DISPLAY.

when Button refresh then clear, refresh itab and fill it

new with all parameters like first output.

Can you check (debugg) if some parameters are lost?

Regards, Dieter

8 REPLIES 8
Read only

Former Member
0 Likes
904

Hi maria,

1. In the callback FORM routine,

we have to give

selfield-REFRESH = 'X'.

regards,

amit m.

Read only

Former Member
0 Likes
905

Hi Maria,

i think the parameters on which you fill your itab

are lost??.

I do it on this way:

fill itab.

make ALV-DISPLAY.

when Button refresh then clear, refresh itab and fill it

new with all parameters like first output.

Can you check (debugg) if some parameters are lost?

Regards, Dieter

Read only

0 Likes
904

Hi Dieter. That's not the problem because I am filling the table with data each time I refresh. The problem is that I have an internal table with diferent data from the one I have in pa0000 table. The internal table should be the same as pa0000 when I read it but it is not and the first time I refresh it works and then doesn´

Read only

0 Likes
904

Hi Maria,

can you show a code-extract where are you doing this?

regards, Dieter

Read only

0 Likes
904

When I fill the table once again when I push refresh I am doing something like this.

clear t_0000.

refresh t_0000.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

PERNR = pernr -> I am receiving the pernr in the function

INFTY = '0000'

TABLES

INFTY_TAB = t_0000. -> In this table when I refresh I don´t obtain the data in pa0000 for this pernr. Just other data from the last loop executed for the same pernr so that's the problem but I don't know why.

FORM user_command USING u_ucomm TYPE syucomm

us_selfield TYPE slis_selfield.

WHEN 'REFRESH'.

us_selfield-refresh = 'X'.

perform function. -> to obtain new data

perform listado_alv.

ENDFORM.

Read only

0 Likes
904

Hi Maria,

you use

WHEN 'REFRESH'.

us_selfield-refresh = 'X'.

perform function. -> to obtain new data

<b>perform listado_alv.</b>

ENDFORM.

i think the line perform listado_alv must must not need

(if its the REUSE_ALV...).

Comment the line and try it again.

Regards, Dieter

Read only

0 Likes
904

Hi Maria,

i have taken a look to the FM.

i think you should try it with

the PARAMETER: BYPASS_BUFFER = 'X'

then its shur that you get the data from the DB.

Regrads, Dieter

Read only

0 Likes
904

Thank you very much Dieter.

That was my problem. It is solved.