cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help(F4 Help)

Former Member
0 Kudos

Hi All,

My view has one input field and one button....

when i click the button ,it will be searched for Corresponding input Field(to search perticular field only)....

Please suggest correct way....

Thanks & Regards

Mathi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mathi,

1. Dbl click on <b>Component Controller</b> ( Under your Actual Component Controller ) and Go to the <b>Methods</b> Tab.

2. Now click the button new.

3. Selection Method and click next.

4. Now enter the method name.

5. Now select the method type from the drop down. Now if the available methods does not match your need then click the square box from the right side of the drop down and a new window will appera.

6. Now select java native type and click on Browse.

7. A new small window will appear and there you paste your method type. ( for example com.sap.tc.webdynpro.progmodel.api.IWDNode) and details of this trype will appear and now select your type from the <b>Qualifier</b> box and click ok.

8. Again press ok.

9. Press finish and your method will appear in the methods tab.

Please reward points if helps.... Let me know if you need more help

Thanks and Regards

Avijit

Answers (14)

Answers (14)

Former Member
0 Kudos

Hi Mathi,

Very sorry for the late, as I was out of office....

Ovserver carefully...

<b>IPublicTestComponent</b> here <b>TestComponent</b> is nothing but your component Name. Pste your component name here.. When you created your webDynpro project you also created a component ... Please paste that component name here in place of <b>TestComponent</b> and surely after <b>IPublic</b>.

for example: IPublic<your component name>. Make changes in all the TestComponents after IPublic....... ok.

Please reward points if it helps..... Whatever help you need post in this thread... I will immediately reply....

Thanks and Regards

Avijit.

Former Member
0 Kudos

Hi

Yes..You imported this line in ur project...

import com.sap.testcomponent.pkg.wdp.IPublicTestComponent;

I asked this doubt..... Thanks For ur frequent reply....

Thanks & REgards

Mathi

former_member751941
Active Contributor
0 Kudos

Hi Mathi,

It is better to create the project by your self.

Here is the following Steps

Step 1: Create a WebDynpro project.

Step2 : Right click on the model =>create Model => Import Adaptive Web Service Model=>Next=>Give Model Name(say FlightDetails)/PackageName/Model Instances/RFC Meta Data =>Next => Give SAP logon information for single server(Host Name/System Number/client/logon name/password/language)=>Next=>Give the Function Name(Bapi_Flight_Getlist) =>Next=>Finished

Step3 : Create a Webdynpro component(say FlightDetailsComp).

Step4: Right Click on the Used Model add the model(FlightDetails) that you have created using RFC.

Step 4 : Double-Clicks on the Component controller and Create a Value node(FlightInput) set Cardinality(0..1) and a Value Attribute(airlineid) under the node.

FlightInput

|_ airlineid

Step5 : Double-Clicks on the ComponentName(FlightDetailsComp) and open the the Diagram view and do the Mapping between component controller and used model (FlightDetails), views and component controller.

[In the context Model node structure will be like

Bapi_Flight_Getlist_Input

|-Output

|------ Flight_List

|---Attributes

|- Airline

]

Step6: Go to the Component Controller then select “Method” Tab and create the following three methods.

i> getOVSInputNode return type com.sap.tc.webdynpro.progmodel.api.IWDNode

ii> getOVSListener return type com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener

iii> getOVSOutputNode retun type

com.sap.tc.webdynpro.progmodel.api.IWDNode

Step7:

Go to the Implementation tab and provide the following implementation for the functions

1> public void wdDoInit()

{

//@@begin wdDoInit()

wdContext.nodeFlightInput().bind(wdContext.createFlightInputElement());

Bapi_Flight_Getlist_Input bapiInput = new Bapi_Flight_Getlist_Input();

wdContext.nodeBapi_Flight_Getlist_Input().bind(bapiInput);

//@@end

}

2> public com.sap.tc.webdynpro.progmodel.api.IWDNode getOVSInputNode( )

{

//@@begin getOVSInputNode()

return wdContext.nodeBapi_Flight_Getlist_Input();

//@@end

}

3> public com.sap.tc.webdynpro.progmodel.api.IWDOVSContextNotificationListener getOVSListener( )

{

//@@begin getOVSListener()

return ovsListener;

//@@end

}

4> public com.sap.tc.webdynpro.progmodel.api.IWDNode getOVSOutputNode( )

{

//@@begin getOVSOutputNode()

return wdContext.nodeFlight_List();

//@@end

}

5>

//@@begin others

private IWDOVSContextNotificationListener ovsListener = new OVSNotificationListener();

private class OVSNotificationListener implements IWDOVSContextNotificationListener {

public void onQuery(

IWDNodeElement queryInputNodeElement,

IWDNode queryOutputNode) {

//Type custing of node element

IPublicFilghtDetailsComp

.IBapi_Flight_Getlist_InputElement ovsInput =

( IPublicFilghtDetailsComp

.IBapi_Flight_Getlist_InputElement) queryInputNodeElement;

IPublicFilghtDetailsComp.IFlight_ListNode ovsOutput =

(IPublicFilghtDetailsComp.IFlight_ListNode) queryOutputNode;

try {

ovsInput.modelObject().execute();

ovsInput.node().getChildNode("Output", 0).invalidate();

} catch (Exception e) {

IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();

msgMgr.reportException(e.getLocalizedMessage(), false);

}

}

// Setting result to Value node elwment

public void applyResult(IWDNodeElement applicationNodeElement,IWDNodeElement queryOutputNodeElement)

{

IWDMessageManager msg = wdControllerAPI.getMessageManager();

IPrivateFlightDetailsView.IFlightInputElement flightElement = (IPrivateFlightDetailsView.IFlightInputElement) applicationNodeElement;

IPublicFilghtDetailsComp.IFlight_ListElement outputElm = (IPublicFilghtDetailsComp.IFlight_ListElement)queryOutputNodeElement;

flightElement.setAirlineid(outputElm.getAirlineid());

}

//Setting Input for search

public void applyInputValues(IWDNodeElement applicationNodeElement,IWDNodeElement queryInputNodeElement)

{

}

}

Step7: Go to the View(FilightDetailsView) then select “Layout” Tab and design the layout.

Like Airline : FlightInput.airlineid

Take a ToolbarInputField and give the “labelText” value Airline and “value” property value “value FlightInput.airlineid.

Step8: Go to the Implementation and provide the code.

public void wdDoInit()

{

//@@begin wdDoInit()

IWDAttributeInfo[] ovsStartUpAttributes =

{

wdContext.nodeFlightInput()

.getNodeInfo()

.getAttribute("airlineid")

};

IWDOVSContextNotificationListener listener =

wdThis.wdGetFilghtDetailsCompController().getOVSListener();

if (listener != null) {

WDValueServices.addOVSExtension(

"Flight Details",

ovsStartUpAttributes,

wdThis.wdGetFilghtDetailsCompController().getOVSInputNode(),

wdThis

.wdGetFilghtDetailsCompController()

.getOVSOutputNode(),

listener);

}

//@@end

}

Step9: Create an Application(say FilghtApp) .

Step10 : Build and Deploy.

Regards,

Mithu

Former Member
0 Kudos

Thanks FOr Ur Reply...

Thanks for all

Already AVijit sent clear doc....

This thread is closed...

If any doubt, i will open new thread...

Thanks & regards

Mathi

Former Member
0 Kudos

Hi Mathi,

Could you please forward the documents that you got from Avijth regarding the Webdynpro OVS. Because I am having difficulties implementing OVS. I would appreciate your help. You can find my e m ail in my business card.

Regards.

Gopal.

Former Member
0 Kudos

Hi,

Mathi let me know if you need any help regarding OVS.. create other methods in the same way as getOVSInputNode. All these three methos are JAVA Native type methods. So create all the three methods in the same way and specify theri return type in the same way as the first one...

Just follow my document and also copyand paste the codes in the same way as it is.. aslo give same names to all nodes...

Thanks and Regards

Avijit

Former Member
0 Kudos

Hi

private IWDOVSContextNotificationListener ovsListener =

new OVSNotificationListener();

public void onQuery(

IWDNodeElement queryInputNodeElement,

IWDNode queryOutputNode) {

try

{

<b>IPublicTestComponent</b>.IBapi_Flight_Getlist_InputElement ovsInput =

(<b>IPublicTestComponent</b>.IBapi_Flight_Getlist_InputElement) queryInputNodeElement;

<b>IPublicTestComponent</b>.IFlight_ListNode ovsOutput =

(IPublicTestComponent.IFlight_ListNode) queryOutputNode;

ovsInput.modelObject().execute();

ovsInput.node().getChildNode("Output", 0).invalidate();

} catch (Exception e) {

IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();

msgMgr.reportSuccess(e.getMessage());

}

Could not accept this IPublicTestComponent...in this generated as error..

Can we import any other .....and one more thing you created so many dictionary types....it need for this(OVS)..

Thanks & regards

Mathi

Former Member
0 Kudos

Hi Mathi,

If you are working on the same OVS which I sent to you then please follow my document.

thanks and Regards

Avijit

Former Member
0 Kudos

Hi,

you will find the <b>sap.com~testhelp.ear</b> file in the path <b>"testhelp\_comp\gen\default\deploy"</b>. Please check.

Thanks

Avijit

Former Member
0 Kudos

HI

I tried in system EVs And OVS

in system....

How to create method in controller(I have not create Return Type for this method getOvsInputNode)...

It is urgent..plz

Thanks

Mathi s

Former Member
0 Kudos

Hi Mathi,

Please check your mail . I have sent you a detailed document explaining How I have created my OVS and How it works.

Hope this time also it will really help you. Let me know if you need more help.

Thanks and Regards

Avijit

Former Member
0 Kudos

Hi Avjit,

can u send me the OVS document to temp_gj@yahoo.com

Former Member
0 Kudos

Hi Mathi,

On button click it is not possible to display the standard search help. A search help can be associated with an input field only not with a button. If you see my sample application there you will find that the search help is associated with an input filed. if you click on the standard search help icon from the right side of the input field you will get the standard Search Help window.. in which all types of search option is there and you can aslo select value from the bottom table of the search help window.

Thanks and Regards

Avijit

Former Member
0 Kudos

Hi

Thanks For ur frequent reply...

ok..This is last help..Actually missing a file in your project(.ear)..

This code only fine for search help...

wdContext.nodeFlightList().addElement(wdContext.nodeFlightList().createElement());

IWDAttributeInfo[] ovsStartUpAttributes =

{wdContext.nodeFlightList().getNodeInfo().getAttribute(

"AirlineID"),};

IWDOVSContextNotificationListener listener_CID =

wdThis.wdGetProjectComponentController().getOVSListener();

if (listener_CID != null)

{

WDValueServices.addOVSExtension("TEST",ovsStartUpAttributes,

wdThis.wdGetProjectComponentController().getOVSInputNode(),

wdThis.wdGetProjectComponentController().getOVSOutputNode(),

listener_CID);

}

Let Me know if it fine....

Thanks & Regards

Mathi

Former Member
0 Kudos

Hi Mathi,

Thanks for your points. Ok.... You send me all the details about the scenarion that you are trying to create. I will try to create the whole one and send it to you. The sample application that I sent you also executes an RFC and displays the value in the search help. The name of the RFC that I have used in called BAPI_FLIGHT_GETLIST. In the view of my project you will find that if you click on the F4 help button of the input field called Airline ID it will dispaly the search help. Now click on the Go button of the Search Help window and all the value will be displayed in the table of the Search Help Window. Now select any row from the table and the Airline ID of that row will be displayed in the input filed of the view. So I hope this scenario almost matches your requirement. If you want something different please let me know. Explain me the scenarion and I will try to create it and send it to you.....

Please try to execute my project and atleast look at the output once.

Thanks and Regards

Avijit.

Former Member
0 Kudos

Hi

Thanks..please send within today evening.....

My senario(i am using RFC Model)

1.<b>Input field </b> <b><b><i>Button</i></b></b>

If i click button ,it displays search help for input field

2.If not first step, (atleast) click input field(with f4 help) displays in seach help for

Perticular Field....

Please help me....

Thanks & regards

Mathi s

Former Member
0 Kudos

Hi,

I have made some changes in the project I sent to you and sent you the updated one. Please use this latest project. It is working fine and will help you better.

Configure JCO and run it. Let me know it helped or not.

Thanks and Regards

Avijit

Former Member
0 Kudos

Thank you so much....

But it not helped me....

Thanks & Regards

Mathi

Former Member
0 Kudos

Hi Mathi,

What's exactly the problem u r getting??

regards

Sumit

Former Member
0 Kudos

Hi ,

Here is the code...

I used RFC model,I am getting values from RFC model

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.Value);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

// Set field label and populate valueset

countryType.setFieldLabel("Country");

IModifiableSimpleValueSet valueSet = countryType.getSVServices().getModifiableSimpleValueSet();

for (int i = 0; <b>i < 40</b>(upto model value); i++)==><b>I want to get how many fields in model (for search help)</b>.So how to display model value...

{

valueSet.put(wdContext.currentContextElement().getValue(),"Corresponding description "+i);

}

Please help me....

it works manually...

My problem is getting values from rfc model and display in (output)Search Help...

Thaanks & regards

Mathi s

former_member751941
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Mathi,

Please modify your code with the following code

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.Value);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

// Set field label and populate valueset

countryType.setFieldLabel("Country");

IModifiableSimpleValueSet valueSet = countryType.getSVServices().getModifiableSimpleValueSet();

int size = wdContext.nodeCountries()(model node).size;

for (int i = 0; i < size; i++) {

valueSet.put(i, wdContext.nodeCountries().getCountryElementAt(i).getCountry()); );

}

Regards

Suresh

Former Member
0 Kudos

Hi Mathi,

I have already sent you. Please check also my second mail.

Thanks and Regards

Avijit

Former Member
0 Kudos

Hi Mathi,

Send me your email address, I will send you one simple search help application that you can import and see. my email address creative_avijit@yahoo.co.in

Thanks and Regards

Avijit Dhar

Former Member
0 Kudos

Hi

I sent my gmail id...

Former Member
0 Kudos

Hi Mathi S,

If you are trying to apply the same concept as <b>Search Help</b> (when clicking <b>F4</b>) in <b>ABAP</b>, I would suggest you to go for <b>EVS</b> concept which would give the entire list from which you can select the required data.

You can also follow the <b>OVS</b> concept as <b>Sumit Malhotra</b> has mentioned above.

Check out for this link

http://127.0.0.1:2056/help/topic/com.sap.devmanual.doc.user/b3/f68e4ab25d7549888eb612bcb359f1/conten...

Regards,

Mathan MP

Former Member
0 Kudos

Hi,

Thanks For UR suggestion,

I have no R/3 system.....

i want to simple ovs (F4 Help) in web dynpro side...

Please Help me...

Thanks & Regards

Mathi s

Former Member
0 Kudos

Hi Mathi ,

I can send you one sample webdynpro application made by me .... will it help....?

Please let me know...

Thanks and Regards

Avijit Dhar

Former Member
0 Kudos
Former Member
0 Kudos

Hi Suresh,

How Inter application navigation is related to F4 value help??

regards

Sumit

Former Member
0 Kudos

Hi,

sorry....its not correct ... i thought that he wants to go from 1 view to other whatever given in an inputfield......

Former Member
0 Kudos

Hi Mathi,

Can you please elaborate this .U want F4 value help or on click of button u have to just perform a search??

For F4 help u can go thru this link.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cf40cf90-0201-0010-4a85-e5a207b900d8">OVS value help</a>

regards

Sumit

Message was edited by:

Sumit Malhotra

Former Member
0 Kudos

Hi,

Thanks For Ur Reply.....

I am New to web dynpro....

SO,Please give me simple example for ovs....

IF possible click the button and display the search help for input field(F4 help)...

Thanks & Regards

Mathi