SAP CMX_TOOLS_FM_GET_BATCH_CLASS Function Module for NOTRANSL: Liefert Merkmalswerte einer klassifizierten Charge
CMX_TOOLS_FM_GET_BATCH_CLASS is a standard cmx tools fm get batch class 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: Liefert Merkmalswerte einer klassifizierten Charge 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 cmx tools fm get batch class FM, simply by entering the name CMX_TOOLS_FM_GET_BATCH_CLASS into the relevant SAP transaction such as SE37 or SE38.
Function Group: CMX_TOOLS_FM
Program Name: SAPLCMX_TOOLS_FM
Main Program: SAPLCMX_TOOLS_FM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CMX_TOOLS_FM_GET_BATCH_CLASS 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 'CMX_TOOLS_FM_GET_BATCH_CLASS'"NOTRANSL: Liefert Merkmalswerte einer klassifizierten Charge.
EXPORTING
IV_BATCH = "Batch Number
IV_MATNR = "Material Number
IV_PLANT = "Plant
IMPORTING
ET_CHAR_DESCR = "
ET_CHAR_OPERA = "
ET_CHAR_VAL_UOM = "
EXCEPTIONS
NO_CLASSIFICATION = 1 NO_CLASSTYPES = 2
IMPORTING Parameters details for CMX_TOOLS_FM_GET_BATCH_CLASS
IV_BATCH - Batch Number
Data type: MCHA-CHARGOptional: No
Call by Reference: Yes
IV_MATNR - Material Number
Data type: MCHA-MATNROptional: No
Call by Reference: Yes
IV_PLANT - Plant
Data type: MCHA-WERKSOptional: No
Call by Reference: Yes
EXPORTING Parameters details for CMX_TOOLS_FM_GET_BATCH_CLASS
ET_CHAR_DESCR -
Data type: CMX_TOOLS_T_CHAR30Optional: No
Call by Reference: Yes
ET_CHAR_OPERA -
Data type: CMX_TOOLS_T_CHAR30Optional: No
Call by Reference: Yes
ET_CHAR_VAL_UOM -
Data type: CMX_TOOLS_T_CHAR30Optional: No
Call by Reference: Yes
EXCEPTIONS details
NO_CLASSIFICATION -
Data type:Optional: No
Call by Reference: Yes
NO_CLASSTYPES -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CMX_TOOLS_FM_GET_BATCH_CLASS 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_iv_batch | TYPE MCHA-CHARG, " | |||
| lv_et_char_descr | TYPE CMX_TOOLS_T_CHAR30, " | |||
| lv_no_classification | TYPE CMX_TOOLS_T_CHAR30, " | |||
| lv_iv_matnr | TYPE MCHA-MATNR, " | |||
| lv_et_char_opera | TYPE CMX_TOOLS_T_CHAR30, " | |||
| lv_no_classtypes | TYPE CMX_TOOLS_T_CHAR30, " | |||
| lv_iv_plant | TYPE MCHA-WERKS, " | |||
| lv_et_char_val_uom | TYPE CMX_TOOLS_T_CHAR30. " |
|   CALL FUNCTION 'CMX_TOOLS_FM_GET_BATCH_CLASS' "NOTRANSL: Liefert Merkmalswerte einer klassifizierten Charge |
| EXPORTING | ||
| IV_BATCH | = lv_iv_batch | |
| IV_MATNR | = lv_iv_matnr | |
| IV_PLANT | = lv_iv_plant | |
| IMPORTING | ||
| ET_CHAR_DESCR | = lv_et_char_descr | |
| ET_CHAR_OPERA | = lv_et_char_opera | |
| ET_CHAR_VAL_UOM | = lv_et_char_val_uom | |
| EXCEPTIONS | ||
| NO_CLASSIFICATION = 1 | ||
| NO_CLASSTYPES = 2 | ||
| . " CMX_TOOLS_FM_GET_BATCH_CLASS | ||
ABAP code using 7.40 inline data declarations to call FM CMX_TOOLS_FM_GET_BATCH_CLASS
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 CHARG FROM MCHA INTO @DATA(ld_iv_batch). | ||||
| "SELECT single MATNR FROM MCHA INTO @DATA(ld_iv_matnr). | ||||
| "SELECT single WERKS FROM MCHA INTO @DATA(ld_iv_plant). | ||||
Search for further information about these or an SAP related objects