Application Development 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: 

ALV-TREE Problem

Former Member
0 Kudos

Hi,

I am displaying data in ALV Tree. In ALV tree, there is some line items for each of the node. When the user click on the line item and press the button which is on the application toolbar, some Ztable will be updated. Its working when i go back to the selection screen and execute again. But my requirement is, it has to reflected immidiately when the data is changed. Though i am displaying the updated data in the ALV tree, it has to reflected immediately when the user press the button which is there in the application tool bar. Please suggest me.

Regards,

Priyaranjan

1 ACCEPTED SOLUTION

mnicolai_77
Active Participant
0 Kudos

hi,

i think that you can solve this problem using this metods of the class alv_tree:

CALL METHOD alv_tree->change_item

EXPORTING

i_node_key = i_node_key " Node that i have to change

i_fieldname = 'KUNNR' " Field name

i_data = lv_kunnr " Value

i_u_data = 'X' " flag for changing value

EXCEPTIONS

node_not_found = 1

OTHERS = 2.

CALL METHOD alv_tree->frontend_update. " update the frontend

cl_gui_cfw=>flush( ).

bye

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try to use statement Commit work

Or else, call a functionmodule which sleeps for 1 or 2 sec.

At times, few database updations take some time..

ex: AB_SLEEP

Regards

Sailaja.

0 Kudos

Hi,

thanks for the response.The data is updated in ztable immidiately when i checked the button on the application toolbar. But i want the data to be updated in ALV tree when the user click on that button. Infact i am getting the updated the data if i go back and execute the report again. But i want immidiate reflection on the ALV tree when the user change the data.

Immediate answer will be appreciated. Is there anything to be done on the ALV tree?

Regards,

Priyaranjan

mnicolai_77
Active Participant
0 Kudos

hi,

i think that you can solve this problem using this metods of the class alv_tree:

CALL METHOD alv_tree->change_item

EXPORTING

i_node_key = i_node_key " Node that i have to change

i_fieldname = 'KUNNR' " Field name

i_data = lv_kunnr " Value

i_u_data = 'X' " flag for changing value

EXCEPTIONS

node_not_found = 1

OTHERS = 2.

CALL METHOD alv_tree->frontend_update. " update the frontend

cl_gui_cfw=>flush( ).

bye