Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read only mode for Excel sheet

Former Member
0 Kudos

Hi Experts,

While exporting ALV Report values to Excel sheet, can we make the excel file Read only?

I created an ALV report.User will export this report into an Excel file.It can be manipulated.I want to restrict any alterations to this file.

Can i do this using ABAP programming?

Regards,

Sibinraj

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

No, you can't set the file properties using FILE_SAVE_DIALOG.

For this use the method CL_GUI_FRONTEND_SERVICES=>FILE_SET_ATTRIBUTES.

regards,

anusha.

9 REPLIES 9

kiran_k8
Active Contributor
0 Kudos

Found this link in SDN Wiki.Hope it may give you some lead

http://wiki.sdn.sap.com/wiki/display/Snippets/DownloadDataintoMultipleSheetExcelDocumentwithNonEditableColumns(Passwordprotected)UsingABAP+OLE

Thanks,

K.Kiran.

Former Member
0 Kudos

Hi Kiran,

I couldn't open your link.

Regards,

Sibinraj

Former Member
0 Kudos

Hi,

Check is_print in the alv function module it will directly print the values into the excel file of any file u specified, then there is no chance to modify the values .

regards.

0 Kudos

Hi Anusha,

can you please elaborate on this.

Regards,

Sibinraj

Former Member
0 Kudos

Hi,

This link may lead to solve your problem.

Regards,

Anusha.

0 Kudos

Hi Anusha,

Thanx for your reply.I checked the links but I was unable to export the file to Excel in Read only mode.I used CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG to download the file to desktop.Can we make the file Read only using this function module?

Regards,

Sibinraj

Former Member
0 Kudos

Hi,

No, you can't set the file properties using FILE_SAVE_DIALOG.

For this use the method CL_GUI_FRONTEND_SERVICES=>FILE_SET_ATTRIBUTES.

regards,

anusha.

0 Kudos

You can use the method FILE_SET_ATTRIBUTES of class CL_GUI_FRONTEND_SERVICES. You may refer here on how to use that method. The parameter READONLY can be used for the purpose.

http://help.sap.com/saphelp_tm80/helpdata/en/4f/09e5682e794e1185a29b19646b9873/content.htm

0 Kudos

Thanx all for your valuable feedback.

Its resolved now.

Regards,

Sibinraj