Show TOC

 Outputting Correspondence Requests

Use

For your application, you want to create a correspondence output run that outputs the correspondence requests stored in the correspondence containers.

Prerequisites

The correspondence requests are stored in the correspondence container.

You created application-specific events for your application, as described in Outputting a Single Correspondence Request .

The system settings for the correspondence type and the control parameters needed for creating the correspondence are made.

Procedure

There are two types of output for correspondence requests: delayed and immediate.

For delayed output, the correspondence request is created and output in different LUWs. You create a report that allows the correspondence requests to be output in a mass run.

Calling function module FKKCORR_PRINT_DFKKCOH_SET with the buffering type No Buffering makes it possible to have delayed output of correspondence requests without reducing performance. There are a number of parameters available for selecting the correspondence requests for output from the database. In addition, you can use the custom selections. This enables you to also select fields that you added by enhancing the correspondence header.

If you want database changes to be made in the update task, you can do so by calling the IF_FKK_CORR_BUFFER_HANDLER~SET_IN_UPDATE_TASK method of the buffer handler. This setting is valid within an LUW and has to be made again, if necessary. You can use the CL_FKK_CORR_PERSISTENCE=>GET_BUFFER_HANDLER_INTERFACE class method to make a reference available to the buffer handler.

Sequence Diagram 3: Delayed Output of Correspondence Requests

For immediate output, both steps are executed in the same LUW, whereby you first create all correspondence requests and then output them all together. To prevent unnecessary database accesses and to make it possible to make database changes in the update task, use the buffer model with instance management.

Since the buffer is already active due to the creation of the correspondence requests, it is not necessary to enter the buffering type when calling function module FKKCORR_PRINT_DFKKCOH_SET for outputting correspondence requests. All correspondence requests that are in the global buffer (meaning they are confirmed) are output. The setting that the database changes are updated is also adopted from the creation of the correspondence requests. With this variant, you can also call the IF_FKK_CORR_BUFFER_HANDLER~SET_SORT_BY_SENDCONTROL method. This tells the buffer handler to sort the correspondence requests before they are output by send control. Doing so minimizes the number of different spool requests.

Sequence Diagram 4: Immediate Output of Correspondence Requests

Result

Correspondence was created.

Example

For an example of delayed output, see report RFKKCO00.

The form CORR_PRINT in report RFKKCORR_EXP_CREATE_REQUEST contains an example for immediate output of the correspondence container of a correspondence request.