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

Query to refresh the output data.

Former Member
0 Likes
1,517

Hi,

I have displayed an hierarchy list using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' FM. Now I am trying to refresh the output screen, I have tried the selfield-refresh = 'X' functionality but its is not working.

Have thought of other ways like getting the screen instance and then call the refresh method etc, but don't know if that's feasible.

Please suggest..

Thanks,

Ketan

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,337

Make sure that you are updating your internal tables used in the ALV and setting that REFRESH flag. I assume that you are doing the refresh flag within a FORM routine which is tied to the function call. Maybe you can post your code.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,337

Please find my piece code below..

**Function module to display the ALV output.

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

EXPORTING

i_callback_program = ws_repid

i_callback_user_command = 'F0009_USER_COMMAND'

i_callback_pf_status_set = 'f0008_set_pf_stat'

is_layout = wa_layo

it_fieldcat = i_fieldcat[]

is_variant = wa_vari

i_tabname_header = 'I_VTTK_1'

i_tabname_item = 'I_HEADER'

is_keyinfo = ws_keyinfo

TABLES

t_outtab_header = i_vttk_1

t_outtab_item = i_header

EXCEPTIONS

program_error = 1

OTHERS = 2.

FORM f0009_user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield. "#EC CALLED

    • to handle the user commands if different from standard ALV

CASE ucomm.

WHEN 'REFRESH'.

  • Here I am reselecting the data again to get the new changes done.

PERFORM f0002_get_selection_data.

  • Here the flag is getting set.

selfield-refresh = 'X'.

ENDCASE.

ENDFORM.

Read only

0 Likes
1,337

You code looks pretty good to me. Are you sure that FORM f0009_user_command is actually being fired? Put a breakpoint in it and execute, click your refresh button. Is it being fired?

Regards,

RIch Heilman

Read only

Former Member
0 Likes
1,337

Hi Rich,

Yes my subroutine is getting called, I have other functionality in the same FORM for say showing a information popup etc and all of them are getting triggered. Only this particular functionality is not working.

I am modifying couple of values using the standard transactions and want them to be displayed in the Header and the Item table.

But that's not happening and after refresh I am even find my items table data missing from the hierarchy display ( Though it is there in the internal table) .

Thanks,

Ketan

Read only

0 Likes
1,337

Hmm, that's interesting. You are going to want to debug that FORM which is getting your data again when called from the user command handling form. I'm sure it will reveal what is going wrong. Also, you mentioned that you are doing an update using a standard transaction, it could be a delay in the update if you are refreshing right away, and the update is not yet complete, could this be possible?

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,337

I will check further and get back if I find something.

Thanks,

Ketan