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

Refreshing ALV Tree on Input

Former Member
0 Likes
1,735

Save Environment. Save Yourself.

Hi Experts!!

I have 2 screens in an application - left being ALV tree (in which user id is an item under a node) and at right I have an input field. Initially, item was showing X and even the input field. Once I changed input field to Y and saved, the value is being updated there but the item under ALV tree is still showing X.

I searched for this issue in SCN and found a lot. But none of the methods solved my problem. Can anybody please help?

I have tried with SET_SCREEN_UPDATE, FRONTEND_UPDATE, FREE etc.

Thanks in advance!!

Ok try like this,

When u change the value in ur input field and press save, do all the actions that has to be did at the table level.

Now, Free your ALV Tree object...

say, CALL METHOD C_ALVGD->FREE.

CLEAR C_ALVGD.

try performing CALL SCREEN 9000 -


> Your Display screen. (call the same screen once again,

immediately after freeing the object).

This may help you....

15 REPLIES 15
Read only

Former Member
0 Likes
1,664

Hi

Use

CALL METHOD g_alv_tree->frontend_update.

CALL METHOD cl_gui_cfw=>flush

EXCEPTIONS

cntl_system_error = 1

cntl_error = 2.

declare g_alv_tree refering to cl_gui_alv_tree.

Regards,

Raghu.

Read only

0 Likes
1,664

Thanks for the reply. I have already tried it. It's not working.

Read only

Former Member
0 Likes
1,664

Hi

Did you written in PBO of the screen.

Regards,

Raghu.

Read only

0 Likes
1,664

Yes...

Read only

0 Likes
1,664

Hi,

try using...

In PAI,

Where G_GRID- (Object for CL_GUI_ALV_TREE)

CALL METHOD G_GRID->FREE.

CLEAR G_GRID.

In PBO,

Again recreate the object .

Hope this helps.

Read only

0 Likes
1,664

When I tried this, entire ALV tree disappeared.

Read only

0 Likes
1,664

Have u recreated the object and displayed the ALV Tree in PBO?

Read only

0 Likes
1,664

Yes..

Read only

0 Likes
1,664

Ok try like this,

When u change the value in ur input field and press save, do all the actions that has to be did at the table level.

Now, Free your ALV Tree object...

say, CALL METHOD C_ALVGD->FREE.

CLEAR C_ALVGD.

try performing CALL SCREEN 9000 -


> Your Display screen. (call the same screen once again,

immediately after freeing the object).

This may help you....

Read only

0 Likes
1,664

Thanks for the reply. But still the problem persists... When I am FREEing the tree, the tree is disappearing. When I am going for some other options (like frontend_update etc.), it's not updating at all.

Read only

0 Likes
1,664

Have you tried calling the same screen, after freeing the objects....

Read only

0 Likes
1,664

Yes, still the tree disappearing

Read only

0 Likes
1,664

Is the Object freeing writtern:

User_command -> Under Case ...Endcase -> When 'SAVE' -> after doing all the data processing - > free object -> Call Screen (Your display screen number)....

Read only

0 Likes
1,664

Yes, this is what I have exactly done.

Read only

0 Likes
1,664

I can see CHANGEITEM in the class, but when being used, it's giving error. Can somebody tell me why so? How can I access it. It's under public section only. Please help me out.