SAP K_MESSAGE_TRANSFORM Function Module for









K_MESSAGE_TRANSFORM is a standard k message transform SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 k message transform FM, simply by entering the name K_MESSAGE_TRANSFORM into the relevant SAP transaction such as SE37 or SE38.

Function Group: KABA
Program Name: SAPLKABA
Main Program: SAPLKABA
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K_MESSAGE_TRANSFORM 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 'K_MESSAGE_TRANSFORM'"
EXPORTING
* PAR_LANGU = SY-LANGU "Language indicator
PAR_MSGID = "Message class
PAR_MSGNO = "Message number
* PAR_MSGTY = "Message type
* PAR_MSGV1 = "Message variable 1
* PAR_MSGV2 = "Message variable 2
* PAR_MSGV3 = "Message variable 3
* PAR_MSGV4 = "Message variable 4
* PAR_TOTAL = "

IMPORTING
PAR_MSGTX = "Message as text

EXCEPTIONS
NO_MESSAGE_FOUND = 1 PAR_MSGID_MISSING = 2 PAR_MSGNO_MISSING = 3 PAR_MSGTY_MISSING = 4
.



IMPORTING Parameters details for K_MESSAGE_TRANSFORM

PAR_LANGU - Language indicator

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

PAR_MSGID - Message class

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

PAR_MSGNO - Message number

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

PAR_MSGTY - Message type

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

PAR_MSGV1 - Message variable 1

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

PAR_MSGV2 - Message variable 2

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

PAR_MSGV3 - Message variable 3

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

PAR_MSGV4 - Message variable 4

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

PAR_TOTAL -

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

EXPORTING Parameters details for K_MESSAGE_TRANSFORM

PAR_MSGTX - Message as text

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

EXCEPTIONS details

NO_MESSAGE_FOUND - Message not found

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

PAR_MSGID_MISSING - No message class specified

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

PAR_MSGNO_MISSING - No message number specified

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

PAR_MSGTY_MISSING - No message type specified

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

Copy and paste ABAP code example for K_MESSAGE_TRANSFORM 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_par_langu  TYPE SY-LANGU, "   SY-LANGU
lv_par_msgtx  TYPE SY, "   
lv_no_message_found  TYPE SY, "   
lv_par_msgid  TYPE SY-MSGID, "   
lv_par_msgid_missing  TYPE SY, "   
lv_par_msgno  TYPE SY-MSGNO, "   
lv_par_msgno_missing  TYPE SY, "   
lv_par_msgty  TYPE SY-MSGTY, "   
lv_par_msgty_missing  TYPE SY, "   
lv_par_msgv1  TYPE SY-MSGV1, "   
lv_par_msgv2  TYPE SY-MSGV2, "   
lv_par_msgv3  TYPE SY-MSGV3, "   
lv_par_msgv4  TYPE SY-MSGV4, "   
lv_par_total  TYPE KV042-XFELD. "   

  CALL FUNCTION 'K_MESSAGE_TRANSFORM'  "
    EXPORTING
         PAR_LANGU = lv_par_langu
         PAR_MSGID = lv_par_msgid
         PAR_MSGNO = lv_par_msgno
         PAR_MSGTY = lv_par_msgty
         PAR_MSGV1 = lv_par_msgv1
         PAR_MSGV2 = lv_par_msgv2
         PAR_MSGV3 = lv_par_msgv3
         PAR_MSGV4 = lv_par_msgv4
         PAR_TOTAL = lv_par_total
    IMPORTING
         PAR_MSGTX = lv_par_msgtx
    EXCEPTIONS
        NO_MESSAGE_FOUND = 1
        PAR_MSGID_MISSING = 2
        PAR_MSGNO_MISSING = 3
        PAR_MSGTY_MISSING = 4
. " K_MESSAGE_TRANSFORM




ABAP code using 7.40 inline data declarations to call FM K_MESSAGE_TRANSFORM

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 LANGU FROM SY INTO @DATA(ld_par_langu).
DATA(ld_par_langu) = SY-LANGU.
 
 
 
"SELECT single MSGID FROM SY INTO @DATA(ld_par_msgid).
 
 
"SELECT single MSGNO FROM SY INTO @DATA(ld_par_msgno).
 
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_par_msgty).
 
 
"SELECT single MSGV1 FROM SY INTO @DATA(ld_par_msgv1).
 
"SELECT single MSGV2 FROM SY INTO @DATA(ld_par_msgv2).
 
"SELECT single MSGV3 FROM SY INTO @DATA(ld_par_msgv3).
 
"SELECT single MSGV4 FROM SY INTO @DATA(ld_par_msgv4).
 
"SELECT single XFELD FROM KV042 INTO @DATA(ld_par_total).
 


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!