Wednesday, July 30, 2008

File Export Web Dynpro ABAP Integrating Forms

Use

You can export files in accordance with the FileDownload functionality, thereby fulfilling the usual security requirements. This download functionality is available in every action handler, for example, when clicking a Button, a LinkToAction or (what you should not do) when switching a TabStrip or clicking a RadioButton.

When the user clicks the respective UI element, a binary data stream is generated. For this data stream, the appropriate URL is generated and the result is displayed in a separate browser window.

Features

For both cases, whether to export a single file or several files, the same ways of displaying and storing the file(s) exist:

· Display in the same window

Example:
This graphic is explained in the accompanying text

· Save query in the same window

Example:
This graphic is explained in the accompanying text

· Display in a separate window

· Save query in a separate window

With the MS Internet Explorer, the Save query for several files does work only with the external window. Therefore, simultaneously downloading several files is always done via external windows.

Activities

Use the method ATTACH_FILE_TO_RESPONSE of class CL_WD_RUNTIME_SERVICES for the file export.

Example

For an example for the file export via a button, see the component WDR_TEST_EVENTS in the view Button. The area to the right contains the test example for all eight cases in the bottom group.

No comments:

Archive