cancel
Showing results for 
Search instead for 
Did you mean: 

ALV data refresh

Former Member
0 Kudos

Hi,

I have problem with ALV data refreshing in WD4A. Data is provided by external context mapping and data load is triggered by clicking on button on page.

If ALV is empty, first data is loaded OK, but if ALV contains some data, new data is not displayed. I have binded table UI element on same context node and here are data refreshed with no problem.

Thanks for any answer!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to use the invalidate method of if_wd_context_node before you back to previous view.

Where are you binding the table to node.

Regards,

Lekha.

Former Member
0 Kudos

Hi,

in my button method? Before binding new data?

Like this?

lo_nd_changed_ns = wd_context->get_child_node( name = wd_this->wdctx_dik ).

lo_nd_changed_ns = lo_nd_changed_ns->get_child_node( name = wd_this->wdctx_zmeny_ns_dik ).

lo_nd_changed_ns->Invalidate( ).

lo_nd_changed_ns->bind_table( new_items = changed_ns_table ).

Many thanks for answer!

Former Member
0 Kudos

Yes, check wether the node is initial or not.

where are you getting the table contents.

How many views are there.

Former Member
0 Kudos

Hi,

with previous code ALV shows no data....

Many thanksfor any answer!

Former Member
0 Kudos

Hi,

How many views are there.

If your ALV is in 2nd view, there is a previous step to get back to 1st view then write the invalidate code in this handler/button.

Where are you filling the table 'changed_ns_table.'

Edited by: Lekha on Sep 16, 2009 6:18 PM

Former Member
0 Kudos

Hi,

there is one "navigating" view and view with button and with alv inside. changed_ns_table is filled in the same button action.

Former Member
0 Kudos

Hi,

One thing you do.....I guess you are displaying data in 2nd view right.

There is a inbound plug handler for this view in the 1st view right. Write the INVALIDATE statement here.

Former Member
0 Kudos

Hi,

but the button and alv are in the same view and button triggers SHOW_DATA (ONACTIONSHOW_DATA method of view) action where context is filled. HANDLEIN event of this view is not triggered in this case, so calling Invalidate has no effect.

Many thanks for any answer

Former Member
0 Kudos

Hi,

I have the same case but my ALV is getting refreshed.

One thing you do, do not go for external map binding.Rather try use the set_data method of the ALV(IWCI_SALV_WD_TABLE)

Regards,

Lekha.

Former Member
0 Kudos

Hi,

I have looked at this metod before, but now I use it and it works!!!

Many thanks.

BTW, External context mapping have to be defined in this case too, otherwise I get runtime error:

Data no longer available when SALV_WD_TABLE GET_MODEL called (I think I have to call some method of alv elsewhere)

And why is external mapping for alv here? When it cause this problems?

Many thanks for your solution.

Former Member
0 Kudos

Hi,

I have an ALV and a input field in same view, but my data in ALV is getting refreshed.

I have used the External mapping itself. I havenot used any Invlaidate method also. It's woking fine.

Why donot try creating a fresh application and do it....It must work...

The error that no data longer available will raise ....when you donot have any data in node(bind_table) prior the model object getting created.

Regards,

Lekha.

Answers (0)