cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot fill a ModelNode automatically. Change the cardinality or use a supp

Former Member
0 Kudos

Hi Friends,

I have a context whose value i am setting it to the model context, when i deploy i get this errory

Cannot fill a ModelNode automatically. Change the cardinality or use a supply function

Please help

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Siva Rama Krushna,

The model class property is set.

Currently i am getting this error :

Exception on execution of web service with WSDL URL 'http://INLD50050705A:53000/WS_MyEMIClaculator/EMIClaculator?wsdl' with operation 'EMICalculation' in interface 'WS_MyEMIClaculatorVi_Document'

Former Member
0 Kudos

Hi Sameer:

Could you solve this problem? I'm facing the same problem and don't know how to solve it.

Regards,

Former Member
0 Kudos

Hi,

This happens when the model is not executed properly. Have you set all the parameters required to execute it. Please try to execute the same in WS navigator.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Sameer,

The error being mentioned by you is kind of generic error that we get in many cases. After executing your application, navigate to the following path <installation drive>:/usr/sap/<SID>/JC<instance number>/j2ee/cluster/server0/defaulttrace(the last modified).

Scroll down and you might get some more details for the error.

Regards,

Murtuza

Former Member
0 Kudos

My Model Structure is like this :

Request_EMICalculation

AddEMI

- Amt

- Irate

- Year

Response

EMICalculationResponse

- Response

My model ui element is disabled

Edited by: Sameer Ali Khan on Mar 13, 2008 11:28 AM

former_member197348
Active Contributor
0 Kudos

Hi Sameer,

Cannot fill a ModelNode automatically. Change the cardinality or use a supp This error comes when you miss the modelClass property to model node/attribute.

Go to Context tab.

Select your modelnode/attribute

Right click and open properties

Check the property

modelClass -> It must point to Model class which is defined in you r dictionary.

Some times this property misses when you reimport or rebind the model.

regards

Siva

Former Member
0 Kudos

I tried wdCopyService, i got the error :

*com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: nodes are incompatible *

at com.sap.tc.webdynpro.progmodel.context.CopyService.copyElements(CopyService.java:63)

at com.sap.tc.webdynpro.progmodel.api.WDCopyService.copyElements(WDCopyService.java:62)

at com.sap.test.ExComp.executeEMI(ExComp.java:204)

at com.sap.test.wdp.InternalExComp.executeEMI(InternalExComp.java:201)

at com.sap.test.Home.onActionSubmit(Home.java:144)

former_member214651
Active Contributor
0 Kudos

Hi Sameer,

Binding the Node to a Model could pose some problems since the property of the Mode Node and ur Value Node differs.

In such cases u can use the WDCopyServices() class provided by the WD Framework for copying the Values to ur Value Node.

Create a Value Node and after that right click on the Node->Edit Structure Binding and select the structure whoser values needs to be copied into ur Value Node.

Select the Fields u need to copy.

After that right click on the Value Node-> delete Structure Binding.

Then in ur Coding area write the following piece of code:

WdCopyService.copyElements(wdContext.node<ModelNode>,wdContext.node<ValueNode>);

this will copy all the values to ur value node

Hope this helps u.

Regards,

Poojith M V

Former Member
0 Kudos

Hey friends,

None of the method is working...

Former Member
0 Kudos

Please explain the structure of your context clearly like the parent and the child nodes and the mapping etc so that additional help can be provided.

former_member312910
Participant
0 Kudos

Hi Sameer

This happen when your parent node does not have any elements and you are trying to add elements to the child node.

So to add elements to child node, first you need to add element to the Parent node.

1 Create Element of Parent node

2 Create Element of Child node

3 Add Parent element to parent node

4 Add Child element to child node

sample

IPrivatePbpf_test_View.IEmpDetailsElement ele = null;//Parent

IPrivatePbpf_test_View.IVa_IDNElement end = null; //child

ele = wdContext.nodeEmpDetails().createEmpDetailsElement();

wdContext.nodeEmpDetails().addElement(ele);//Add parent

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

end = wdContext.nodeEmpDetails().nodeVa_IDN().createVa_IDNElement();

end.setVa_IC(i+"A");

wdContext.nodeVa_IDN().addElement(end);//add child

}

cheers

Deepu

vivekananthan_sellavel
Active Participant
0 Kudos

hi sameer

1. create value attributes

2.and sent mdel atribut to value attribute

Request_CurrencyConvertorHttpGet_conversionRate obj = new Request_CurrencyConvertorHttpGet_conversionRate();

obj.setFromCurrency(wdContext.currentContextElement().getFromCurrency());

obj.setToCurrency(wdContext.currentContextElement().getToCurrency());

wdContext.nodeRequest_CurrencyConvertorHttpGet_conversionRate().bind(obj);

try

{

wdContext.currentRequest_CurrencyConvertorHttpGet_conversionRateElement().modelObject().execute();

wdContext.nodeResponse().invalidate();

}

catch (Exception E)

{

}

Former Member
0 Kudos

Hi Priyanka,

I tried ur solution, but it's not working. I got the following error now

*cannot bind or add elements because the node has no valid parent *

Former Member
0 Kudos

What is the property 'singleton' set for your node?

If you try to add an element to the parent node without actually adding element for the parent node

to the root node, this problem occurs.

So first try to create an element of parent and add it to the root and then go for the child node.

Refer to these threads. They should answer most of your doubts regarding cardinality and singleton property.

http://help.sap.com/saphelp_nw2004s/helpdata/en/7a/787e40417c6d1de10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/7c/0ccf3d5090b80de10000000a114084/frameset.htm

Former Member
0 Kudos

Check the cardinality of the node if it is 1..1 or 1..n . The error may be coming because of this as there may not be nay predefined element for this node at runtime. Either add a blank element to it or change the cardinality to 0..n.

Hope it helps.