FIORI:显示从网关发送的 PDF 文件 [英] FIORI: display PDF file sent from the Gateway

查看:65
本文介绍了FIORI:显示从网关发送的 PDF 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发这个 Fiori 应用程序(ABAP 和 UI5 部分).我必须将 PDF 文件从后端服务器发送到 Fiori 应用程序,然后在用户按下按钮时将其显示在新选项卡中.

I'm working on this Fiori app (both ABAP and UI5 parts). I have to send a PDF file from the back-end server to the Fiori app and then display it in a new tab whenever the user pushes a button.

我不知道如何实现这一点.在互联网上搜索,我找到了解释 ABAP 部分而不是 Fiori 部分的示例(反之亦然).

I have no idea how to implement this. Searching on the internet, I found examples that explains the ABAP part but not the Fiori part (and conversely ).

有没有人有一个完整的例子来实现这个场景?提前致谢:)

Does any one please have a full example implementing this scenario ? Thanks in advance :)

推荐答案

<Button press="openPDF" text="Open PDF"></Button>

openPDF : function(){
        var URL = "https://www.sapfioritrial.com/sap/opu/odata/sap/HCM_MY_PAYSTUBS_SRV/PDFPaystubs(SEQUENCENUMBER=1694,PersonnelAssignment='00100226')/$value";
        sap.m.URLHelper.redirect( URL, true )
        }

SAP demokit 中的例子可以帮助你

The example from SAP demokit can help you

PDF 查看器

这篇关于FIORI:显示从网关发送的 PDF 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆