sap fiori client - TECHNICAL GYAN GURU https://technicalgyanguru.com All SAP information on 1 place Fri, 20 Sep 2024 10:43:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 https://technicalgyanguru.com/wp-content/uploads/2024/04/cropped-cropped-technical--32x32.png sap fiori client - TECHNICAL GYAN GURU https://technicalgyanguru.com 32 32 Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options https://technicalgyanguru.com/display-download-png-jpg-pdf-document-in-sfiori-client-android-with-3rd-party-app-for-zoom-additional-options/?utm_source=rss&utm_medium=rss&utm_campaign=display-download-png-jpg-pdf-document-in-sfiori-client-android-with-3rd-party-app-for-zoom-additional-options https://technicalgyanguru.com/display-download-png-jpg-pdf-document-in-sfiori-client-android-with-3rd-party-app-for-zoom-additional-options/#respond Tue, 08 Oct 2024 06:12:00 +0000 https://technicalgyanguru.com/?p=4828 Learn how to display and download PNG, JPG, and PDF documents in the SAP Fiori Client on Android. This guide covers using a third-party app for zooming and accessing additional…

The post Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options first appeared on TECHNICAL GYAN GURU.

]]>
Learn how to display and download PNG, JPG, and PDF documents in the SAP Fiori Client on Android. This guide covers using a third-party app for zooming and accessing additional options for a seamless document handling experience. Ideal for enhancing your mobile document management capabilities.

Fiori Client’s Zoom Options

How can ZOOM options be brought in?
What is the process for opening a document using a third-party application?

The built-in Fiori Client attachment plugin, is the answer.

The code snippet to accomplish the functionality is shown below.

  1. Display the document

Put the code below on the unified uploader’s change event.

var oCore = sap.ui.getCore();
var oFile = oEvent.oSource.oFileUpload.files[0];
if (oFile) {
var vPath = URL.createObjectURL(oFile);
try {
if (oFile.type == "application/pdf") {
// For mime type PDF this below code invokes adobe reader
var reader = new FileReader();
reader.readAsDataURL(oFile);
reader.onload = function() {
window.open(reader.result);
};
reader.onerror = function(error) {
sap.m.MessageToast
.show("Unable to open file");
};
} else {
// For mime type JPG PNG this below code invokes gallery
window.open(vPath);
}
} catch (e) { // Error in case of any failures to be catched }

2. View the document after downloading from Getstream.

try {
window
.open(encodeURI("/sap/opu/odata/Service/AttachSet(Property1='"
+ vValue1
+ "',Property2='"
+ vValue2
+ "')/$value"));
} catch (e) { // Error in case of any failures to be catched }

Shots showing how to operate it.

Launch the Fiori Client App.

Select on browse button

Select an image that requires the user to enlarge before proceeding with any actions.

Zoom options will be accessible as soon as the file uploader’s change function is called.

Select a PDF file to open the PDF app and access the zoom features

See Also: Complete Guide for My Inbox PO Approval Application

Likewise, if you need to use Getstream to open the Adobe Reader or gallery/in-app window. Utilize the download feature. The associated app is automatically invoked based on the backend’s mime type.

I think this post will give you the guidance you need to activate and call the appropriate Zoom feature routines. Please feel free to contact me or post your questions in the comments area below if you need any additional information or if you have any more questions.

you may be interested in this Blog here:-

SAP S/4HANA Cloud Public Edition 2408: A Comprehensive Guide to Product Implementation

5 Methods for Using Your Salesforce Email Sender Reputation: An Story of Redemption

The post Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options first appeared on TECHNICAL GYAN GURU.

]]>
https://technicalgyanguru.com/display-download-png-jpg-pdf-document-in-sfiori-client-android-with-3rd-party-app-for-zoom-additional-options/feed/ 0 4828