cancel
Showing results for 
Search instead for 
Did you mean: 

How to Implement the OVS in a table

Former Member
0 Kudos

Hai

I want to implement a table with one column with OVS. But if I want to enable OVS, I can not create a table because of the cardinality of the node-element of the context.

My table Node cardinality is 0..n because we have many rows in a table.

i have introduced EVS in one column.it works fine.

Because We can not set our own inputfield or button in EVS Pop Up.

If we select the cardinality "1..1" the OVS works but the table only can have one row. If we select the cardinality "0..n" the table can have "n" rows but the OVS is disabled.

Did anybody implements a similar application? Please help

i got the following error

**************************

When i call WDValueServices.addOVSExtension with ovsStartupAttributes, do this error: MappedAttributeInfo ViewName): must not modify the datatype of a mapped attribute

Message was edited by:

Dhinakaran Jeyachandran

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dhinakaran,

"must not modify the datatype of a mapped attribute " error shows that u r trying to implement the OVS in the view & the node is mapped to controller. Instead of that u can write ur code in controller itself. It will work.for more clarifications ,do reply back.

regards

Sumit

Former Member
0 Kudos

Hai Sumit

I have implemented the OVS in CustomController.

In that view i have written following code only

IWDAttributeInfo[] ovsStartUpAttributes = {wdContext.nodeTimeSheetTable().getNodeInfo().getAttribute("TimeSheetWBS")};

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

WDValueServices.addOVSExtension("WBS",ovsStartUpAttributes,wdThis.wdGetOVSCustController().getOVSInputNode(),wdThis.wdGetOVSCustController().getOVSOutputNode(),listener);

i have to set the value in the table cell..

from the OVS.

Regards

Dhina

Message was edited by:

Dhinakaran Jeyachandran

Former Member
0 Kudos

Hi Dhinakaran,

ur error is showing 'MappedAttributeInfo VwRepuestos" but in the code u have given, this attribute is not available. Where exactly u r using this??

regards

Sumit

Former Member
0 Kudos

Hai Sumit

i think My Problem Is cardinality problem

If i select the cardinality "1..1" the OVS works but the table only can have one row. If i select the cardinality "0..n" the table can have "n" rows but the OVS is disabled

My Error is

com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(ViewName.TimeSheetTable.TimeSheetWBS): must not modify the datatype of a mapped attribute

Former Member
0 Kudos

Hi

Can you see the line number and where it is throwing the exception i.e in controller or view ?

Regards

Akshaya

Former Member
0 Kudos

Hai Akshaya

It is throwing the exception in the view

Dhina

Former Member
0 Kudos

Hi

I dont think the exception is related to cardinality.

You are trying to use ISimpleTypeModifiable in the view for some attribute of the node. and that node is been mapped to controller context.

Where ever you are using ISimpleTypeModifiable in view make it sure that it should be done at controller side.

Regards

Akshaya

Former Member
0 Kudos

Hi Dhinakaran,

Check this.I think ur problem is same

regards

Sumit

Former Member
0 Kudos

Hai

Pls Explain me step by step procedure, how to introduce the OVS in the table(any one of the column)

Dhina

Former Member
0 Kudos

Hi Dhina,

Just move this piece of code to controller WDValueServices.addOVSExtension("WBS",ovsStartUpAttributes,wdThis.wdGetOVSCustController().getOVSInputNode(),wdThis.wdGetOVSCustController().getOVSOutputNode(),listener);

then try.

regards

Sumit

Former Member
0 Kudos

Hai Sumit

I have moved the follwing code to controller.there is no error thanks

IWDAttributeInfo[] ovsStartUpAttributes = {wdContext.nodeTimeSheetTable().getNodeInfo().getAttribute("TimeSheetWBS")};

IWDOVSContextNotificationListener listener = wdThis.getOVSListener();

WDValueServices.addOVSExtension("WBS",ovsStartUpAttributes,wdThis.getOVSInputNode(),wdThis.getOVSOutputNode(),listener);

But i didnt see the OVS object in the table for that coulmn("TimeSheetWBS")

what should i do?.Pls Help.what code i should write in View and controller...

Message was edited by:

Dhinakaran Jeyachandran

former_member485701
Active Participant
0 Kudos

Hi,

If you think it's cardinality issue thenchange it to 1:n.

Otherwise do like this.

Create a custom controller first say OVSCustomController

and do following things for a column:-

Add this controller in your view.

IPublicOVSCustomController.IContextNode ovsContext = wdThis.wdGetOVSCustomControllerController().wdGetContext();

Create input and output nodes for ovs.

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

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

Create Attributes for this field in the input and output nodes.

IWDAttributeInfo attrInputInfo = ovsInputNodeInfo.addAttribute(field,datatype of field);

IWDAttributeInfo attrOutputInfo = ovsOutputNodeInfo.addAttribute((relatedfield,datatype of field);

set the attribute Info array:-

IWDAttributeInfo[] attrInfoArray = new IWDAttributeInfo[1];

attrInfoArray[0] = attribute info of the column

Now call the ovs service :-

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

Your ivs window will be opened by this.

Feel free for any queries regarding this.

Regards,

Praveen

Message was edited by:

Praveen Kumar Pandey

Message was edited by:

Praveen Kumar Pandey

Former Member
0 Kudos

Hai Praveen

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

i have doubt in above line......

i didnt get <b>ovsNodeInfo</b> and (field.getFieldName()) instead of i got

only

IWDNodeInfo ovsInputNodeInfo = <b>ovsInputNodeInfo</b>.addChild................

is there any import statement or jars i have missing?

pls help me.urgent.....

what code should write in the view and controller.guide me

Dhina

Message was edited by:

Dhinakaran Jeyachandran

former_member485701
Active Participant
0 Kudos

Hi Dhina,

I have edited that, that should be the column name.

By mistake i pasted it there, it was my own implementation.

Remember one thing add your custom controller to the view and create all ovs nodes directly in custom controller's context.

Can you paste here your code, for calling ovs.

May be after checking that I can tell you.

Regards,

Praveen

Message was edited by:

Praveen Kumar Pandey

Former Member
0 Kudos

Hai Praveen

I have doubt in above line......

i didnt get <b>ovsNodeInfo</b> and (ColumnName()) instead of i got

only

IWDNodeInfo ovsInputNodeInfo = <b>ovsInputNodeInfo</b>.addChild................

is there any import statement or jars i have missing?

and i got the error in the addchild statement......

and one more thing in the view itself it throws the error after written the code like the below syntax

IWDAttributeInfo[] ovsStartUpAttributes = {wdContext.nodeTimeSheetTable().getNodeInfo().getAttribute("TimeSheetWBS")};

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

WDValueServices.addOVSExtension("WBS",ovsStartUpAttributes,wdThis.wdGetOVSCustController().getOVSInputNode(),wdThis.wdGetOVSCustController().getOVSOutputNode(),listener);

former_member485701
Active Participant
0 Kudos

Hi,

Sorry one statement was missing there.

after getting the context create an ovs Node, under which you can create input and output node.

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

Now your add child will not give the error.

And please send the error, if you are getting any.

Regards,

Praveen