cancel
Showing results for 
Search instead for 
Did you mean: 

Possible bug in OVS component

Former Member
0 Kudos

Hi all,

i played around a little bit with the OVS value help service described in the WebDynpro homepage article by Bertram Ganz. I'm using a selfdefined structure Person defined in my "Local Dictionary". There are two custom controllers PersonCC and PersonCCOvs and a view controller PersonView. The context structure of PersonCC is comparable to the structure in the article (Input with some attributes(1:1) and a child node Output with some attr.(0..n)). The view context is mapped to the context of PersonCC. The context of PersonCCOVS is something like a subset of PersonCC's context (there are only the attributes in Output, which are necessary to identify a person in the table displayed in the OVS dialog). Doing this i ran into the following problem:

I would expect, that only the attributes of Input and Output in PersonCCOvs are used for the generation of the input form and the output table of the OVS dialog.

This is true, if i set the types of Input and Output attributes to the simple types defined in the Person structure.

This is not true, if i bind the Input and Output nodes to the structure and select the attributes needed for OVS. Then always all structure elements are used, regardless which attributes are available in Input/Output.

I guess, this is a bug in the system component which handles OVS?

Furthermore, i'd like to make two proposals to enhance this great feature:

1. The "UI generator" of the OVS component seems to use an alphabetically sorted context attributes list for the sequence of the form input elements and table columns. This is not always the best from a more logical point of view.

It would be nice to have a possibility to influence this without naming the context attributes from AAFirst to ZZLast, maybe by adding two optional IWDAttributeInfo arrays to the addOVSExtension method, which define the desired sequence:


WDValueServices.addOVSExtension(
  "Person",
  startupAttr,
  wdContext.nodeInputOVS(),
  <b>inputAttrSequence</b>,
  wdContext.nodeOutputOVS(),
  <b>outputAttrSequence</b>,
  new PersonCCContextNotificationListener());

2. There should be a possibility to provide "custom components" which build and handle the OVS dialog contents by themselves. The necessary component interface including init-,callback- and so on methods and including the interface view displayed in the dialog could be predefined by SAP. The WD developer would have to implement this interface to ensure "well formed" components.

Regards

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stefan.

I'm also busy trying to understand the way the OVS works.

Can you give me a hint about the public methods getOVSListener(), getOVSinputNode() and getOVSOutputNode(). They are not described in the document.

regards

Bertil Rebergen

Former Member
0 Kudos

Hi Bertil,

the methods you mention have to be declared in the custom controller OVSCust, which provides the listener (instance of inner class) and the corresponding Input- and Output-Nodes in the context.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Thanks for the answer but so far i understood the example, but it would help me a lot if you could also give me an example of these methods.

regards

Bertil

Former Member
0 Kudos

Hi Bertil,

well the methods are quite simple (all declared in OVSCust):

public IWDNode getOVSInputNode() {
  return wdContext.nodeBapi_Flight_Getlist_Input();
}
public IWDNode getOVSOutputNode() {
  return wdContext.nodeOutput();
}
public IWDOVSContextNotificationListener getOVSListener() {
  return ovsListener;
}

Since i wrote the signatures from scratch, i'm not quite sure about the nodeOutput() in the 2. method. But the code completion should help you, if it's wrong.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Thanks for helping. It seems to be working now but i'm having the same problems now you mentioned in your first message.

Do you know if it is possible to show the result of the query (e.g flights)immediatly instead of first typing in the airline-id and press the GO-button?

Bertil

Former Member
0 Kudos

Hi Bertil,

no, i don't think so. The action triggered by the button is not reachable from the "called back" component.

Hope that helps.

Best regards

Stefan

PS: Maybe filling the output nodes before the value help is opened works and the list is displayed before pressing the button.

Message was edited by: Stefan Klensch

Former Member
0 Kudos

Hi Stefan,

The use of the OVS is getting more and more exiting!

In the OVS example we put the OVS Controller and the view together in the same Web Dynpro application. Do you know if it is possible to extract this OVS controller outside the Web Dynpro application in a sense that reuse of this OVS controller for other views is possible.

Bertil

Former Member
0 Kudos

Hi Bertil,

you can create a component, which contains the OVS custom controller you want to use and expose the methods and context nodes of the OVS custom controller in the interface controller of the component. After that you can use this component in other components of the same project.

Hope that helps.

Regards

Stefan

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bertil,

getOVSOutputNode() returns wdContext.nodeFlight_List(). After having declared the model binding a context structure <i>model node 'Bapi_Flight_Getlist_Input' - inner node 'Output' - inner node 'Flight_List'</i> is created. The OVS Service needs a reference to the node containing the collection of model node elements of type 'Flight_List' or model objects of type 'Bapisfldat'. The node 'Output' has the cardinality 0..1. It is associated to the singleton node 'Flight_List' containing the search result data.

Regards, Bertram

Here the correct code:

public IWDNode getOVSInputNode() {
   return wdContext.nodeBapi_Flight_Getlist_Input();
 }
 public IWDNode getOVSOutputNode() {
   return wdContext.nodeFlight_List();
 }
 public IWDOVSContextNotificationListener
 getOVSListener() {
   return ovsListener;
 }

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stefan,

Bertram is on vacation for a couple of weeks, so we need to discuss this as soon as he is back!

Best regards,

Karin

Former Member
0 Kudos

Hi Karin,

thank you very much for the hint.

Best regards,

Stefan