Skip to Content
0

display/edit of document in SAP UI5/Fiori

Sep 07, 2017 at 12:30 PM

533

avatar image
Former Member

Hi Experts,

We have a requirement to display and edit the documents(Microsoft word , excel, ppt) through UI5/Fiori application which are saved in backend.

Is it possible to embed any editing tool in UI5 and Fiori?

Please let me know if anyone has worked on this requirement.

Regards,

Puneet

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

2 Answers

Bernard Le Tourneur Sep 12, 2017 at 01:30 PM
0

Hi,

I am not sure why you would want to edit an excel document in UI5?

SAPUI5 has a PDF viewer which will help you display a pdf file.

You can generate a csv file from a table with relative ease.

I am not sure using UI5 as a means to edit WORD or EXCEL docs is good use case (no offense meant),

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

This is a valid scenario and is possible with the standard UI5 control (check below link)

https://sapui5.hana.ondemand.com/#/sample/sap.m.sample.UploadCollectionVersioning/preview

But in this case, user has to download before editing and then upload again. So to avoid download and upload again, we want to do it online (eg. sharepoint).

Regards,

Puneet

0

The above reference is a control to upload documents. Its not a scenario where excel documents are ever edited within UI5. You could pull down the document and, with Office365, edit within the browser - no-one would want to do that within a UI5 control? Not sure what you are getting at.

0
avatar image
Former Member Sep 12, 2017 at 11:52 AM
0

Sure this can be achieved,

Before that Can you mention few more details:

1. Which is the Backend System ---- SAP?

2. Are all the files (Microsoft word , excel, ppt) maintained in custom table or standard tables?

BR,

PG

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Pavan,

1) yes SAP is the backend system.

2) All the files are maintained in standard table.

Regards,

Puneet

0
Former Member

Hi Puneet,

Well, Do few things before moving for development:

#1. Identify BAPI's/RFC's available to read these documents from SAP.

#2. If not #1, Identify the tables holding these document (Data type)

#1 or #2 done then you can create the development where you will take the data from RFC of Table, Convert the PDF/PPT,DOCX to base64 format.

Basically why to encode the data in BASE64 format might the question here, When you have some binary data that you want to ship across a network, you generally don't do it by just streaming the bits and bytes over the wire in a raw format. Why? because some media are made for streaming text. You never know -- some protocols may interpret your binary data as control characters (like a modem), or your binary data could be screwed up because the underlying protocol might think that you've entered a special character combination (like how FTP translates line endings).

So to get around this, people encode the binary data into characters. Base64 is one of these types of encodings.

Why 64?
Because you can generally rely on the same 64 characters being present in many character sets, and you can be reasonably confident that your data's going to end up on the other side of the wire uncorrupted.

Hope it helps!

PG

0
Former Member

Hi Pavan,

yes we have the service ready to read these documents and we are able to download the documents from UI5 application.

But the questions are :

1) how to open these documents in online editing tool through UI5 application.

2) how to upload back from editing tool to SAP system.

Regards,

Puneet

0
Former Member

Hi Puneet,

You are able to download the documents -- Great,

Firstly, As the downloaded sits on app level - you may change the contents of the file on app level (User interface) and re-upload the file to SAP Backend using the logic specified earlier by me -- As I fear the ain't overwrite functionality available for the files in SAP Backend.

Note: This may not be the BEST PRACTICE, May be Krishna Kishor Kammaje can comment. =)

Thanks,

Pavan G

0