cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile 7.1 - how to create new records in the database

Former Member
0 Kudos

Hello,

We have an occasionally connected application in which we are required to create new data in the client (and when the client is synched, the data is sent to the DOE and later to the backend).

We have a problem regarding creating new information in the client database. We have searched and couldn't find an example of how to add new records to the database (in the ServiceOrder example they only view and change the data without creating).

The database in the client is MaxDB. The client version is 7.1 (the application is written in Web Dynpro Offline for Mobile).

We would appreciate any help regarding this issue.

Thanks in advance,

Sergey.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

For Mobile webdynpro offline for Laptops :

You can create records for header node in the this manner:

Create button or any other UI that has an action related to it.

<write Modelname> model = <write Modelname>.getInstance(); => no need to repeat this if already done before.

<Name of your node> mhead = model.create<nodename>;

model.addTo<nodename>(mhead);

you would have already written a bind in the supply function so no need for a explicit bind here.

for item :

create a button for item, and an action.

<header node> shead2 = wdContext.current<header>Element().modelObject();

<item node> item = shead2.createNew<item node>;

shead2.addTo<item node>(item);

I hope this helps.

Thanks and Regards,

Narayani

Answers (0)