
If your application already sends documents using SAPscript, you can connect to the Business Communication Interface (BCI) indirectly.
Activities
In order to access the BCI using SAP script, the device type MAIL (that is, import parameter DEVICE = MAIL) must be set when you open form printing using the function module OPEN_FORM. The formatted document is then automatically transferred to the BCI and sent from there. The recipient is determined by the import parameter MAIL_RECIPIENT. This is (analogous to direct access to the BCI) a Recipient object.
Constraints
Only individual recipients can be specified as Recipient objects for the connection using SAPscript. Therefore, distribution lists, organizational units and so on, cannot be specified. The reason for this is that the formatting of documents by SAPscript is generally recipient-dependent.
Therefore, before calling SAPscript, break down the Recipient object using the Expand method, and call SAPscript for each recipient individually.
If you connect your application to the BCI using SAPscript, not all of the BCI functions are available. You can use the following functions:
Linking of the Application Object with the Document Sent
Activities
Transfer the ID of the application BOR object in the parameter MAIL_APPL_OBJECT.
Activities
Status confirmation by mail is set using the SetStatusInfoByMail method.
Status Confirmation by Events in the Application Object
Activities
Transfer the ID of the application BOR object in the parameter MAIL_APPL_OBJECT.
The application object must support the interface for the event triggered by the status confirmation.
Activities
Specify the sender in the import parameter MAIL_SENDER of the function module OPEN_FORM. The ID of a BOR object is expected.
Sample Report
The sample report RSSOKIF2 shows, in a simple example, which calls are necessary in order to send a fax to a fax number with the connection using SAPscript and the BCI. This includes the creation of a Recipient object as a recipient, the break down of the Recipient object into individual recipients using the Expand method and the specification of a sender as well as an application object ID.