cancel
Showing results for 
Search instead for 
Did you mean: 

How To Upload PPT files

Former Member
0 Kudos

Hello Experts,

In my application I want To Upload Just PPT. I dont want the contents of that file to be displyed in the form of a table.

I just want to extract the name of the file and check whether it is .ppt or not. If it is a ppt I have to change the name of that .ppt file

as gift.ppt.

I am having problem in getting the filename by using standatrd function get_filename of class ** cl_wd_file_upload.**

Please help me.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks

former_member628395
Active Participant
0 Kudos

Hi ,

You can use the File Upload UI element and bind the properties, FileName , mimetype and the data of the component three

attributes in the context of type string.

Once you select the file, these three attributes will be populated and you can use the mime type of the file to check if it is a ppt

or not. If I am not mistaken, the mime type is application/powerpoint.

Regards,

Sagar

Former Member
0 Kudos

hi

do it like this :

1.Make a context attribute of type String.

2. Bind this attribute to the File Upload UI property Filename.

Now u can read the context binded with this property to fetch the file name. u can use code wizard for the same .

for reading context attribute , press CONTROL+F7 , choose the radio button read context node/attribute

u can now do it using get_attribute method

Refer SAP online help for File UPload UI element : http://help.sap.com/saphelp_nw70/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

regards,

amit