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

refresh alv

Former Member
0 Likes
852

hi all,

i have a problem with alv list.

i have to display two lists in first screen and other two lists in second screen based on first list.

everythin is going fine but when i press 'back' code frok second list i am not able to see the first list.

the second list is not getting refreshed to first list.

function code is working fine.

can any one solve my problem to refresh the alv.

i used REUSE_ALV_BLOCK_LIST_APPEND in both lists.

6 REPLIES 6
Read only

Former Member
0 Likes
827

Hi,

can you paste your code...

santhosh

Read only

Former Member
0 Likes
827

hi,

CALL METHOD gr_alvgrid->refresh_table_display.

code : how to use refresh

IF gr_alvgrid IS INITIAL.

  • creating the Custom Container instance

CREATE OBJECT gr_ccontainer

EXPORTING

container_name = gc_custom_control_name

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6 .

  • Creating ALV Grid instances

CREATE OBJECT gr_alvgrid

EXPORTING

i_parent = gr_ccontainer

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

OTHERS = 5.

  • Prepare Field Catalog

PERFORM field_catalog CHANGING gt_fieldcat.

  • Prepare layout Structure

PERFORM prepare_layout CHANGING gs_layout.

  • calling the ALV method

CALL METHOD gr_alvgrid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

CHANGING

it_outtab = i_final[]

it_fieldcatalog = gt_fieldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

ELSE.

  • Refresh the Table

CALL METHOD gr_alvgrid->refresh_table_display.

Read only

0 Likes
827

HI, thanks for your reply. can you tell me without using oops how can i solve this problem?

Read only

Former Member
0 Likes
827

Hi,

In your form of user_command, you have to set RS_SELFIELD-REFRESH = 'X':

FORM user_command USING pv_ucomm LIKE sy-ucomm

ps_selfield TYPE slis_selfield.

move 'X' to ps_selfield-REFRESH.

ENDFORM.

Hope it helps,

Chang

Read only

0 Likes
827

Hi, i did that too but no use. it is still in problem

Read only

0 Likes
827

Hi all,

sorry for the late reply. i solved this issue by myself.

SET USER-COMMAND 'BACK'.

write this statement after performing the alv second time.

If any other suggetions would be appretiated.

Thanks,

Prakash .S