on 12-22-2009 9:27 AM
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.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.