cancel
Showing results for 
Search instead for 
Did you mean: 

Database on Mobile device?

Former Member
0 Kudos

Hi All,

Im working on MI7.0SP11.

The scenario i have is <b>Offline</b> . i need to develop an application which accesses a Function Module, performs an operation and posts material document back to the R3.

The synchronization will happen <b>daily once</b>.

For this Offline scenario do i require a database on the mobile device. Otherwise how does the Mobile device maintain the application data which get downloads on every synchronization.

Pl. Suggest

Regards,

Kiran Joshua

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Yes you need a database. MI works with DB2e from IBM (PDA or laptop) or MaxDB on the laptop.

Otherwise you can use the default file system persistance, but I think you won't be able to use queries with it.

Thank you,

Julien.

sandeep_rs
Advisor
Advisor
0 Kudos

Hi Julien,

Just a small correction. Queries can be used with MI file persistence as well but only JQueries cannot be used.

JQueries are join queries required in order to get data from two tables after a join over the primary key column in one and another column in the other table.

Best Regards,

Sandeep

Former Member
0 Kudos

Hi Julien,

Default file system persistence, how can this be utilized , do i need to take care abt the file system connectivity, drivers...etc.

And in my scenario i dont have any queries except some simple ones, but i post the material document.

and pl. let me know which databases are supported. and is it mandatory i shud use only DB2E or MaxDB.

rgds,

Kiran Joshua

sandeep_rs
Advisor
Advisor
0 Kudos

Hi Kiran,

You need not worry about anything if you are using file persistency. Its the default persistence that MI supports and Mi will take care of everything. As far as the application sees it just needs to use the smart sync/persistence APIs to handle data and the persistence layer in MI does the internal stuff itself.

Simple queries are handled fine by file persistence but a database like DB2e is always recommended because of a number of reasons:

1. DB operations using standard db engines like DB2e is always more transactional safe than native file persistency (esp on PDAs)

2. They offer better security and performance.

3. In case of problems its easier to analyse the data on the device when DB2e is used. Its nearly impossible to check on the dat when file persistency is used because of the binary format of data.

MAXDB can be only used on laptops and MI does not officially recommend MAXDB as persistence.

My suggestion would be to go in for DB2e. You can check out the eval version in the SDN download page (https://www.sdn.sap.com/irj/sdn/downloads -> MI)

Best Regards,

Sandeep

Former Member
0 Kudos

Thank you Sandeep,

as per my offline requirement, how is the data managed in my handheld device.

how does this File persistence handled. Will the device have the file system bcoz generally the devices will be having less memory.

If i use DB2e, how should i take care abt the database storage, and connectivity.where shud i include the code??

pl. suggest

rgds,

Kiran Joshua

sandeep_rs
Advisor
Advisor
0 Kudos

Hi Kiran,

If you are using file persistence MI stores the data in the files inside the data folder and makes io operations on them as and when you update/add/delete data.

If you are using DB2e, then MI makes the necessary calls to the DB2e driver to initialise it, configure it for the data storage location(MI data folder), gets the connection and issues the necessary db commands. DB2e will then create its own tables inside the data folder in which it will store data.

If you are using DB2e, all you will need to do is to deploy DB2e as an addon through the webconsole (or Admin UI in case of NW04s) and when the addon comes to the MI client it will take care of all the necessary MI configuarions and installing of drivers, etc. From then on, whenever your application makes a call to MI persistence, MI will route your request to DB2e and the tables in the data folder will get updated. There is absolutely no extra coding required from your end if you want to switch to DB2e persistence.

Memory is always a concern on PDAs. The advantage of an offline solution like MI is that allows user to work on data even when there is no connectivity. Obviously in some manner we need to store the data on the client for this and consume memory. This is where you need to use proper filters in the middleware and push only the relavent and needed data onto the mobile device. Your sync BO design will also play an important role here.

Best Regards,

Sandeep

Former Member
0 Kudos

Thanks a TON Sandeep for the explanation.

Can you please send me any procedure doc if u have any for dealing with the database DB2e(installing,configuration...etc)

But i ahve a doubt ...how does MI Client device read data from tables when required without maintaning the data retrieval commands in the codes.

rgds,

Kiran Joshua

sandeep_rs
Advisor
Advisor
0 Kudos

You are welcome Kiran.

You can check note 677476 that explains in detail about DB2e in MI.

MI of course has dat retrieval commands in its code. However, it is not exposed directly to the application. Let me calrify with a quick example:

In order to retrieve data from an order object, the appliaction might just call something like <i>read(orderdescriptor, orderkey)</i> passing the order class descriptor and orderkey as parameters to the read() API exposed here.

Internally MI will now check if file persistence or DB2e persistence is being used (from the mobileEngine.config file)

Based on this, the implementation will go like this:

if(implemenation == <i>file persistence</i>)

{

open order file for read;

read file till key = orderkey;

read the following record;

}

else if (implementation == <i>DB2e persistence</i>)

{

open DB connection;

issue command "select * from order table where order key = orderkey";

return resultset;

}

Note that for the application all this is hidden and all it has to do is call the same read() api without bothering about what is the implementation.

Hope this helps.

Best Regards,

Sandeep

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kiran,

Please check this Link.

This Db2e u ahve to upload as a mobile component ADDON in NWA or webconsole.,Then assign the DB2e and application on to your device to download the DB and Application .

hope this might solve your problem.

Thanks

Regards

Devendra