SAP CBIF_GLM1_BATCH_READ Function Module for NOTRANSL: EHS: Daten zum Materialbeleg einlesen
CBIF_GLM1_BATCH_READ is a standard cbif glm1 batch read 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: EHS: Daten zum Materialbeleg einlesen 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 cbif glm1 batch read FM, simply by entering the name CBIF_GLM1_BATCH_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: CBIF_GLM1
Program Name: SAPLCBIF_GLM1
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CBIF_GLM1_BATCH_READ 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 'CBIF_GLM1_BATCH_READ'"NOTRANSL: EHS: Daten zum Materialbeleg einlesen.
EXPORTING
I_MATNR = "Material Number (18 Characters)
* I_WERK = "Plant
* I_CHARGE = "Batch Number
* I_FLG_GET_CLASS = "Read Classification Data
* I_FLG_CHECK_EXIST = "Existence Check
* I_FLG_BUFFER_READ = "Checkbox
IMPORTING
E_MCHA = "Batch data
E_CLASSNAME = "Class Number
TABLES
* X_CHAR_OF_BATCH = "Classification interface for batches
EXCEPTIONS
NO_BATCH_FOUND = 1
IMPORTING Parameters details for CBIF_GLM1_BATCH_READ
I_MATNR - Material Number (18 Characters)
Data type: MCHA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_WERK - Plant
Data type: MCHA-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHARGE - Batch Number
Data type: MCHA-CHARGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_GET_CLASS - Read Classification Data
Data type: AM07M-XSELKOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_CHECK_EXIST - Existence Check
Data type: AM07M-XSELKOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_BUFFER_READ - Checkbox
Data type: AM07M-XSELKOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CBIF_GLM1_BATCH_READ
E_MCHA - Batch data
Data type: MCHAOptional: No
Call by Reference: No ( called with pass by value option)
E_CLASSNAME - Class Number
Data type: KLAH-CLASSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CBIF_GLM1_BATCH_READ
X_CHAR_OF_BATCH - Classification interface for batches
Data type: CLBATCHOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_BATCH_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CBIF_GLM1_BATCH_READ 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_e_mcha | TYPE MCHA, " | |||
| lv_i_matnr | TYPE MCHA-MATNR, " | |||
| lv_no_batch_found | TYPE MCHA, " | |||
| lt_x_char_of_batch | TYPE STANDARD TABLE OF CLBATCH, " | |||
| lv_i_werk | TYPE MCHA-WERKS, " | |||
| lv_e_classname | TYPE KLAH-CLASS, " | |||
| lv_i_charge | TYPE MCHA-CHARG, " | |||
| lv_i_flg_get_class | TYPE AM07M-XSELK, " | |||
| lv_i_flg_check_exist | TYPE AM07M-XSELK, " | |||
| lv_i_flg_buffer_read | TYPE AM07M-XSELK. " |
|   CALL FUNCTION 'CBIF_GLM1_BATCH_READ' "NOTRANSL: EHS: Daten zum Materialbeleg einlesen |
| EXPORTING | ||
| I_MATNR | = lv_i_matnr | |
| I_WERK | = lv_i_werk | |
| I_CHARGE | = lv_i_charge | |
| I_FLG_GET_CLASS | = lv_i_flg_get_class | |
| I_FLG_CHECK_EXIST | = lv_i_flg_check_exist | |
| I_FLG_BUFFER_READ | = lv_i_flg_buffer_read | |
| IMPORTING | ||
| E_MCHA | = lv_e_mcha | |
| E_CLASSNAME | = lv_e_classname | |
| TABLES | ||
| X_CHAR_OF_BATCH | = lt_x_char_of_batch | |
| EXCEPTIONS | ||
| NO_BATCH_FOUND = 1 | ||
| . " CBIF_GLM1_BATCH_READ | ||
ABAP code using 7.40 inline data declarations to call FM CBIF_GLM1_BATCH_READ
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 MATNR FROM MCHA INTO @DATA(ld_i_matnr). | ||||
| "SELECT single WERKS FROM MCHA INTO @DATA(ld_i_werk). | ||||
| "SELECT single CLASS FROM KLAH INTO @DATA(ld_e_classname). | ||||
| "SELECT single CHARG FROM MCHA INTO @DATA(ld_i_charge). | ||||
| "SELECT single XSELK FROM AM07M INTO @DATA(ld_i_flg_get_class). | ||||
| "SELECT single XSELK FROM AM07M INTO @DATA(ld_i_flg_check_exist). | ||||
| "SELECT single XSELK FROM AM07M INTO @DATA(ld_i_flg_buffer_read). | ||||
Search for further information about these or an SAP related objects