cancel
Showing results for 
Search instead for 
Did you mean: 

Question about Programming Notes for WD Abap / Context

Former Member
0 Kudos

http://help.sap.com/saphelp_nw04s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm

...

Since an instance of the follow-on view has not yet been created, you must now decide whether to configure a component controller context with an appropriate mapping, or whether to fetch and check the data in an auxiliary class first and only pass it to the context of the follow-on view after navigation is completed. An application developer would, of course, prefer to use the context mapping method; using an auxiliary class, however, improves performance significantly.

...

Hello all,

If a fetch the data with auxiliary class, in which method do i fill the context of view after view is shown? The context of controller is mapped to view. Must it be done in supply function? But supply function is only one and i want to use a single context node for different views.

Another question. Does it make sense to fetch the data for a certain follow-on view

although navigation to this view will be definied late in a window?

Thanks

Regards

Paul

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Paul,

See If I understood the questions: ( I paraphrased the questions)

Do you have to use Supply function?

<b>No, that is only used in heirarchical Node structues that have the

singleton option set. Even then you can always programatically manage your Context.</b>

Which Method to get data?

<b>Ideally, on a custom method on the Component controller. or secondary controller.

This method should call an Auxiliary ABAP class that actually gets data.

Your Comp controller method would be triggered by an Event on you view.

EG Button to navigate, a check button whatever.

</b>

Place code fetch on follow on view?

<b> generally I avoid that if at all possible.

but it's been done before. Main reason is to avoid unnecessary

navigation. Through the errors and perform the checks as close to source

as possible. in mots cases you should be able to check data, and even load

info before actually doing the navigation.

ie Avoid firing plug till the last moment.

</b>

Hope that helps

Cheers

Phil.

Former Member
0 Kudos

Hi Phil,

<b>Ideally, on a custom method on the Component controller. or secondary controller.

This method should call an Auxiliary ABAP class that actually gets data.

Your Comp controller method would be triggered by an Event on you view.

EG Button to navigate, a check button whatever.</b>

If i call the method of component controller in a method of my view, check the return code and only then do the navigation by firing an event. I think, it will work. What advantages will i get by calling a method of component controller via an Event?

<b>generally I avoid that if at all possible.

but it's been done before. Main reason is to avoid unnecessary

navigation. Through the errors and perform the checks as close to source

as possible. in mots cases you should be able to check data, and even load

info before actually doing the navigation.

ie Avoid firing plug till the last moment.</b>

For example, if have a "Next"-Button in a view. How can i decide in Method for "Next" what data must be filled for next view if in one case it could be one view, and in another case other? I thought, follow-up view must get data on his own. My question was, which method can be used for filling the data in this case. It is not wddoinit and not wddomodify.

Regards

Paul

Answers (0)