cancel
Showing results for 
Search instead for 
Did you mean: 

Offline Application - oData navigation/routing - empty fields in DetailView-Tab

BjörnB
Participant
0 Kudos

Hi all,

i made an offline application with the SAP Web IDE and the "SAPUI5 Master Detail Kapsel Offline Application" with Datas from my SAP-backend via an oData-Service.

On the Split-App i have on the left side a list of my different datas of one table (QmelSet). On the Detail-side there are more informations from this table and on the "information"-tab i want to show the referenced information from an other table (ViqmelSet), which is also on the oData-Service.

The registration on the SMP 3.0.9 works fine and the i'm able to run the APK from my tablet. How you can see the informations behind "Meldungsnummer", "Beschreibung" and "Technischer Platz" are missing, but if i test the same App directly from the Web IDE as an Web Application, everything works fine and the datas are shown normaly - so the oData-Service has no problems and works correct.

The Metadata: (The table Riwo1 i do not use)

Can anybody help and say me, why the Navigation and Routing does not work in the offline App?

Do i have to make any additional settings or changes in the code?

And how am i able to read all the attribute-informations of the different entities in the DetailView?

The navigation settings are set via the "key" in the Detail-Tabs i think.

So i get the selection of the attibute in the fragment view "DetailInfoForm" only with {Tplnr}. But this seems to be a problem in the offline Apps.

Thank you very much!!

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Hi,

Here is my two cents.

If you go to the file dev/devapp.js you will find which collections are defined for offline.

Ex.

From your application if I am right you are trying to get data from two different collections. But in the offline template of web ide you chose only one collection for offline. Hence you are not getting data for your second collection while device is offline. (I am assuming that you are using the offline template of web ide).

If there is a relation between the header and child(informationen in your case). You could modify the variable s (var s) to get the data of both collections. This talks about the use of $expand query in Odata.

Ex. if I need supplier information related to the product selected:

If there is no relation between these two collections you have to add the new collection name to the defining request to get the second collection offline, and make the code changes accordingly.

Ref. http://scn.sap.com/docs/DOC-65397

You could debug your app using chrome to find where exactly it fails: http://gonzalo123.com/2014/08/04/debugging-android-cordovaphonegap-apps-with-chrome/

Regards, Midhun

SAP Technology RIG

BjörnB
Participant
0 Kudos

Thank you very much!!!

That's exatly what i've been searching for and it works

BjörnB
Participant
0 Kudos

, can you help me also in an other question?

This all works without problems. But now i have a problem with the "refreshing".

How i said, i have build my App with the Master Kapsel Offline Template.

If i press the refresh-button in the Web Application Preview on my Chrome-Browser, everything works fine and i can see the changes which i've done in the SAP a few moments before.

I only want to reload and refresh the oData Modell to read the new changes. I don't want to push anything.

But if i try it on my Android-Tablet, the refresh shows in the console while debugging:

refreshing oData Model with offline store

logger.js:668 refreshing offline store

logger.js:668 flushAppOfflineStore.

logger.js:668 offline store flush called

logger.js:668 Store flushed in  10.213 seconds

logger.js:668 enter offline refresh.

---> After entering the offline refresh the Screen stops in the view:

Nothing changes after this and the new records cannot be loaded.

Are there also any settings i have to change in this template?

I've been looking through many topics on the SCN but i could not find the solution.

midhun_vp
Active Contributor
0 Kudos

Hi,

While running the app in the device you would be able to debug it using chrome. Find where it fails.

Regards, Midhun

SAP Technology RIG

Answers (0)