Skip to Content
0

PDF download in SAPUI5 using oData

6 days ago

46

avatar image

Hello,

I want to invoke an oData read service which returns PDF file as output. The oData url would look as follows:

/sap/opu/odata/SAP/ZYG_PDF_DWNLD_SRV/FILE_ENTITYSet('XYZ')/$value

I know how to invoke read operation from an entity set using standard SAPUI5 APIs. However, I am confused about the $value suffix in this oData invocation. How can I invoke the above url using SAPUI5 oData APIs.

Please provide the SAPUI5 code snippet which executes the above oData service

Note: If nothing is possible, my final work around is: construct the url in the above format using javascript and execute it using an ajax call. Before I do that, I would like to know the approach using standard API, hence posted this thread.

SAP Learner

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Tri Minh Le 4 days ago
1

Hi SAP Learner,

You can try this approach

File Upload/Download through NetWeaver Gateway

Regards,

Tri

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Tri,

Thanks for that.

The topic in the link talks more about the oData development for File upload/download. I am looking for SAPUI5 code snippet which can invoke the oData file download service in a standard approach. Can you please provide that information

Regards,

SAP Learner

0
SAP Learner 5 days ago
0

Can someone please help me here?

Share
10 |10000 characters needed characters left characters exceeded
Desiree Matas
5 days ago
0

Hi SAP learner,

This is more related to the gateway technology than to UI5. Adjust your tags so that the community can address the question better.

Best regards,

Désirée

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Desiree,

I have added Gateway service tag also to this thread.

As my query is to provide the SAPUI5 code snippet for executing the specified oData service, I have retained the primary tag as SAPUI5. I hope you agree with that

Regards,

SAP Learner

0