Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
hofmann
Active Contributor

The reason behind this blog can be found here: [1].

This blog is not about writing a WDJ application for uploading a file, as there is more than enough information on SCN available explaining how to do this. It is about how to configure ICM to allow large file uploads (>100 MB) and what this implies. The configuration is valid for NetWeaver Java >= 7.10 as these releases use ICM.

A limitation of the maximum file size accepted by ICM is given by standard configuration. By default, ICM only accepts files not larger than 100 MB. As always, the documentation is not explaining why this is, it is just given by almighty SAP [2]:


“The default setting for the size of HTTP requests is a maximum of 100 megabytes”


The parameter: icm/<PROT>/max_request_size_KB


The see the current configuration of this parameter, you can use SAP MMC (you secured port 50013 to ensure not everyone can see anything of your portal, including the logs, right?).

This parameter needs to be changed in the ICM configuration file located on the server. As it is a default parameter, you`ll have to create the parameter first to overwrite the default value. After a restart of ICM, the change is effective and you can upload GB large files. Now, this parameter configured ICM and therefore generally valid. In case your portal is accessible by external users, you should use a reverse proxy to make sure people from outside try to crash your server by sending automatically large files to crash your server.

It would be nice to not find out the possible parameters using SAP Help when editing a configuration file. This is just counterproductive. Why not put all the parameters there, including a description? That’s how most (ex: open source software) configuration files are done. The file serves as documentation.

Example application to try it out

The limitation is valid for every HTTP request send to AS Java, so if you want you can try it out with a portal application, servlet, KM file upload or a WDJ application. The example here is a WDJ application. You can write your own application using the examples provided by SAP here on SCN. In case you do not want to search, here is a short description on how to code the application.

1. Create a view named FileUpload

2. Node element uploadFile

3. Uploading the file is triggered by the action UploadFile


public void onActionUploadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
  IPrivateFileUploadView.IContextElement element = wdContext.currentContextElement();
  IWDResource resource = element.getUploadFile();
  if (element.getUploadFile() != null) {
  // do something
} else {}

This is all it needs to have a WDJ application that allows to upload a file. Note that the node element handling the file is of type Resource. During the upload, WDJ creates a temporary file on the server that will be stored there until the resource is not any longer used.

Appendix

[1] http://scn.sap.com/thread/3278398

[2] SAP Help

Some information from SAP Help and SCN about WDJ and file upload / download

Title

Link

Release

Uploading and Downloading Files in Web Dynpro

http://help.sap.com/saphelp_nw04/helpdata/en/43/85b27dc9af2679e10000000a1553f7/content.htm

7.0

Web Dynpro Java Demo Toolkit

http://wiki.sdn.sap.com/wiki/display/WDJava/Web+Dynpro+for+Java+Demo+Kit

>= 7.0

How to Upload and Download Files in an Web Dynpro for Java Application

http://scn.sap.com/docs/DOC-2601

>= 7.11

SAP Portal KM: Create a resouce

http://help.sap.com/saphelp_nw2004s/helpdata/en/43/68a36ba327619ae10000000a1553f6/frameset.htm

7.0

Loading the InputStream at FileDownload on Demand

http://help.sap.com/saphelp_nw73/helpdata/de/42/f6ec5a09321bc7e10000000a11466f/frameset.htm

7.3

Uploading and Downloading Files in Web Dynpro Java

http://scn.sap.com/docs/DOC-2561

7.0

2 Comments
Labels in this area