cancel
Showing results for 
Search instead for 
Did you mean: 

Can i display 1 key and 2 values with EVS

ashwani_tomar
Participant
0 Kudos

I have to display 3 things out of which 1 is key and 2 are values. Is it possible to display 2 values and a key in EVS. If yes then how it is possible?

Thanks

-Ashwani

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

You can not do that with EVS. You can achieve the same with OVS.

Raja T

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ashwani,

If you want to do this with EVS you have to concatenate the two values and show them.

Regards

Ayyapparaj

former_member485701
Active Participant
0 Kudos

Hi ashwani,

you can achieve this using OVS(Object Value Selector).

following is the link that tells about how to use OVS in webdynpro:-

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cf40cf90-0201-0010-4a85-e5a207b9...

For more clarification, feel free to ask.

Regards,

Praveen

ashwani_tomar
Participant
0 Kudos

Hi Praveen,

Thanks for your reply. I went thru this pdf but cudn't figure out anything out of it. Is there any sample code which i can follow. I tried the sample code on SDN but that again difficult to understand.

Thanks

-Ashwani

former_member485701
Active Participant
0 Kudos

Hi ashwani,

This document will only tell you about OVS. If you want to use OVS then you have to create a custom controller and create Input Node and output Node for OVS.

(1) Get the context information of the OVS custom controller

IPublicOVSCustomController.IContextNode ovsContext = wdThis.wdGet<CustomController NAme>Controller().wdGetContext();

(2)Add a node child for OVS

IWDNodeInfo ovsNodeInfo = ovsContext.getNodeInfo().addChild(nodeId,null,true, CMICardinality.ONE_TO_MANY,CMICardinality.ONE_TO_MANY, true, null);

(3)Add one input Node in this Node

IWDNodeInfo ovsInputNodeInfo = ovsNodeInfo.addChild(field.getFieldName()+"Input",null,true, CMICardinality.ONE,CMICardinality.ONE_TO_MANY, true, null);

(4)Add one output Node in this Node

IWDNodeInfo ovsOutputNodeInfo = ovsNodeInfo.addChild(field.getFieldName()+"OutPut",null,true, CMICardinality.ONE_TO_MANY,CMICardinality.ONE_TO_MANY, true, null);

(5) valHlpField is an attribute on which you want the OVS value help

IWDAttributeInfo[] attrInfoArray = new IWDAttributeInfo[1];

attrInfoArray[0] = valHlpField;

//I have given the details og this method in the custom controller see in the last

IWDOVSContextNotificationListener listener = wdThis.wdGetOVSCustomControllerController().getOVSListener();

WDValueServices.addOVSExtension("",attrInfoArray,ovsInputNode,ovsOutputNode,listener);

This thing will give you a blank OVS popup.

Now you have to fix the OVS listner's default functionality.

Create a private class in the custom controller

private class OVSDemoContextNotificationListener implements IWDOVSContextNotificationListener {

public void applyInputValues(IWDNodeElement applicationNodeElement,IWDNodeElement queryInputNodeElement) {

//you will be having the search criteria for OVS

}

public void onQuery(IWDNodeElement queryInputNodeElement,IWDNode queryOutputNode) {

//on click of go button this methos will be called and populate the output node

//How many fields you want to show in the output you can add those many attributes to OVS output node

}

public void applyResult(IWDNodeElement applicationNodeElement,IWDNodeElement queryOutputNodeElement) {

//this will pass the result to actual attribute.

}

//returning listener's instance

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

return new OVSDemoContextNotificationListener();

}

Regards,

Praveen

Edited by: Praveen Kumar Pandey on Jan 10, 2008 5:56 AM