Skip to Content
0
Former Member
Oct 30, 2009 at 01:07 PM

How to remove build errors while creating an Order App. for Handhelds

20 Views

Hi Friends,

As per the Tutorial: Developing an Order Application for Handhelds provided at the given link http://help.sap.com/saphelp_nwmobile71/helpdata/en/8F/0B674240449C60E10000000A1550B0/frameset.htm

I am creating mobile application for PDA . I have finished many steps but at one step I am getting build errors.

The step is when we create service and paste the code provided in the document.

{

-


public void generateTestData() {

//@@begin implementation

if( !(((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).getOrderOrderheaders().size() > 0))

{

OrderOrderheader order = ((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).createOrderOrderheader();

order.setOrderid("0023378");

order.setLongtext("Repair front door");

order.setServiceunit("SU01");

order.setCreatedOn(Date.valueOf("2007-06-30"));

order.setCreatedAt(Time.valueOf("08:45:00"));

order = ((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).createOrderOrderheader();

order.setOrderid("0024897");

order.setLongtext("Analyse malfunction");

order.setServiceunit("SU01");

order.setCreatedOn(Date.valueOf("2007-07-01"));

order.setCreatedAt(Time.valueOf("09:00:00"));

order = ((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).createOrderOrderheader();

order.setOrderid("0034534");

order.setLongtext("Repair escalator");

order.setServiceunit("SU03");

order.setCreatedOn(Date.valueOf("2007-07-03"));

order.setCreatedAt(Time.valueOf("19:45:00"));

order = ((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).createOrderOrderheader();

order.setOrderid("0024589");

order.setLongtext("Analyse computer problem");

order.setServiceunit("SU04");

order.setCreatedOn(Date.valueOf("2007-07-01"));

order.setCreatedAt(Time.valueOf("15:45:00"));

order = ((Order_srvModel)OcaRoot.getInstance().getModel(Order_srvModel.class)).createOrderOrderheader();

order.setOrderid("0027890");

order.setLongtext("Repair door lock");

order.setServiceunit("SU03");

order.setCreatedOn(Date.valueOf("2007-07-05"));

order.setCreatedAt(Time.valueOf("10:00:00"));

OcaRoot.getInstance().commit();

}

//@@end

}

}

-


The issue is I am getting a red line below each set methods as I have shown by underlining. I am struggling with how to rectify the error.When I write ORDER and write . after it , it shows only get methods in the popup not the set methods.

Please suggest .

It will be a great help.

Regards,

Nitesh