cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Button for a field in a table

Former Member
0 Kudos

Hi there,

I don't know if it is possible, but I can't find any information of this. How can I make a field in a table searchable? That means I want to include a button besides this field in the table, so that user can click on the button to search for, eg to search for Material Number, using this button.

Anyone can help?

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Welcome to SDN Jackson!

Exactly what is your requirement?

Do you want to search within this table?

Inb this case you need to you use [filter |] for the table.

Do you want to search and fetch the material no from the backend table?

In this case you need to use [OVS |] or even [EVS |]sometimes

Regards,

Siva

Former Member
0 Kudos

Hi there!

Thanks for your reply!

Yes I am requiring help in what you said the 2nd one.

For example, my table got Material Number & Quantity. For this Material field, I want to have a button besides it so that user can search backend for a material number for the input.. something like a search.

Can you advise? Thanks so much!!

And thanks for the welcome!

former_member197348
Active Contributor
0 Kudos

Hi Jackson,

Then the best option for you is OVS. Here is the step-by-step tutorial. Check this [link|/docs/DOC-8061#51 [original link is broken]].

Regards,

Siva

Former Member
0 Kudos

Hi there,

Yes, but the problem is how can I add the 'search' button in the field so that user can click on it to search? It seems I can't place the button in the field where user enters the 'Material Number'?

sanyev
Active Participant
0 Kudos

Hi Jackson,

Once you add your Object Value selector automatically the OVS button for search will be visible on your inputfield. Do follow the tutorial given above. You do not need to add any extra buttons.

Regards,

Sanyev

Former Member
0 Kudos

Thank you guys so much!

OVS seems much more details and steps than EVS. I am trying to follow the guide given however it seems quite complex for my level.

I am referring to another guide at

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/valueHelp-ObjectValue+Selector&focusedCommentId=77988388

I hope I can get it to work soon, it seems complex.. 😮

former_member201361
Active Contributor
0 Kudos

Hi Jackson,

Placing a Button next to Input field say "Search " is not possible. but while implementing the OVS, u will get a Smal button like Structure next to input field in the runtime. on clicking that, we will get the Pop up scrren where we can do searching the data from the backend.

u can see the runtime behaviour in my wiki , which u have specified.

Thanks and Regards

Former Member
0 Kudos

Hi there, just a question.. for the List Result view.. is it automatically generated by web dyn pro if I use OVS? Or do I need to create this view?

Former Member
0 Kudos

Sorry just found out I need to create it. Had thought that OVS UI is automatically generated. Thanks!

Former Member
0 Kudos

hmm.. The search is automated.. no need to create the view for it..

Former Member
0 Kudos

Hi there,

I find that the 'Advanced Search' citeria is always based on a node.. (getovsInputNode( )), and if the node has 5 elements, it will have 5 field for search. Lets say I only want to search using one of the attribute, eg: "Material Number", how can I modify such that it display one field available for search only?

former_member201361
Active Contributor
0 Kudos

hi,

Have a look to this link for customizing the value help.

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0c6132f-4ea3-2b10-4d8f-e68d2e96113d]

Thanks and regards'

Former Member
0 Kudos

Thank you so much! I think that link will help me alot.

Btw do you have any idea where did I go wrong? when I click on the OVS for the field, it shows the correct number of input field to search, however there are NO labels at all.. it is just ":" followed by the field..

former_member201361
Active Contributor
0 Kudos

Hi,

Have u created Simple types and for the context node attributes , have u given the type from Simple type ?

if yes , then in the simple type , have u given the Field label and Column label ?(check this in my Wiki).

or u can follow the approach , which i have done in my Article "Customizing Value help".

Thanks and Regards

Former Member
0 Kudos

Oh No.. I am using 7.0.09..

It seems it does not have the Configurator import available for use for the "Modifiable OVS".

Could I install these import seperately without installing the latest version of netweaver?

former_member201361
Active Contributor
0 Kudos

Hi,

Oh No.. I am using 7.0.09..

It seems it does not have the Configurator import available for use for the "Modifiable OVS".

By default , it comes with NW EHP 1.

Could I install these import seperately without installing the latest version of netweaver?

Sorry , i dont know about this.

Have u solved the Label problem? whether labels are getting displayed?

Thanks and Regards

Former Member
0 Kudos

It doesn't seems to be working. I have the field in the table with name Material_01.

I create a simple type and try to map the label to the field Material_01 but it doesn't seem to show when the OVS is clicked.

The field which activates OVS has context value Request_Sa_Create.Sa_Create.Item.Sa_Item.MATERIAL.

Did I do wrong?

former_member201361
Active Contributor
0 Kudos

Hi,

The field which activates OVS has context value Request_Sa_Create.Sa_Create.Item.Sa_Item.MATERIAL

whether this is a model attribute ? if yes then u will get get the label.

create a new value node and attribute as i have done in my wiki.(please check with my wiki)

Thanks and Regards

Former Member
0 Kudos

I tried everything but it still won't work.

This is what I have done.

1. Click on the search button to activate the OVS.

2. The screen comes out with the input fields and the output fields, but there are NO LABEL at all

3. I tried to create Simple Type as stated in the Wiki, eg: I create a 'Material' simple type which is one of the search input field in OVS, and set the Field Label and Column Label as "Material" too. I assume doing this will match ANY of the column or field with id = 'Material' the label 'Material'?

Much help is appreciated!!

Former Member
0 Kudos

Q:The screen comes out with the input fields and the output fields, but there are NO LABEL at all

this can be fixed by coding inside applyInputValues..

But you please try this....

Simply bind ur simple Type to your input field Attribut in the table.

It will work.

Former Member
0 Kudos

for displaying the label please try this...

public void applyInputValues(IWDNodeElement applicationNodeElement,

IWDNodeElement queryOutputNodeElement) {

// setting an initial value in the Input node

Object initialValue = applicationNodeElement.getAttributeValue("Attrr name")

queryOutputNodeElement.setAttributeValue("Attrr name", initialValue);

// setting the label

wdContext.node<nodename>getNodeInfo().getAttribute("Attr name")

.getModifiableSimpleType().setFieldLabel("LABEL");

}

Edited by: jithin james on Feb 25, 2009 9:41 AM

Edited by: jithin james on Feb 25, 2009 9:42 AM

Former Member
0 Kudos

"Simply bind ur simple Type to your input field Attribut in the table."

Pardon me for not knowing this! But isn't the input field of the Attributes in the OVS being bound to the model input? How can I do a double binding?

Former Member
0 Kudos

hi,

Your requirement (as i understood) is: U have an input feild in table where u need to get a button.

On action of this button u need to get a list of material numbers from where u can select.

Without using OVS u can do this...

You have already created a simpletype named material number where u have all your material numbers right?

So go to the attribute which you have bind to the input feild and in the types property of this attribute set the type as the Material simple type.

You can use this if you are not getting any data from back end.

Regards,

Jithin

Edited by: jithin james on Feb 25, 2009 10:17 AM

Edited by: jithin james on Feb 25, 2009 10:20 AM

Former Member
0 Kudos

No that is wrong. What I want to do is as follows:

In a table, there is a button in the field where user can click on to activate the OVS. When they click this button, OVS will open up a screen with the search citerias and the results in the table in the OVS (This is auto generated window and I can't modify directly onto the window).

What is happening now is when I click on the button to activate the OVS, what came out is just the fields.. the labels are all gone.

I tried to create Simple Type but it seems I do not know the correct way to use it so that the fields for OVS can be displayed with the labels. I tried many ways but the labels just don't show up.

You proposed that I do a Simple Type Binding but the problem is the window is automated, I can do binding onto the generated window.

What else can I try? I read all the tutorials and wiki, it seems that all the labels are generated so beautifully and automatically.. but mine is empty..!!

From what I analysed, in the OVS windows, the number of citeria fields generated are based on the number of fields input for the model and the number of result column is based on the number of fields in the model output. But there is just no Label.

PS: My data is bound to the backend using Adaptive Webservices, therefore I am using the model to search for the data.

Any help or advise is greatly appreciated!

Edited by: Jackson Yap on Feb 25, 2009 10:28 AM

Former Member
0 Kudos

If you are using simpletypes then give your Label in the ' field and column' label in the simple type representation it will work.

If this doesnt work (99%-it will) refer the code which i have send before.

Former Member
0 Kudos

Hi Jackson,

I was trying to create a OVS for a field in NWDS. But, was not able to do it properly. I really didn't get the proper understanding of the way it is working. I wanted to replicate the Search Help Functionality in ECC, but was not able to do it. If you have any idea about how this works, please help me. I would really appreciate your help.

Regards,

PG.

Former Member
0 Kudos

"If you are using simpletypes then give your Label in the ' field and column' label in the simple type representation it will work."

Sorry can I clarify.. What should I put inside Simple Type's 'field and column label' so that they will be utilised as the OVS's field's label? (which there is no OVS's field label now)

Former Member
0 Kudos

Hey!

The Code works But i still want to try the Simple Type to see if I can get it to work..

Former Member
0 Kudos

Do you have other methods of hiding fields or column in OVS other than using the OVSConfigurator which my version of NW doesn't seem to have?

THANKS SO MUCH!

Former Member
0 Kudos

Sure I can try to help. What is it that you need?

Former Member
0 Kudos

There seems to be a strange problem with OVS screen after I set the column and field label.

For the field label.. it is okay.. when I open the OVS screen, it is shown, however for the column label, it is NOT SHOWN on the 1st time when I open it.. but it only shows AFTER the 1st time I open it.. hmmm any idea why?

Former Member
0 Kudos

Hi Jackson,

I am looking to implement OVS for a field "Vendor". So, when the user clicks on the Vendor field, the OVS pop-up should appear and then it should have few fields that the user can use to search for a Vendor from the SAP database.

I have looked at the Wiki by "Fazal Ahmed" but it was confusing for me and was not able to follow it properly. Could you help me understand the scenario? Can I contact you through mail?

Regards,

PG.

former_member201361
Active Contributor
0 Kudos

Hi Jackson/Gopal,

Query : Why i have created three separate Nodes in my WIKI ?

In my wiki,i have created three separate nodes for implementing OVS. Normally we will not bind the Model node and attributes to the UI elements directly, as this will make your application dependent on the backend systems and violates the MVC Design pattern. In MVC, Only the controller should communicate between the Model and View.

Labels:

in the OVS pop up, by default we will get the labels and it is framework controlled thats the reason for creating simple types in the component dictionary and binding those to context attributes.

Thanks and Regards

Former Member
0 Kudos

Hi Fazal,

Thanks a lot for your reply. Could I contact you regarding this so that I can exchange few screen shots with you. Because I am not getting any success implementing this OVS.

Regards,

PG.

Former Member
0 Kudos

Hi there,

Sorry but to clarify.. isn't model part of the controller? I mean we didn't use the model directly but through the controller, does it still violates the MVC principles?

Former Member
0 Kudos

Hi there!

Sure! I am able to help you once I solved my OVS.. Working on it now!

former_member201361
Active Contributor
0 Kudos

Hi Jackson,

Sorry but to clarify.. isn't model part of the controller? I mean we didn't use the model directly but through the controller, does it still violates the MVC principles?

in MVC , only the controller will be able to communicate between model and View.

so while doing context mapping , only the component controller will have the model nodes.

but the view controller should have value nodes and u have to do the context mapping between the View value nodes and Component node. and even the execution of model should be done in COmponent controller only.

Thanks and Regards

Former Member
0 Kudos

I understand. Thanks Fazal!

Former Member
0 Kudos

Hey Guys!!

Good news!! I found a website which is exactly what we need:

/people/sheetal.gangele/blog/2008/02/08/object-value-selector-search-helps-step-by-step-using-a-web-service

You should be able to follow this guide easily as it is quite straight forward compared to other which I have come across. After reading the article, this is what I gathered so far:

1. Lots of previous articles do really teach about OVS implementation, however they could be for different model, eg: some might be applicable for Adaptive webservices while some are for RFC, entities etc. Therefore you need to find the right way of doing respective solutions.

2. The reason why the labels is not showing is as stated by someone in this thread, that there is no framework, which is indeed really true. Because if you are using Web Service (Adaptive), the labels NEED to be manually set.

3. Lastly, I have changed my style of implementation by changing Model Node to Value Node when using OVS. In this way, you can set the fields and columns which you want to display if you could not use OVSConfigurator like me.

Hope this helps!! However I am still having some problem with execution hopefull someone can help me in the other thread. THANKS GUYS!

Answers (4)

Answers (4)

Former Member
0 Kudos

There are other solution waiting.

Former Member
0 Kudos

Hi Jackon,

Your Requirement is...: button to search for, eg to search for Material Number, using this button.

This can be done using the OVS. But there is a problem here. Before you selct the OVS help for an IF u will always have to lead select the Row where u need your OVS help, or else the value will always be set in the lead selected row.

Say if u have 5 rows and ur lead selection is in the 2nd row.

now you select OVS for the 3rd row, the value will be set for 2nd row...

So it is better to go for EVS if u know all the material numbers. With EVS u wont face the above problem.

Regards,

Jithin

Former Member
0 Kudos

Please see the below thread

Former Member
0 Kudos

Hi Jackson,

I think the above solution filter provides you with a search help button (life f4 button in R3).

More over you can try to bind a method with option EVENTS: onEnter , which can have search logic.

Every time you will enter any thing into text field EVENT onEnter will be triggered.

Regards,

Abhijeet

Former Member
0 Kudos

Hey!

However I don't want to just search just using onEnter. I want to have a button there so user will know they can search.