cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted Fields in OVS outputQuery UI

Former Member
0 Kudos

Hello,

I have build a very simple OVS help in web dynpro application.

Now I am using a RFC which fetched data from PA001 HR table which contains a lot of standard field columns.

Our ABAPer has built the RFC where he has directly used PA001 as table and giving output for all the columns.

Now when I import this RFC as model in my application, It brings all fields for PA001 table with it.

When I define usage and bind context data from my custom controller to created model for RFC, I am selecting only fields that I want and unchecking all unwanted fields.

Now the problem is:

The fields that I have not selected while context binding are actually also getting displayed in output table section of user interface of OVS.

My OVS is working fine and correctly fetching records as per search query, nut it is giving output for all fields from PA001.

i.e. even for all fields that I have not selected while context binding.

Please throw some light on the same.

Thanking you in anticipation.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

From CE 7.11 EhP1 onwards, you can control the field/column visibility in the OVS.

You need to use the OVSConfigurator class which allows to configure the following elements programmatically :

column labels

field labels

number of search area columns

window title

result table columns

search fields

cancel button

You can find some help in this [link|http://wiki.sdn.sap.com/wiki/display/WDJava/CustomizingValueHelp-ObjectValueSelector].

Regards,

Sayan Ghosh

Former Member
0 Kudos

Thanks Sanay,

This could be the reason.

But there is one more doubt.

While creating mapping from FRC model to custom controller context, If I uncheck a field and do not map it, then still why it is getting displayed !!

As in this case there is no point to have a checkbox while mapping fields..

Former Member
0 Kudos

Hi Saurabh,

Help me understand this... You said that you are seeing the columns in the OVS table even for those attributes that you have not mapped to the RFC model. My question is, are you only getting the column header or the columns are getting populated as well ?

If you see only the column header with blank values in the column in the OVS table, then it makes sense. This is because, you pass the Output Node details to the OVSProvider object and the later considers each attribute of the Node to be an individual column. So in that case, we get a column for each attribute of the node. If you have not mapped the node attribute to the RFC model, then ideally the column in the OVS will not contain values.

We can control the visibility of the columns using the OVSConfigurator class.

Regards,

Sayan Ghosh

Former Member
0 Kudos

Yes, I am not getting values.

However I didnt' noticed that at first.

But after reading your post I got to know about this.

Excellent explanation....thank you

Sayan, thus it means that If you wish to remove any field from OVS output table section then, you need to remove it straight from RFC. Is it ?

Because in my case I removed them from RFC and then they were disappeared alltogether from OVS output table.

Former Member
0 Kudos

Saurabh,

The RFC may be used in other applications that may require the fields that you do not require.

So changing the RFC should be avoided.

A cleaner approach is to copy the required attributes from the model node to a value node.

Bind this value node to your UI element. This will ensure that your UI is independent of the RFC output.

- Sudeep

Former Member
0 Kudos

Hi Saurabh,

Create a value node of cardinality 0:n and copy the structure of the attributes from the RFC node into this value node. Make sure to copy only those attributes in the structure that you need in your OVS display.

Create a simple method and in that copy the values of the RFC node into the value node. You can use WDCopyService for this. Treat this new value node as the source node in your OVSProvider object.

Now everytime, you need to repopulate the source node of the OVS, just call the method and it will simply get the data from the RFC node.

The advantage of this approach is, if you would have been using the RFC node as the source of your OVS, so everytime you need to repopulate the source, you need to execute the RFC.. this is a performance issue. Following this approach, your RFC is executed once and all data is present in RFC node. Everytiem you need to repopulate values into the source node of your OVS, simple copy them from the RFC node.

Regards,

Sayan Ghosh

Former Member
0 Kudos

>

> The advantage of this approach is, if you would have been using the RFC node as the source of your OVS, so everytime you need to repopulate the source, you need to execute the RFC.. this is a performance issue. Following this approach, your RFC is executed once and all data is present in RFC node. Everytiem you need to repopulate values into the source node of your OVS, simple copy them from the RFC node.

>

> Regards,

> Sayan Ghosh

Hello Sayan,

Above statement confuses me a bit.

Normal work process of OVS is :

1. User enters a query string in input boxes og OVS UI.

2. User presses the Go button.

3. This is the moment when RFC is called...and based on input from user..it fetches data from R/3 and then displayes it in table.

Now in your statement above when you say:

" everytime you need to repopulate the source"

do you refer to step 3.

Because if you refer to step 3...then I think better approach to actually to call the RFC as user input might change every time user hits the Go button.

I hope you are not refering to step 3....when you say " everytime you need to repopulate the source".

Because in that case I would like to know what does repopulating of node refer to.....as I can also use this somewhere in my application to increase performance.

However, the other part of your answer clears all the doubts in my mind and completely answers my original question.

Thank You...

(I will be waiting for your reply...then only i will mark it as answered)

Former Member
0 Kudos

Hi Saurabh,

Yes I refered to step 3 when i said that RFC will be executed everytime when the OVS is populated. The RFC output is not dependent on the text that you enter in the field associated with the GO button.

If the source node is the RFC node, that means repopulating the source node will actually execute the RFC. Now the values that RFC returns is not dependent on the Text that you enter into the field associated with the GO button. RFC will execute normally as it does and return the entire set of data. The OVS then filters that data matching the text that you provide and display the matching records in the OVS table.

So instead of executing RFC each and every time, simply fetch RFC data one time and store it in the RFC node. Use the value node as the source node. Everytime the value node is repopulated, it simply copies the data from RFC node which is available in the context. The OVS will then filter the data based on your text input and display the results.

This way you can minimize the number of database calls and enhance performance.

Regards,

Sayan Ghosh

Former Member
0 Kudos

Hello Sayan,

I do not agree with this comment when you say "RFC return all data to Java layer, and then our OVS filters the data based on user query string"...

Because when I put debugger on RFC as external breakpoint and entered a search query from OVS input section...

Is was actually returning only fields based on the search query.

I didnt' checked the output in Java web dynpro.

I debugged the RFC infact and then checked...the table was getting poppulated only based on enetered query at java ovs end.

Please check the same at your end if you have any runinng OVS in place.

Please do not take this as an argument...but only as a discussion.

Edited by: Saurabh Agarwal on Mar 29, 2011 9:08 AM

Former Member
0 Kudos

Help me understand this.. You must be using a 1:1 cardinality node in OVS for Query String for Searching. Have you mapped any attribute of this to any input parameter of the RFC ? In that case, the RFC will return data matching to the Query string that you provide associated with the GO button. But if that is not the case, how will the RFC know, what Query string you have provided ?

Regards,

Sayan Ghosh

Former Member
0 Kudos

The cardinality of my root model node is 0..n.

This model node conatins model attributes (corresponding to input fields in OVS query input section)

And yes, they are bound to RFC input elements.

I have followed below approach to implement the OVS in my case.

[Link|http://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/503f22f6-b978-2a10-bf97-ddc21267e752] [original link is broken];

In above link refer to section Advanced Value Help: Object Value Selector

It is exactly how I have done it in my case.

Former Member
0 Kudos

Since you are passing input parameters to the RFC, it is returning values matching the Search Criteria. The RFC is designed to work like that.

Suppose you have a RFC which does not have any input Search parameter.. then each time you execute the RFC, you will get the entire set of records.

That time using a value node which copies data from RFC node can be used as a source node for the OVS.

Regards,

Sayan Ghosh

Former Member
0 Kudos

Thank you,

Things are clear now.

Answers (0)