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 an alv_tree

Former Member
0 Likes
477

Hi experts,

How can refresh an alv_tree?

i modify a value in the table such as:


  DATA: yplm00_tree LIKE gt_output.

  call method g_alv_tree_1001_a->get_outtab_line
  exporting
    i_node_key    = p_node_key
  importing
    e_outtab_line = yplm00_tree.

  CASE yplm00_tree-tipol.
    WHEN 'PY'.
      UPDATE YPLM01 CLIENT SPECIFIED SET STATS = p_fcode
      WHERE PSPNR = yplm00_tree-pspnr
        AND mandt = sy-mandt.
    WHEN 'PR'.
    WHEN 'RV'.
    WHEN 'EN'.
    WHEN 'RS'.
  ENDCASE.

CALL METHOD g_alv_tree_1001_a->update_calculations.

CALL METHOD g_alv_tree_1001_a->frontend_update.

And after modified, i want refresh the alv_tree, i intent with


CALL METHOD g_alv_tree_1001_a->update_calculations.

CALL METHOD g_alv_tree_1001_a->frontend_update.

But don´t work... other ways?

Thanks in advance,

Regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
439

Hello,

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).

Neeraj

Hi experts,

How can refresh an alv_tree?

i modify a value in the table such as:


  DATA: yplm00_tree LIKE gt_output.

  call method g_alv_tree_1001_a->get_outtab_line
  exporting
    i_node_key    = p_node_key
  importing
    e_outtab_line = yplm00_tree.

  CASE yplm00_tree-tipol.
    WHEN 'PY'.
      UPDATE YPLM01 CLIENT SPECIFIED SET STATS = p_fcode
      WHERE PSPNR = yplm00_tree-pspnr
        AND mandt = sy-mandt.
    WHEN 'PR'.
    WHEN 'RV'.
    WHEN 'EN'.
    WHEN 'RS'.
  ENDCASE.

CALL METHOD g_alv_tree_1001_a->update_calculations.

CALL METHOD g_alv_tree_1001_a->frontend_update.

And after modified, i want refresh the alv_tree, i intent with


CALL METHOD g_alv_tree_1001_a->update_calculations.

CALL METHOD g_alv_tree_1001_a->frontend_update.

But don´t work... other ways?

Thanks in advance,

Regards,

2 REPLIES 2
Read only

Former Member
0 Likes
440

Hello,

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).

Neeraj

Read only

0 Likes
439

Hi, I´m using alv_tree...

When i try to call this method, appear an error... this method is private for the alv_tree.

Other way?

Thanks in advace,