SAP Function Modules

OIU_STORE_MESSAGE_HEADER SAP Function module - Store error message header







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

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


Pattern for FM OIU_STORE_MESSAGE_HEADER - OIU STORE MESSAGE HEADER





CALL FUNCTION 'OIU_STORE_MESSAGE_HEADER' "Store error message header
* EXPORTING
*   i_appl =                    " oiu_pr_dnstd-sub_system_cd  Application (PR, CA, VA, etc
*   i_ext_name =                " balhdri-extnumber  External  identification
*   i_doc_id =                  " balhdri-altext  Document used to display details
*   i_set_lvl =                 " balnri-lognumber  Get this log's last level number
*   i_restart =                 " c             Is this a restart?
* TABLES
*   t_params =                  " spar          Detail info
  EXCEPTIONS
    INVALID_APPL = 1            "               Invalid Application code
    EXT_NAME_MISSING = 2        "               External name is missing
    APPL_LOG_ERROR = 3          "               APPL_LOG function error
    .  "  OIU_STORE_MESSAGE_HEADER

ABAP code example for Function Module OIU_STORE_MESSAGE_HEADER





The ABAP code below is a full code listing to execute function module OIU_STORE_MESSAGE_HEADER 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:
it_t_params  TYPE STANDARD TABLE OF SPAR,"TABLES PARAM
wa_t_params  LIKE LINE OF it_t_params .


SELECT single SUB_SYSTEM_CD
FROM OIU_PR_DNSTD
INTO @DATA(ld_i_appl).


DATA(ld_i_ext_name) = some text here

DATA(ld_i_doc_id) = some text here

DATA(ld_i_set_lvl) = some text here
DATA(ld_i_restart) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_params to it_t_params. . CALL FUNCTION 'OIU_STORE_MESSAGE_HEADER' * EXPORTING * i_appl = ld_i_appl * i_ext_name = ld_i_ext_name * i_doc_id = ld_i_doc_id * i_set_lvl = ld_i_set_lvl * i_restart = ld_i_restart * TABLES * t_params = it_t_params EXCEPTIONS INVALID_APPL = 1 EXT_NAME_MISSING = 2 APPL_LOG_ERROR = 3 . " OIU_STORE_MESSAGE_HEADER
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 ELSEIF SY-SUBRC EQ 3. "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_i_appl  TYPE OIU_PR_DNSTD-SUB_SYSTEM_CD ,
it_t_params  TYPE STANDARD TABLE OF SPAR ,
wa_t_params  LIKE LINE OF it_t_params,
ld_i_ext_name  TYPE BALHDRI-EXTNUMBER ,
ld_i_doc_id  TYPE BALHDRI-ALTEXT ,
ld_i_set_lvl  TYPE BALNRI-LOGNUMBER ,
ld_i_restart  TYPE C .


SELECT single SUB_SYSTEM_CD
FROM OIU_PR_DNSTD
INTO ld_i_appl.


"populate fields of struture and append to itab
append wa_t_params to it_t_params.

ld_i_ext_name = some text here

ld_i_doc_id = some text here

ld_i_set_lvl = some text here
ld_i_restart = 'Check type of data required'.

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 OIU_STORE_MESSAGE_HEADER or its description.