cancel
Showing results for 
Search instead for 
Did you mean: 

Why should i invalidate the output

Former Member
0 Kudos

Generally

We will map Model to Component/Custom Controller and then to View controlller after excuting the bapi

we normally invalidate the ouput

wdContext.nodeOutput_XYZ.invalidate();

why are we doing this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Murali,

Every time you execute you need to fetch new data and in order do that you have clean up the node with old values and fill in with new values. so this invaildate helps here. This is loosely I understand about the invalidate.

I hope it helps you.

Thanks

Srikant

Former Member
0 Kudos

Murali,

When the model object gets updated by executing the BAPI, the controller context needs to pick up the new data. By invalidating the node, it forces it to go pull in the new data the next time the node is accessed (will then also flow through to the view controller).

Cindy

Former Member
0 Kudos

Murali,

This way we are sending message to IWDNode to drop any existing elements and later use fresh copy form available source (either supply function, or supplying role info in case of RFC model node, or even from "no source" -- i.e. developer himself has to provide code for populating node).

This is necessary because in some cases <node_elements> => <model_objects_collection> link is one-way, so updates in later are not reflected automatically in former.

Note, that this is not always true. This is true for WS models, JavaBean models. But ESF (both ABAP & EJB) <model_objects_collection> are able to notify node about changes.

In RFC models every but one relation is able to do the same. And this is exactly the relation from "_Input" to "_Output" class. Hence we have to invalidate node for this case.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com