SAP PTRM_UTIL_MESSAGE_APPEND Function Module for Add Message









PTRM_UTIL_MESSAGE_APPEND is a standard ptrm util message append SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Add Message 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 ptrm util message append FM, simply by entering the name PTRM_UTIL_MESSAGE_APPEND into the relevant SAP transaction such as SE37 or SE38.

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



Function PTRM_UTIL_MESSAGE_APPEND 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 'PTRM_UTIL_MESSAGE_APPEND'"Add Message
EXPORTING
I_MSGTYPE = "Messages, Message Type
* I_ROW = "Line in Parameter
* I_CONTEXT = "Comment
* I_WARNING_ONLY_ONCE = 'X' "
* I_LANGUAGE = "Language Key
I_MSGID = "Messages, Message Class
I_MSGNUMBER = "Messages, Message Number
* I_MSGV1 = "Messages, Message Variable 1
* I_MSGV2 = "Messages, Message Variable 2
* I_MSGV3 = "Messages, Message Variable 3
* I_MSGV4 = "Messages, Message Variable 4
* I_PARAMETER = "Parameter Name
* I_FIELD = "Field in Parameter

CHANGING
* IT_ERROR_FIELD = "Field List for Message Handling
.



IMPORTING Parameters details for PTRM_UTIL_MESSAGE_APPEND

I_MSGTYPE - Messages, Message Type

Data type: SYMSGTY
Optional: No
Call by Reference: Yes

I_ROW - Line in Parameter

Data type: BAPI_LINE
Optional: Yes
Call by Reference: Yes

I_CONTEXT - Comment

Data type: CHAR50
Optional: Yes
Call by Reference: Yes

I_WARNING_ONLY_ONCE -

Data type: CHAR1
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_LANGUAGE - Language Key

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

I_MSGID - Messages, Message Class

Data type: SYMSGID
Optional: No
Call by Reference: Yes

I_MSGNUMBER - Messages, Message Number

Data type: SYMSGNO
Optional: No
Call by Reference: Yes

I_MSGV1 - Messages, Message Variable 1

Data type: ANY
Optional: Yes
Call by Reference: Yes

I_MSGV2 - Messages, Message Variable 2

Data type: ANY
Optional: Yes
Call by Reference: Yes

I_MSGV3 - Messages, Message Variable 3

Data type: ANY
Optional: Yes
Call by Reference: Yes

I_MSGV4 - Messages, Message Variable 4

Data type: ANY
Optional: Yes
Call by Reference: Yes

I_PARAMETER - Parameter Name

Data type: BAPI_PARAM
Optional: Yes
Call by Reference: Yes

I_FIELD - Field in Parameter

Data type: BAPI_FLD
Optional: Yes
Call by Reference: Yes

CHANGING Parameters details for PTRM_UTIL_MESSAGE_APPEND

IT_ERROR_FIELD - Field List for Message Handling

Data type: PTRV_UTIL_ERROR_FIELD_T
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for PTRM_UTIL_MESSAGE_APPEND 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_msgtype  TYPE SYMSGTY, "   
lv_it_error_field  TYPE PTRV_UTIL_ERROR_FIELD_T, "   
lv_i_row  TYPE BAPI_LINE, "   
lv_i_context  TYPE CHAR50, "   
lv_i_warning_only_once  TYPE CHAR1, "   'X'
lv_i_language  TYPE BAPITRVXXX-LANGU, "   
lv_i_msgid  TYPE SYMSGID, "   
lv_i_msgnumber  TYPE SYMSGNO, "   
lv_i_msgv1  TYPE ANY, "   
lv_i_msgv2  TYPE ANY, "   
lv_i_msgv3  TYPE ANY, "   
lv_i_msgv4  TYPE ANY, "   
lv_i_parameter  TYPE BAPI_PARAM, "   
lv_i_field  TYPE BAPI_FLD. "   

  CALL FUNCTION 'PTRM_UTIL_MESSAGE_APPEND'  "Add Message
    EXPORTING
         I_MSGTYPE = lv_i_msgtype
         I_ROW = lv_i_row
         I_CONTEXT = lv_i_context
         I_WARNING_ONLY_ONCE = lv_i_warning_only_once
         I_LANGUAGE = lv_i_language
         I_MSGID = lv_i_msgid
         I_MSGNUMBER = lv_i_msgnumber
         I_MSGV1 = lv_i_msgv1
         I_MSGV2 = lv_i_msgv2
         I_MSGV3 = lv_i_msgv3
         I_MSGV4 = lv_i_msgv4
         I_PARAMETER = lv_i_parameter
         I_FIELD = lv_i_field
    CHANGING
         IT_ERROR_FIELD = lv_it_error_field
. " PTRM_UTIL_MESSAGE_APPEND




ABAP code using 7.40 inline data declarations to call FM PTRM_UTIL_MESSAGE_APPEND

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.

 
 
 
 
DATA(ld_i_warning_only_once) = 'X'.
 
"SELECT single LANGU FROM BAPITRVXXX INTO @DATA(ld_i_language).
 
 
 
 
 
 
 
 
 


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!