Skip to Content
author's profile photo Former Member
Former Member

WenDynpro jave problem

I'm doing one of the example from tech ed 2008 java web dynpro in SAP Netweavre CE system. In that I cretaed two table one with slaes order and another with item line details. In the jave code when I write the code as follows the system is showing an error

public void wdDoInit()

{

//@@begin wdDoInit()

// Get a reference to the SalesOrders context node

ISalesOrderNode soNode = wdContext.nodeSalesOrder();

//Create two new Sales Order elements and immediately add them

//to the node collection

ISalesOrderElement soE11 = soNode.createAndAddSalesOrderElement();

ISalesOrderElement soE12 = soNode.createAndAddSalesOrderElement();

soE11.setLongtext("Printer Supplier");

soE11.setOrderNo(1000);

soE11.setSalesDate(new Date(System.currentTimeMillis()));

soE11.setSalesRep("Dinesh Ghanta");

soE12.setLongtext("Network Equipment");

soE12.setOrderNo(1001);

soE12.setSalesDate(new Date(System.currentTimeMillis()));

soE12.setSalesRep("Ned Seagoon");

// Create the LineItems node instances for each SalesOrders element

** ILineItemsNode liNode1 = soE11.nodeLineItems();**

** ILineItemsNode liNode2 = soE12.nodeLineItems();**

// Create new elements for each LineItems node,

// set the attribute values and add them to the nodes

//@@end

}

//@@begin javadoc:wdDoExit()

The system is saying that there is a type mismatch error on both the lines where I'm creating the items. Can you please help me here...am I msising something.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 14, 2009 at 07:08 AM

    Hi Dinesh,

    Where have you defined the context structure? In component Controller or View Controller? If you have mapped the context beetween Comp Controller and View and you are writing this code in the view, then you need to refer to the ILineItemsNode that corresponds to the controller/view based on what the other side of the assignment refers to. Rest your cursor on nodeLineItems in the code soE11.nodeLineItems() to know what type it returns.

    Hope this helps!!

    Cheers,

    Arafat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.