BCS Document
Definition
Use
If an object is to be sent using BCS, it must be created as a BCS document. This means that an instance of a class has to be created, which implements the interface IF_DOCUMENT_BCS.
Features
Classes already exist whose constructors you can use to create BCS documents. BCS provides the class CL_DOCUMENT_BCS, which is used to create Business Workplace documents. (For information about using this class, see CL_DOCUMENT_BCS).
Example
Below is an example of creating a text document as a BCS document then passing the document to a send request, which has to have been created beforehand.
DATA: text TYPE bcsy_text.
DATA: document TYPE REF TO cl_document_bcs.
* Fill ITAB with text lines
APPEND 'Hello world!' TO text.
* Create document from ITAB
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = text
i_subject = 'Test...' ).
* Add document to send request
CALL METHOD send_request->set_document( document ).