cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile offline application development

Former Member
0 Kudos

Hi, i do this application:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20in...

I create all table, and i create a register, i install the application in the PDA and appear the register, but if i create a new register in a table, i synchronize the PDA and the new register don´t apper, why?

Another question, with this application, how can i create new register from the PDA?

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Victor,

to devdelop apps for PDA it is helpful to compile these Apps with JDK 1.1.8 to see if all used elements are already available in 1.1.8. For example your ADD() - you have to use elementadd() instead. And a GET() that runs perfectly in 1.4 is a elementadd() in 1.1.8.

This happens really often, because you normally develop in the new syntax, these elements are makred as deprecated - but do not worry, using the old syntax will run as well if you compile with 1.5.

Ok, so compile it with JDK 1.1.8, fix all errors, once this is done, switch back to your latest JDK version on the PC, because without that you can not debug the code on the PC - 1.1.8 does not allow debugging in Eclipse and hot code replacement needs at leat JDK 1.4.

Hope this helps you to continue. And hopefully with the second guide you are able to create the APP to read, create and modify items on your device.

Regards,

Oliver

Former Member
0 Kudos

mmmm, ok, so... if i change the add to addelement, will work it??

Another thing, about insert, modify and delete, how can do it??

Thanks,

Former Member
0 Kudos

Hi Victor,

yes, as long as you use JDK1.1.8 syntax your code will work fine on the PDA.

Add, Modify, Delete: in short words this is possible if you create the relevant handlers in the backend and add them to the syncBO in MEREP_SBUILDER. Then you download the new MEREPMETA.xml file and you have these methods available. You find a helpfull description in the MDK.

Regards,

Oliver

Answers (4)

Answers (4)

Former Member
0 Kudos

Ok, i will intent... and respect my second question:

"with this application, how can i create new record from the PDA?"

Thanks,

Former Member
0 Kudos

you have to use the APIs for that..java development...createsyncbo...

rajan_venkatachalam
Participant
0 Kudos

Hi Victor,

If you want to create a new record in the PDA then you need to do a development in java. Refer to this <a href="https://help.sap.com/javadocs/NW04/current/me/index.html">API</a> which would be helpful for you.

Regards,

Rajan

Former Member
0 Kudos

Hi, finally i obtain all records that are in the table of r3... I replicate the SyncBO and restart the PDA...

Another thing... In the application, when appear all record, the firts column (SYNC_KEY) can click (it´s a link), but appear an error:

"

Error: 500

Location: /MIEXAMPLE2/start

Internal Servlet Error:

java.lang.NoSuchMethodError:

java.util.Vector: method add(Ljava/lang/Object;)Z not found at MIExample2.Example_MIServlet.showSelectedSync at ..................

..................

..................

"

If i do the same in the PC, not appear the error... What is the error in the PDA?

Respect create new record in the PDA, i don´t find information in the link, do you know other link with any example?

Thanks,

Message was edited by:

Victor Capi

Message was edited by:

Victor Capi

rajan_venkatachalam
Participant
0 Kudos

Hi Victor,

Regarding the new record creation in the PDA, i dont find any link which describes the steps to create record, As for as my knowledge MDK doc and API doc would be helpful to acheive the same.

Regarding the PDA error, can you please paste the full call stack trace.

Thanks and Regards,

Rajan

Former Member
0 Kudos

The error is because i don´t have the library java.util... How can install it in the PDA?

Thanks,

Former Member
0 Kudos

Hi Victor

The method add(Object o) in the java.util.Vector Package is available only in JDK 1.2. The Creme JVM is based on JDK 1.1.8 and hence you get the error NoSuchMethod error while executing. Hence it is recommeded not to use this such methods which are not availble in JDK 1.1.8.

Best Regards

Sivakumar

Former Member
0 Kudos

Lot of thanks,

Former Member
0 Kudos

Yes, i refer to new record...

mmmm, the replicator is new for me... how do the replication?

Thanks,

Message was edited by:

Victor Capi

Former Member
0 Kudos

Hi Victor,

The application what you might have developed is the smart sync application.

so all the tables, bapi wrappers resides in backend.

Syncbos in middleware.

so replicate the syncbos from backend to middleware.....merep_pd--->synchronizer tab.

and then replicate.

Can refer to the above article..where these things are explained step by step.

cheers,

Karthick

rajan_venkatachalam
Participant
0 Kudos

Hi Victor,

To know about the replication and how to run the replicator , please refer

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d0/d8473dd7b1b366e10000000a114084/frameset.htm">this</a>

Thanks and regards,

Rajan

Former Member
0 Kudos

Hi Victor,

What do you mean by register is it a new record creation?

Ok if you create a new record in the backend table, replicate the particular syncbo.

Then sync the client in PDA..you would get the record to the PDA.

Cheers,

Karthick

rajan_venkatachalam
Participant
0 Kudos

Hi Victor,

Run the replicator of the syncbo in the merep_pd and try it out.

Regards,

Rajan