cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime table binding question

matteo_montalto
Contributor
0 Kudos

Hi all gurus,

in few words... I have an FPM OIF based application (on SRM7.02), so many tabs are available.

One of these tabs contains a custom WD Component, in which I have a table filled with data.

Now: I need to bind my data table to the WD Table each time the user access the tab.

Example: suppose there are 3 main tabs in my application, say A, B and C. The tab which contains my table is B.

So, available navigation between tabs can be:

A -> B, A -> C, B -> A, B -> C, C -> A, C -> B

I would like to perform a table binding each time the user goes from <somewhere> to tab B.

As far as I've tried:

- WDDOINIT is not a solution as the method is triggered just the very first time the user access the view.

So:

A -> B

triggers WDDOINIT,

but then the sequence:

B -> C, C -> B

doesn't trigger it anymore.

- WDDOMODIFYVIEW with clause IF_FIRST_TIME = 'X' has the same limitation of WDDOINIT. It will be executed only at the very first access to the view.

Is there any "simple","clean" solution to perform my task?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

StefanRoesch
Active Participant
0 Kudos

Hi Metteo,

I am not sure about FPM, but i think you can try the inbound-plug of your component window (interface view). If a navigation is triggered by the tab then the inbound plug could be the place to have your binding-code. Did you check this?

regards,

Stefan.

matteo_montalto
Contributor
0 Kudos

Thanks Stefan,

I'll give it a try and report back.

matteo_montalto
Contributor
0 Kudos

Stefan, you're right, HANDLEDEFAULT method from interface view is triggered anytime user passes to GAF's step 2. The problem is that I don't have access to the underlying wd_context of the embedded view

StefanRoesch
Active Participant
0 Kudos

Hi Metteo,

can you declare the necessary context node (table-data) in the component controller and then map it both to your view and the window (interface view)?

then you can change the table-data from the window-inbound-plug.

i think that would be the easiest way.

otherwise more special:

you can save the reference of your view somewhere (e.g. in Componentcontroller) and then call a view-method (with your binding code) from your window-inbound-Plug.

or even better:

you fire an event from inbound-plug and listen to that event within your view where you then do the binding.

or maybe:

define a navigation from window to view, fire Navigation when the window inbound plug is triggered and then do the binding in the inbound plug of your view...

hope that helps.

regards,

Stefan.

Answers (4)

Answers (4)

former_member219762
Contributor
0 Kudos

Hi,

Get runtime information by method GET_RUNTIME_INFO of class CL_FPM in wddomodifyview , and get Floorplan,and use GET_TARGET_STATE method of floorplan which gives target uibb. Depend on that uibb we can bind your table.For more details go through Toolbar modification section of this link http://scn.sap.com/docs/DOC-47092

Regards,

Sreenivas.

Former Member
0 Kudos

Did you tried taking a look into Process_event method in Component controller. FPM events can be handled in this method.

amy_king
Active Contributor
0 Kudos

Hi Matteo,

If you set the view's Lifetime property to when visible, the view will re-initialize each time the user navigates from another tab to the view. Maybe this will meet your requirement.

Cheers,

Amy

former_member219762
Contributor
0 Kudos

Hi,

WDDOMODIFYVIEW will trigger each time the user goes from <somewhere> to tab B. So you can write your code in that method.

Regards,

Sreenivas.

matteo_montalto
Contributor
0 Kudos

Hi Sreenivas,

I can't re-bind the table each time WDDOMODIFYVIEW is triggered as I have to guarantee user's operativity on that table.

E.g., multiple selection, filtering, and so on.

If I rebind the data source to the table each time WDDOMODIFYVIEW is triggered, any action previously performed by the user is cancelled . I need to rebind only when the user access the WD component.... even better, the view.

Former Member
0 Kudos

Hum... not sure to understand what FPM OIF is but here's my question : do you have anyway to interact with the onselect event of the tabstrip?

If so there are ways to do what you want for exemple storing a reference to the view/component you want to manipulate in helper class or self manage singleton and then use it in onselect action.