cancel
Showing results for 
Search instead for 
Did you mean: 

OVS Search(F4)

Former Member
0 Kudos

Can anyone send one simple search help application so that i can import and see and understand the concept

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member751941
Active Contributor
0 Kudos

Hi Padma,

Try this 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

Hi Padma..

Check this..

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#51">Sample Application tht u want....</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/softwaredownload?download=/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/9tutwd_ovsvaluehelp.zip">project ready to use</a>

http://help.sap.com/saphelp_nw04s/helpdata/en/bf/867842fdb70f53e10000000a155106/content.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/9a/368442a07b0e53e10000000a155106/content.htm

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bgeneric%2bui%2bservices%2b-%2bva...

Hope this will help you..

Urs GS

Former Member
0 Kudos

see dis

/people/dirk.rehberg/blog/2006/12/27/generic-search-help-for-web-dynpro-for-java

/people/vikram.singh6/blog/2007/01/10/generic-value-help-services-in-web-dynpro--a-birds-eye-view

Former Member
0 Kudos

Hi

My NetWeaver Version is 2.0.9.I checked the procedure in the link given below.

But in my wizard i.e (File &#8594; new &#8594; Other …) and In 2.0.9 version there is no SearchHelp Wizard: Can u tell in which version SearchHelp Wizard: will be there

Former Member
0 Kudos

Hi Padma,

The link u reffered talks abt eclipse plugin,which is not available in webdynpro by default.

I would suggest u to go for this link,where u can get the sample programs as well as the tutorial which explains all the steps.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#51">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#51</a>

regards

Sumit