cancel
Showing results for 
Search instead for 
Did you mean: 

Offline Application - oData - Offline Media Stream Setup

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. The Registration is on our SMP 3.0.9.

And now i want to get Media-files like images, pdfs,... into my Offline Application.

I've built an Media-Stream in my oData-Service to get an image.

"http://XXX.com:8000/sap/opu/odata/ori/ODATA_SMP_SRV/QmelSet('000010005901')/$value" - everything works fine and i cann see the jpg image in my browser for example.

Now i've found the informations for the "Offline Media Stream Setup" - http://help.sap.com/saphelp_smp308sdk/helpdata/en/00/3a9184ef7e4806ac07afdce6f3f5d9/content.htm?fram...

But i don't understand how i have to define the request: ( did also not help me, because in the chapter "Binary Data/Attachments" is no description for this topic)

"definingRequests" : {

  "req1" : { "url" : "/Drivers", "retrieveStreams" : true }

}

At the moment in my app it looks like this, because i'm referencing from QmelSet to Viqmel - this works fine.

"definingRequests": QmelSet: "/QmelSet?$expand=Viqmel"


How do i've to implement this line of code for the Media-Stream and does anybody have an example for me, how to get the Media-Files into my Application (Donwloadlink or directly shown).

I'm a Beginner in this topic.

Thank you very much!!!

I've also added my metadata-file - important are only the Qmel and Viqmel.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bjorn,

I would like to include @Daniel Van Leeuwen to comment on this issue.

Kind Regards,
Sushmitha

chinna_babu2
Active Participant
0 Kudos

Hi Björn,

I have tried that above approach, but I didn't find a way to implement GET_ENTITYSET for a media entity object.

Instead of setting the entity in the gateway as media, I have unchecked and implemented GET_ENTITY/GET_ENTITYSET and returning the document content as raw string(xstring). This is working for me but it effect on the performance to download bunch of documents.

Regards,

Murthy