cancel
Showing results for 
Search instead for 
Did you mean: 

Photo URI for Mobile Application

former_member215561
Participant
0 Kudos

Hi All,

I need to create an odata service to provide a employee profile photo to a Mbile application.

Here is the issue

I tried to get the URI using the follwing FMs

HRWPC_RFC_EP_READ_PHOTO_URI

HR_IMAGE_DETAIL & a couple more

The problem is that when I use this URI in the browser I am getting the following error.

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Deric,

Here are some examples and you can get some idea.

Regards,

Masa / SAP P&I Technology RIG

former_member215561
Participant
0 Kudos

Hi Manasyuki,

I got this resolved with links provided by you

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Deric,

Please share which doc was the best reference.

It would be also very nice, if you share the solution code.

Regards,

Masa / SAP P&I Technology RIG

Answers (2)

Answers (2)

former_member182372
Active Contributor
0 Kudos

what most probably happens - your odata service returns cached data

HRWPC_RFC_EP_READ_PHOTO_URI returns signed URL which is expired so if you trying to load expired url it will complain.


set a breakpoinnt and ensure URL is generated and returned back to client (UI5) and not loaded from cache

former_member182874
Active Contributor
0 Kudos

Hi Deric,

I hope the service you are creating is using GET service and employee profile photo should exist in the database. You need to call the same using your service.

Use Read Media service and Create Media : Method name is GET_STREAM and CREATE_STREAM

Regards,

Tejas

former_member215561
Participant
0 Kudos

Hi Tejas,

Employee photo is available in DB and is viewable via transaction PA30

Are you talking about the ABAP part. If yes which classes these methods will fall in.

Regards

Deric

former_member182874
Active Contributor
0 Kudos

Class should be your DPC_EXT class in your gateway service.

Methods : GET_STREAM, CREATE_STREAM