SAP CBRC_LIB_WRITE_MESSAGES Function Module for NOTRANSL: Sichern von Meldungen









CBRC_LIB_WRITE_MESSAGES is a standard cbrc lib write messages SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Sichern von Meldungen 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 cbrc lib write messages FM, simply by entering the name CBRC_LIB_WRITE_MESSAGES into the relevant SAP transaction such as SE37 or SE38.

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



Function CBRC_LIB_WRITE_MESSAGES 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 'CBRC_LIB_WRITE_MESSAGES'"NOTRANSL: Sichern von Meldungen
EXPORTING
I_OBJECT = "Application Log: Object Name (Application Code)
* I_SUBOBJECT = "Application Log: Subobject
* I_LOGHEADER = "Application Log: APPL_LOG_WRITE_HEADER interface
* I_EXT_NUMBER = "Application Log: External Identification
* I_ALDATE_DEL = "Application Log: Expiry Date
* I_SAVE = TRUE "

IMPORTING
E_LOGHANDLE = "Application Log: Log Handle
E_LOGNUMBER = "Application Log: Log Number

TABLES
IT_ERROR_MSG = "Application Log: APPL_LOG_WRITE_MESSAGES interface

EXCEPTIONS
LOG_NOT_FOUND = 1 SAVE_NOT_ALLOWED = 2 NUMBERING_ERROR = 3
.



IMPORTING Parameters details for CBRC_LIB_WRITE_MESSAGES

I_OBJECT - Application Log: Object Name (Application Code)

Data type: BALHDR-OBJECT
Optional: No
Call by Reference: Yes

I_SUBOBJECT - Application Log: Subobject

Data type: BALHDR-SUBOBJECT
Optional: Yes
Call by Reference: Yes

I_LOGHEADER - Application Log: APPL_LOG_WRITE_HEADER interface

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

I_EXT_NUMBER - Application Log: External Identification

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

I_ALDATE_DEL - Application Log: Expiry Date

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

I_SAVE -

Data type: ESP1_BOOLEAN
Default: TRUE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CBRC_LIB_WRITE_MESSAGES

E_LOGHANDLE - Application Log: Log Handle

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

E_LOGNUMBER - Application Log: Log Number

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

TABLES Parameters details for CBRC_LIB_WRITE_MESSAGES

IT_ERROR_MSG - Application Log: APPL_LOG_WRITE_MESSAGES interface

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

EXCEPTIONS details

LOG_NOT_FOUND - Log not found

Data type:
Optional: No
Call by Reference: Yes

SAVE_NOT_ALLOWED - Cannot Save

Data type:
Optional: No
Call by Reference: Yes

NUMBERING_ERROR - Error during number assignment

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CBRC_LIB_WRITE_MESSAGES 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_object  TYPE BALHDR-OBJECT, "   
lv_e_loghandle  TYPE BALLOGHNDL, "   
lt_it_error_msg  TYPE STANDARD TABLE OF BALMI, "   
lv_log_not_found  TYPE BALMI, "   
lv_e_lognumber  TYPE BALOGNR, "   
lv_i_subobject  TYPE BALHDR-SUBOBJECT, "   
lv_save_not_allowed  TYPE BALHDR, "   
lv_i_logheader  TYPE BALHDRI, "   
lv_numbering_error  TYPE BALHDRI, "   
lv_i_ext_number  TYPE BALNREXT, "   
lv_i_aldate_del  TYPE ALDATE_DEL, "   
lv_i_save  TYPE ESP1_BOOLEAN. "   TRUE

  CALL FUNCTION 'CBRC_LIB_WRITE_MESSAGES'  "NOTRANSL: Sichern von Meldungen
    EXPORTING
         I_OBJECT = lv_i_object
         I_SUBOBJECT = lv_i_subobject
         I_LOGHEADER = lv_i_logheader
         I_EXT_NUMBER = lv_i_ext_number
         I_ALDATE_DEL = lv_i_aldate_del
         I_SAVE = lv_i_save
    IMPORTING
         E_LOGHANDLE = lv_e_loghandle
         E_LOGNUMBER = lv_e_lognumber
    TABLES
         IT_ERROR_MSG = lt_it_error_msg
    EXCEPTIONS
        LOG_NOT_FOUND = 1
        SAVE_NOT_ALLOWED = 2
        NUMBERING_ERROR = 3
. " CBRC_LIB_WRITE_MESSAGES




ABAP code using 7.40 inline data declarations to call FM CBRC_LIB_WRITE_MESSAGES

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 OBJECT FROM BALHDR INTO @DATA(ld_i_object).
 
 
 
 
 
"SELECT single SUBOBJECT FROM BALHDR INTO @DATA(ld_i_subobject).
 
 
 
 
 
 
DATA(ld_i_save) = TRUE.
 


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!