SAP Function Modules

HRIQ_APPEND_SYS_MESSAGE_TABLE SAP Function module - Fill error message to BAPIRET2 internal table with SY structure







HRIQ_APPEND_SYS_MESSAGE_TABLE 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 HRIQ_APPEND_SYS_MESSAGE_TABLE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HRIQ_APPEND_SYS_MESSAGE_TABLE - HRIQ APPEND SYS MESSAGE TABLE





CALL FUNCTION 'HRIQ_APPEND_SYS_MESSAGE_TABLE' "Fill error message to BAPIRET2 internal table with SY structure
* EXPORTING
*   iv_msgty =                  " sy-msgty      abweichender Message Type
*   iv_log_no = SPACE           " bapireturn-log_no  Application log: log number
*   iv_log_msg_no = SPACE       " bapireturn-log_msg_no  Application log: Internal message serial number
*   iv_parameter =              " bapiret2-parameter  Parameter name
*   iv_row = 0                  " bapiret2-row  Lines in parameter
*   iv_field =                  " bapiret2-field  Field in parameter
  CHANGING
    ct_return =                 " bapiret2_t    Return parameter
    .  "  HRIQ_APPEND_SYS_MESSAGE_TABLE

ABAP code example for Function Module HRIQ_APPEND_SYS_MESSAGE_TABLE





The ABAP code below is a full code listing to execute function module HRIQ_APPEND_SYS_MESSAGE_TABLE 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).


DATA(ld_ct_return) = 'Check type of data required'.
DATA(ld_iv_msgty) = 'some text here'.

DATA(ld_iv_log_no) = some text here

DATA(ld_iv_log_msg_no) = Check type of data required

DATA(ld_iv_parameter) = some text here

DATA(ld_iv_row) = 123

DATA(ld_iv_field) = some text here . CALL FUNCTION 'HRIQ_APPEND_SYS_MESSAGE_TABLE' * EXPORTING * iv_msgty = ld_iv_msgty * iv_log_no = ld_iv_log_no * iv_log_msg_no = ld_iv_log_msg_no * iv_parameter = ld_iv_parameter * iv_row = ld_iv_row * iv_field = ld_iv_field CHANGING ct_return = ld_ct_return . " HRIQ_APPEND_SYS_MESSAGE_TABLE
IF SY-SUBRC EQ 0. "All OK 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_ct_return  TYPE BAPIRET2_T ,
ld_iv_msgty  TYPE SY-MSGTY ,
ld_iv_log_no  TYPE BAPIRETURN-LOG_NO ,
ld_iv_log_msg_no  TYPE BAPIRETURN-LOG_MSG_NO ,
ld_iv_parameter  TYPE BAPIRET2-PARAMETER ,
ld_iv_row  TYPE BAPIRET2-ROW ,
ld_iv_field  TYPE BAPIRET2-FIELD .

ld_ct_return = 'some text here'.
ld_iv_msgty = 'some text here'.

ld_iv_log_no = some text here

ld_iv_log_msg_no = Check type of data required

ld_iv_parameter = some text here

ld_iv_row = 123

ld_iv_field = 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 HRIQ_APPEND_SYS_MESSAGE_TABLE or its description.