SAP OGV9_OGDM_MESSAGE_ADD Function Module for Add message to error log
OGV9_OGDM_MESSAGE_ADD is a standard ogv9 ogdm message add 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 to error log 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 ogv9 ogdm message add FM, simply by entering the name OGV9_OGDM_MESSAGE_ADD into the relevant SAP transaction such as SE37 or SE38.
Function Group: OGDM
Program Name: SAPLOGDM
Main Program: SAPLOGDM
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OGV9_OGDM_MESSAGE_ADD 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 'OGV9_OGDM_MESSAGE_ADD'"Add message to error log.
EXPORTING
* IP_VBELN = "SD sales Document number
* IP_COUNTER_INIT = "'X' to init message counter manuell
* IP_SUBRC = "returncode
* IP_MSGTY = "message type
* IP_MSGID = "message id
* IP_MSGNO = "message number
* IP_MSGV1 = "message variable 1
* IP_MSGV2 = "message variable 2
* IP_MSGV3 = "message variable 3
* IP_MSGV4 = "message variable 4
TABLES
* CT_MESSLOG = "message log
* FVBFS = "
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLOGDM_001 OGM10001 - Modify configuration in order release
IMPORTING Parameters details for OGV9_OGDM_MESSAGE_ADD
IP_VBELN - SD sales Document number
Data type: VBAK-VBELNOptional: Yes
Call by Reference: No ( called with pass by value option)
IP_COUNTER_INIT - 'X' to init message counter manuell
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_SUBRC - returncode
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGTY - message type
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGID - message id
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGNO - message number
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGV1 - message variable 1
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGV2 - message variable 2
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGV3 - message variable 3
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MSGV4 - message variable 4
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for OGV9_OGDM_MESSAGE_ADD
CT_MESSLOG - message log
Data type: ROGMESSLOGOptional: Yes
Call by Reference: No ( called with pass by value option)
FVBFS -
Data type: VBFSOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OGV9_OGDM_MESSAGE_ADD 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_ip_vbeln | TYPE VBAK-VBELN, " | |||
| lt_ct_messlog | TYPE STANDARD TABLE OF ROGMESSLOG, " | |||
| lv_ip_counter_init | TYPE ROGMESSLOG, " | |||
| lt_fvbfs | TYPE STANDARD TABLE OF VBFS, " | |||
| lv_ip_subrc | TYPE VBFS, " | |||
| lv_ip_msgty | TYPE VBFS, " | |||
| lv_ip_msgid | TYPE VBFS, " | |||
| lv_ip_msgno | TYPE VBFS, " | |||
| lv_ip_msgv1 | TYPE VBFS, " | |||
| lv_ip_msgv2 | TYPE VBFS, " | |||
| lv_ip_msgv3 | TYPE VBFS, " | |||
| lv_ip_msgv4 | TYPE VBFS. " |
|   CALL FUNCTION 'OGV9_OGDM_MESSAGE_ADD' "Add message to error log |
| EXPORTING | ||
| IP_VBELN | = lv_ip_vbeln | |
| IP_COUNTER_INIT | = lv_ip_counter_init | |
| IP_SUBRC | = lv_ip_subrc | |
| IP_MSGTY | = lv_ip_msgty | |
| IP_MSGID | = lv_ip_msgid | |
| IP_MSGNO | = lv_ip_msgno | |
| IP_MSGV1 | = lv_ip_msgv1 | |
| IP_MSGV2 | = lv_ip_msgv2 | |
| IP_MSGV3 | = lv_ip_msgv3 | |
| IP_MSGV4 | = lv_ip_msgv4 | |
| TABLES | ||
| CT_MESSLOG | = lt_ct_messlog | |
| FVBFS | = lt_fvbfs | |
| . " OGV9_OGDM_MESSAGE_ADD | ||
ABAP code using 7.40 inline data declarations to call FM OGV9_OGDM_MESSAGE_ADD
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 VBELN FROM VBAK INTO @DATA(ld_ip_vbeln). | ||||
Search for further information about these or an SAP related objects