SAP LOAN_MESSAGES_WRITE_MESSAGE Function Module for FM for Issuing an Error Message, for Example: 'E 999 (ZZ): Text'









LOAN_MESSAGES_WRITE_MESSAGE is a standard loan messages write message SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for FM for Issuing an Error Message, for Example: 'E 999 (ZZ): Text' processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for loan messages write message FM, simply by entering the name LOAN_MESSAGES_WRITE_MESSAGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: TRMH
Program Name: SAPLTRMH
Main Program: SAPLTRMH
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function LOAN_MESSAGES_WRITE_MESSAGE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'LOAN_MESSAGES_WRITE_MESSAGE'"FM for Issuing an Error Message, for Example: 'E 999 (ZZ): Text'
EXPORTING
* I_MSGID = ' ' "
* I_MSGNO = ' ' "
* I_MSGTY = ' ' "
* I_INDENT = 0 "
* I_DELIM = "
* I_TRUE_' 'S = "
I_STRING = "
* I_LINSZ = SY-LINSZ "
* I_FLG_MSGID_C20 = ' ' "Checkbox
.



IMPORTING Parameters details for LOAN_MESSAGES_WRITE_MESSAGE

I_MSGID -

Data type: SY-MSGID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MSGNO -

Data type: SY-MSGNO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MSGTY -

Data type: SY-MSGTY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_INDENT -

Data type: SY-COLNO
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DELIM -

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TRUE_SPACES -

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_STRING -

Data type: TRLOMESG-TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

I_LINSZ -

Data type: SY-LINSZ
Default: SY-LINSZ
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_MSGID_C20 - Checkbox

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for LOAN_MESSAGES_WRITE_MESSAGE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_i_msgid  TYPE SY-MSGID, "   SPACE
lv_i_msgno  TYPE SY-MSGNO, "   SPACE
lv_i_msgty  TYPE SY-MSGTY, "   SPACE
lv_i_indent  TYPE SY-COLNO, "   0
lv_i_delim  TYPE SY, "   
lv_i_true_spaces  TYPE SY, "   
lv_i_string  TYPE TRLOMESG-TEXT, "   
lv_i_linsz  TYPE SY-LINSZ, "   SY-LINSZ
lv_i_flg_msgid_c20  TYPE XFELD. "   SPACE

  CALL FUNCTION 'LOAN_MESSAGES_WRITE_MESSAGE'  "FM for Issuing an Error Message, for Example: 'E 999 (ZZ): Text'
    EXPORTING
         I_MSGID = lv_i_msgid
         I_MSGNO = lv_i_msgno
         I_MSGTY = lv_i_msgty
         I_INDENT = lv_i_indent
         I_DELIM = lv_i_delim
         I_TRUE_SPACES = lv_i_true_spaces
         I_STRING = lv_i_string
         I_LINSZ = lv_i_linsz
         I_FLG_MSGID_C20 = lv_i_flg_msgid_c20
. " LOAN_MESSAGES_WRITE_MESSAGE




ABAP code using 7.40 inline data declarations to call FM LOAN_MESSAGES_WRITE_MESSAGE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single MSGID FROM SY INTO @DATA(ld_i_msgid).
DATA(ld_i_msgid) = ' '.
 
"SELECT single MSGNO FROM SY INTO @DATA(ld_i_msgno).
DATA(ld_i_msgno) = ' '.
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_i_msgty).
DATA(ld_i_msgty) = ' '.
 
"SELECT single COLNO FROM SY INTO @DATA(ld_i_indent).
 
 
 
"SELECT single TEXT FROM TRLOMESG INTO @DATA(ld_i_string).
 
"SELECT single LINSZ FROM SY INTO @DATA(ld_i_linsz).
DATA(ld_i_linsz) = SY-LINSZ.
 
DATA(ld_i_flg_msgid_c20) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!