cancel
Showing results for 
Search instead for 
Did you mean: 

Supply function or Lead selection

Former Member
0 Kudos

Hi

As a Noob, I have written a noddy program to help me work out how to do things in WDA.

I display :-

  • a list of flights (0:n)

  • flight details of selected flight (just some attributes) (0:1)

I have found 2 ways to achieve the details functionality

1) Supply Function

List (0:n)

Detail (0:1) (Singleton) (SF)

AttrA

AttrB

Attr1

Attr2

I have a Detail singleton node inside the List node. The Detail SF gets called whenever the List is loaded or the List Lead selection changes (which is perfect)

The problem is that if the flight List is empty then I get a dump because the Detail view cannot access the Detail context. This is an interesting design choice in WDA. An alternative would be to return NULL data which would have resulted in an elegant solution for me.

A work around is to display a Dummy (empty) view instead of the Detail view if the List is empty. Unfortunately this means the whole Detail view disappears which might not be good UI design. Even this could be worked around I suppose but it is starting to really get ugly

2) onLeadSelect

List (0:n) (LS action)

Attr1

Attr2

Detail (0:1) (Singleton)

AttrA

AttrB

If I place the Detail node at the same level as the List then I cannot not use a Supply Function to load it. Instead I use a onLeadSelect Event on the List UI table. This works great except the first time a List is displayed. WDA automatically selects the first List record but this does not activate onLeadSelect and so the Detail view (exists but) is empty. A work around is to load (or clear) the Detail context node (with the first List record detail) when getting the List.

So, 2 different techniques with essentially the same result. Both require workarounds to behave properly. I am probabably missing something somewhere which would make atleast one of the solutions elegant.

Or are there no elagant solutions even for problems as simple as this

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

anesh_kumar
Active Participant
0 Kudos

Hi

Check this [link|http://wiki.sdn.sap.com/wiki/display/WDABAP/ExampleforpassingvaluesfromoneApplicationtoanotherApplicationinWebDynproABAP.]

Regards