Skip to Content

Upload large files to NetWeaver Java

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( 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.



[2] SAP Help

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




Uploading and Downloading Files in Web Dynpro


Web Dynpro Java Demo Toolkit

>= 7.0

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

>= 7.11

SAP Portal KM: Create a resouce


Loading the InputStream at FileDownload on Demand


Uploading and Downloading Files in Web Dynpro Java


You must be Logged on to comment or reply to a post.