Example of Print Process via Processor Class:
" Creation of dox42 instance with Template Id 'HELLO_WORLD'
DATA(dox42_template) = /cadaxo/cl_d42_manager=>create_template_instance( 'HELLO_WORLD' ).
" Create Instance of the Document Class
DATA(dox42_document) = dox42_template->create_document( ).
"Create Instance of the Document Class
DATA lr_processor_print type ref to /cadaxo/cl_d42_proc_print.
"Create Instance of the Process Class with desired Type
lr_processor_print ?= lr_dox42_document->get_processor( i_type = 'PRINT' ).
"Call Processor method
lr_processor_print->print(
EXPORTING i_destination = 'OFFICE_PRINTER'
).Alternatively, it is also possible to call the execute method of the interface. The result will be the same as in the example above.
" Creation of dox42 instance with Template Id 'HELLO_WORLD'
DATA(dox42_template) =
/cadaxo/cl_d42_manager=>create_template_instance( 'HELLO_WORLD' ).
"Create Instance of the Document Class
DATA(dox42_document) = dox42_template->create_document( ).
"Create Instance of the Document Class
DATA lr_processor_print type ref to /cadaxo/cl_d42_proc_print.
"Create Instance of the Process Class with desired Type
lr_processor_print ?= lr_dox42_document->get_processor( i_type = 'PRINT' ).
"Set Parameters via SET methods
lr_processor_print->set_destination( 'OFFICE_PRINTER' ).
lr_processor_print->set_immediate_print( abap_true ).
"Call execute method of the interface
lr_processor_print->/cadaxo/if_d42_processor~execute( ).
For other examples see the Report: /CADAXO/D42_DEMO_HELLO_WORLD