Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I create an element in the model node?

Hi, Experts,

I create a model node that name is containerNode in the contxt. Cadinility is: 1..n

I write the code in the method:

private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){

String betrgSumStr = "";

int index = 0;

Vector containerVector = new Vector();

int size = wageTypePayslip.size();

IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.

BigDecimal betrgSum = new BigDecimal( 0 );

...

I try to create a element in the containerNode, But the system report error when I run the application.

java.lang.IllegalArgumentException: model object must not be null

at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)

at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)

at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)

at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)

at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)

at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)

at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)

at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)

at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)

at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)

........

How can I create an element in the model node ?

Best regards,

tao

replied

Hi,

You need to execute the model before creating the element.

Regards

Ayyapparaj

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question