SAP Function Modules

CM_F_PROTOCOL_PRINT SAP Function module







CM_F_PROTOCOL_PRINT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CM_F_PROTOCOL_PRINT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CMFE
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CM_F_PROTOCOL_PRINT - CM F PROTOCOL PRINT





CALL FUNCTION 'CM_F_PROTOCOL_PRINT' "
* EXPORTING
*   aplid = SPACE               " tcmf6-aplid
*   aplid = SPACE               " tcmf6-aplid   Application ID for access to control parameters
*   headline = SPACE            "               Heading for list printout of messages
*   new_list_id = 'X'           " xflag
*   only_msgtyp = SPACE         " sy-msgty      Print messages only for a specific message type
*   with_info = 'X'             " xflag         Print messages and general information
*   alv_variant = '1'           " slis_vari
*   print_parameter_dialog = 'X'  " c
*   additional_info =           " cmfaddinfo
  EXCEPTIONS
    NOT_ACTIVE = 1              "               Error management is not active
    NO_PROTOCOL = 2             "               No messages exist
    .  "  CM_F_PROTOCOL_PRINT

ABAP code example for Function Module CM_F_PROTOCOL_PRINT





The ABAP code below is a full code listing to execute function module CM_F_PROTOCOL_PRINT including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

 

SELECT single APLID
FROM TCMF6
INTO @DATA(ld_aplid).


SELECT single APLID
FROM TCMF6
INTO @DATA(ld_aplid).

DATA(ld_headline) = 'some text here'.
DATA(ld_new_list_id) = 'Check type of data required'.
DATA(ld_only_msgtyp) = 'some text here'.
DATA(ld_with_info) = 'some text here'.
DATA(ld_alv_variant) = 'some text here'.
DATA(ld_print_parameter_dialog) = 'some text here'.
DATA(ld_additional_info) = 'some text here'. . CALL FUNCTION 'CM_F_PROTOCOL_PRINT' * EXPORTING * aplid = ld_aplid * aplid = ld_aplid * headline = ld_headline * new_list_id = ld_new_list_id * only_msgtyp = ld_only_msgtyp * with_info = ld_with_info * alv_variant = ld_alv_variant * print_parameter_dialog = ld_print_parameter_dialog * additional_info = ld_additional_info EXCEPTIONS NOT_ACTIVE = 1 NO_PROTOCOL = 2 . " CM_F_PROTOCOL_PRINT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_aplid  TYPE TCMF6-APLID ,
ld_aplid  TYPE TCMF6-APLID ,
ld_headline  TYPE STRING ,
ld_new_list_id  TYPE XFLAG ,
ld_only_msgtyp  TYPE SY-MSGTY ,
ld_with_info  TYPE XFLAG ,
ld_alv_variant  TYPE SLIS_VARI ,
ld_print_parameter_dialog  TYPE C ,
ld_additional_info  TYPE CMFADDINFO .


SELECT single APLID
FROM TCMF6
INTO ld_aplid.


SELECT single APLID
FROM TCMF6
INTO ld_aplid.

ld_headline = 'some text here'.
ld_new_list_id = 'some text here'.
ld_only_msgtyp = 'some text here'.
ld_with_info = 'some text here'.
ld_alv_variant = 'some text here'.
ld_print_parameter_dialog = 'some text here'.
ld_additional_info = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CM_F_PROTOCOL_PRINT or its description.