You want to offer end users the opportunity to check the effects of their entries for the correspondence recipient and the attributes of correspondence creation, independently of the correspondence creation function itself.
You created your own implementation of the event for determining the recipient BTE 44012020
using recipient determination of the correspondence tool.
If you want to offer recipient simulation in your application, use your recipient determination as a guide and proceed as follows:
Generate an instance for recipient determination (class CL_RCV_RECEIVER_ DETERMINATION
).
Determine the correspondence recipient and the parameters for controlling correspondence creation for the correspondence types that you want to simulate (from the data of your application).
Add the data for creating correspondence to this data by calling the CORRESPONDENCE_DATA_ENRICH
method of the class CL_RCV_RECEIVER_DETERMINATION
. Call this method for all correspondence types, for which you want recipient simulation to be executed.
To be able to indicate problems with the formatting of data, the system collects any errors that might occur in the message table of the CT_MESSAGES
parameter. The system tries to process the data as completely as possible.
Add to this data for each correspondence type and recipient group for the correspondence simulation by calling the SIMULATION_DATA_ENRICH
method of the class CL_RCV_RECEIVER_DETERMINATION
.
To be able to indicate problems with the formatting of data, the system collects any errors that might occur in the message table of the CT_MESSAGES
parameter. The system tries to process the data as completely as possible.
Generate an instance for recipient simulation (class CL_RCV_RECEIVER_SIMULATION
).
Modify the field catalog for the List Viewer Control
using the methods GET_FIELDCATALOG
and SET_FIELDCATALOG
of the class CL_RCV_RECEIVER_DETERMINATION
.
Trigger the display of the data of recipient simulation by calling the DISPLAY_SIMULATION
method of class CL_RCV_RECEIVER_DETERMINATION
.
Enter the instance for recipient simulation (class CL_RCV_RECEIVER_SIMULATION
).
Display any errors that occurred from the message table in a message log.
If you want to display multiple simulations or one or more simulations on a separate interface, then modify the program flow accordingly.
For the selected correspondence types, the system displays the correspondence recipients and the related attributes for controlling correspondence creation.
Recipient simulation is set up, for a correspondence type you can select, in report RFKKCORR_EXP_CREATE_REQUEST
in the RECEIVER_SIMULATION
form.
Since this is a test example, the correspondence recipient and the control attributes for generating correspondence are not retrieved from the contract. Instead, they are set in a global buffer by means of function module FKKCORR_EXP_EV_SET_RECEIVER
, and are taken from there during recipient determination.
The DISPLAY_SIMULATION
method displays the results in a dialog container, but this requires an active screen. For this reason, screen 100 is processed in the report. The results are displayed in this screen in a Custom Control. The example therefore is an example for integrating recipient determination in your own interface.