Method PRINT

Use

This method enables output of BRF object definitions on a printer. Smart forms are the medium used.

You must implement the PRINT method if you want to do the following:

  • Implement an own expression type or an own action type, and

  • Print the definition of your BRF object

    In contrast to all other methods, you may not call the PRINT method of the super-class here.

Sample source text:

Only the main parts of the source text are mentioned below.

METHOD if_maintenance_brf~print .

DATA lv_function_module TYPE rs38l_fnam.

* --- get function module from smart form name

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = if_maintenance_brf~mv_smartform_name

IMPORTING

fm_name = lv_function_module.

DATA: lt_text TYPE TABLE OF tline,

lv_text TYPE tline.

DATA lt_text_doc TYPE tsfotabl.

CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'

TABLES

text_stream = mt_text_doc

itf_text = lt_text.

LOOP AT lt_text INTO lv_text.

APPEND lv_text-tdline TO lt_text_doc.

ENDLOOP.

CALL FUNCTION lv_function_module

EXPORTING

* !!! SSF parameters !!!

control_parameters = is_control_parameters

output_options = is_output_options

user_settings = is_control_parameters-no_dialog

* !!! BRF parameters !!!

is_brf150 = ds_brf150

it_text_doc = lt_text_doc

is_brf142 = ds_brf142

it_brf144 = dt_brf144

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

ENDMETHOD.

Description:

You can deduce the following basic procedure from the source text:

  1. Creation of a suitable smart form (transaction SMARTFORMS).

    You can use the smart form BRF_VALUE_REQUEST_TABLE as an example.

  2. Determination of the generated function module for the specified smart form.

    The name of the smart form is assigned in the Constructor method.

  3. Call of the generated function module and transfer of data (SCR structures or SCR tables)