Entering content frameProgramming Interface for Printing Locate the document in its SAP Library structure

Initializing the Form Printout

To initialize the printing of forms via the Raw Data Interface, use function modules (OPEN_FORM und CLOSE_FORM) and a flag in the form (administration data). For this purpose, the function modules include the additional optional import parameter RAW_DATA_INTERFACE.

The Import Parameter RAW_DATA_INTERFACE

The values allowed for RAW_DATA_INTERFACE are ‘X’ (RDI), 'Space' (SAPscript form printout), ‘I’ (IDOC), and ‘*’ (default value). By default, the parameter is set to ‘*’. In this case, the flag in the form (form maintenance transaction SE71) determines, whether to print via the RDI or not. With OPEN_FORM, you can change the option for the current printout. If you set the parameter RAW_DATA_INTERFACE to ‘X’, the system prints via the Raw Data Interface, if you set it to 'Space', it doesn't.

If you do not specify a form with OPEN_FORM, you must at a later time call START_FORM. In this case, the form specified with START_FORM determines where to print, if for OPEN_FORM as well as for START_FORM the parameter RAW_DATA_INTERFACE is set to ‘*’. If you use 'X' or 'Space' with START_FORM, you can change the value set with the form, as described for OPEN_FORM. As with SAPscript form printing, you must always call the function module END_FORM after using START_FORM.

Switching Between RDI and SAPscript Form Printing

Since all documents printed after OPEN_FORM and before CLOSE_FORM are stored in one print request, you cannot switch between RDI and SAPscript form printing before reaching CLOSE_FORM. If you try to switch at START_FORM the system terminates processing and sends an A-type error message.

Compatibility

Downward compatibility is guaranteed, since the default values for the function modules let the form parameter determine whether to use the RDI or not. If the parameter in the form is not set, the system automatically triggers the "normal" SAPscript form printing.

You can display the output in the spool (transaction SP01). Each document starts with a header record, followed by any number of data records. The structure of these data records is described below.

Instead of using the spool, you can also transfer data as IDOC. However, only the print program can initiate this. It must set the parameter RAW_DATA_INTERFACE to ‘I’ ( Output Mode IDOC)

 

 

Leaving content frame