Output of XML Documents


You want to send an XML document generated by SAP Smart Forms (XSF or XDF) to spool processing, in order to store it as a local file. You usually do this for test purposes or to display the document in the tree structure of a Web browser.


When XML documents are sent to spool processing, SAP Smart Forms uses binary format. If you store such a spool request as text using the export functions of the spool output control (transaction SP01), the export function inserts line breaks. As a result of these line breaks, the exported file often no longer corresponds to the XML conventions and, consequently, cannot be displayed in the browser.

This spool output control function is therefore not suitable for exporting binary data. Nevertheless, you can use device types for frontend printing to store the binary file on your local machine.

Process Flow


       1.      You need an output device with coupling type F. If such a device does not exist in your system, contact your system administrator. For information on how to set up such a device type, see Definition of Frontend Printers. When printing with this device type, output is forwarded to a printer demon (depending on the operating system, this can be another program).

       2.      As the frontend printer on your PC, set up a printer that diverts the output into a file. Under Windows NT, for example, you have to define a printer that uses the FILE: port.

This is only one possible procedure. There are other coupling types that you can use to divert output from the spool into a file. For more information, see SAP Printing Guide (BC-CCM-PRN).