on 07-14-2008 1:20 PM
Hi folks,
I want to check a file, which should be uploaded using FileUpload. This file shall exist on the local client and doesn't exceed a predefined size limit. CL_GUI_FRONTEND_SERVICES provides methods FILE_GET_SIZE and FILE_EXIST. As this class is only for SAP GUI my question is, if there is something near it for WebDynpros?
Thanks for answers!
Hi Timo,
In webdynpro the contents of the file is treated as xstring data and this is how you can find the size of the file.
data: content type xstring.
data size type i.
wd_context->get_attribute( exporting name = 'FILECONTENT' importing value = content ).
size = xstrlen( content ).
Regards
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct that CL_GUI_FRONTEND_SERVICES is only for usage in the SAPGUI - as are any class with the naming CL_GUI*. They require the Control Framework of the SAPGUI.
What you describe is not really possible in Web Dynpro - not because of a limitation in WD - but because of browser controls. Remember that your application doesn't appear any more trusted to the browser than most anything else on the Internet. Even using security zones in the browser doesn't really open up full access to the desktop machine the way a thick client like the SAPGUI does. I'm afraid that currently uploading the complete file and counting the number of bytes (as described) is your ownly records. In the upcomming NetWeaver Enhancement Package 1 we do have two new ACF - Java Applet based UI elements that perform some of the functions of CL_GUI_FRONTEND_SERVICES. They are acfUpDownload (for mass uploads/downloads and "background" ones) and the acfExecute - (arbritery execution of applicaitons on the desktop client). These UI elements get around the browser limitations because they are Signed Java Applets yet still have a security control mechanism (via a Whitelist Configuration XML file) to keep people from using them in a detrimental nature. They still might not get you exactly what you want (file size query), but they are a step in the correct directly for replicating the most common functionalities of CL_GUI_FRONTEND_SERVICES.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Is there any like class available so that i can use the same functionality in ABAP web dynpro???
>
> --
> Regards
> Vinay Bedre
Did you read the explanation that has been posted already? I went into considerable detail explaining the reasons for the technical limiations (IE we are running in a browser) and the alternatives that are provided (the ACF UI elements). I don't know what more details I could provide.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.