SAP BATCH_CONVERSION_FACTOR Function Module for NOTRANSL: Chargenspezifische Umrechnung von Maßeinheiten (Klassifikation)
BATCH_CONVERSION_FACTOR is a standard batch conversion factor 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: Chargenspezifische Umrechnung von Maßeinheiten (Klassifikation) 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 batch conversion factor FM, simply by entering the name BATCH_CONVERSION_FACTOR into the relevant SAP transaction such as SE37 or SE38.
Function Group: MAME
Program Name: SAPLMAME
Main Program: SAPLMAME
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BATCH_CONVERSION_FACTOR 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 'BATCH_CONVERSION_FACTOR'"NOTRANSL: Chargenspezifische Umrechnung von Maßeinheiten (Klassifikation).
EXPORTING
I_CHARG = "Batch
* I_KZDWS = "
* I_CHARG_CUOBJ = ' ' "
I_WERKS = "Plant
I_MATNR = "Material
I_MEINS = "Base Unit of Measure for the Material
I_MEINH = "Alternative Unit of Measure for Material
I_KZMEINH = "
I_MARM = "
* I_KZDCH = "Level of Batch Definition
IMPORTING
O_UMREZ = "
O_UMREN = "
O_CHAR_VALUE = "
EXCEPTIONS
BATCH_NOT_CLASSIFIED = 1 CHARACTERISTIC_WITH_VALUE_0 = 2 NEW_BATCH_NOT_CLASSIFIED = 3 NO_BATCH_CONVERSION_POSSIBLE = 4 NOT_FOUND = 5 LOCK_PROBLEM = 6
IMPORTING Parameters details for BATCH_CONVERSION_FACTOR
I_CHARG - Batch
Data type: MCHA-CHARGOptional: No
Call by Reference: No ( called with pass by value option)
I_KZDWS -
Data type: TCUWS-KZDWSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHARG_CUOBJ -
Data type: INOB-CUOBJDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WERKS - Plant
Data type: MARC-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
I_MATNR - Material
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_MEINS - Base Unit of Measure for the Material
Data type: MARA-MEINSOptional: No
Call by Reference: No ( called with pass by value option)
I_MEINH - Alternative Unit of Measure for Material
Data type: MARA-MEINSOptional: No
Call by Reference: No ( called with pass by value option)
I_KZMEINH -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
I_MARM -
Data type: MARMOptional: No
Call by Reference: No ( called with pass by value option)
I_KZDCH - Level of Batch Definition
Data type: TCUCH-KZDCHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BATCH_CONVERSION_FACTOR
O_UMREZ -
Data type: FOptional: No
Call by Reference: No ( called with pass by value option)
O_UMREN -
Data type: FOptional: No
Call by Reference: No ( called with pass by value option)
O_CHAR_VALUE -
Data type: AUSP-ATFLVOptional: No
Call by Reference: Yes
EXCEPTIONS details
BATCH_NOT_CLASSIFIED - Batch Not Classified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CHARACTERISTIC_WITH_VALUE_0 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NEW_BATCH_NOT_CLASSIFIED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_BATCH_CONVERSION_POSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCK_PROBLEM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BATCH_CONVERSION_FACTOR 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_charg | TYPE MCHA-CHARG, " | |||
| lv_o_umrez | TYPE F, " | |||
| lv_batch_not_classified | TYPE F, " | |||
| lv_i_kzdws | TYPE TCUWS-KZDWS, " | |||
| lv_o_umren | TYPE F, " | |||
| lv_i_charg_cuobj | TYPE INOB-CUOBJ, " SPACE | |||
| lv_characteristic_with_value_0 | TYPE INOB, " | |||
| lv_i_werks | TYPE MARC-WERKS, " | |||
| lv_o_char_value | TYPE AUSP-ATFLV, " | |||
| lv_new_batch_not_classified | TYPE AUSP, " | |||
| lv_i_matnr | TYPE MARA-MATNR, " | |||
| lv_no_batch_conversion_possible | TYPE MARA, " | |||
| lv_i_meins | TYPE MARA-MEINS, " | |||
| lv_not_found | TYPE MARA, " | |||
| lv_i_meinh | TYPE MARA-MEINS, " | |||
| lv_lock_problem | TYPE MARA, " | |||
| lv_i_kzmeinh | TYPE SY-MARKY, " | |||
| lv_i_marm | TYPE MARM, " | |||
| lv_i_kzdch | TYPE TCUCH-KZDCH. " |
|   CALL FUNCTION 'BATCH_CONVERSION_FACTOR' "NOTRANSL: Chargenspezifische Umrechnung von Maßeinheiten (Klassifikation) |
| EXPORTING | ||
| I_CHARG | = lv_i_charg | |
| I_KZDWS | = lv_i_kzdws | |
| I_CHARG_CUOBJ | = lv_i_charg_cuobj | |
| I_WERKS | = lv_i_werks | |
| I_MATNR | = lv_i_matnr | |
| I_MEINS | = lv_i_meins | |
| I_MEINH | = lv_i_meinh | |
| I_KZMEINH | = lv_i_kzmeinh | |
| I_MARM | = lv_i_marm | |
| I_KZDCH | = lv_i_kzdch | |
| IMPORTING | ||
| O_UMREZ | = lv_o_umrez | |
| O_UMREN | = lv_o_umren | |
| O_CHAR_VALUE | = lv_o_char_value | |
| EXCEPTIONS | ||
| BATCH_NOT_CLASSIFIED = 1 | ||
| CHARACTERISTIC_WITH_VALUE_0 = 2 | ||
| NEW_BATCH_NOT_CLASSIFIED = 3 | ||
| NO_BATCH_CONVERSION_POSSIBLE = 4 | ||
| NOT_FOUND = 5 | ||
| LOCK_PROBLEM = 6 | ||
| . " BATCH_CONVERSION_FACTOR | ||
ABAP code using 7.40 inline data declarations to call FM BATCH_CONVERSION_FACTOR
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_i_charg). | ||||
| "SELECT single KZDWS FROM TCUWS INTO @DATA(ld_i_kzdws). | ||||
| "SELECT single CUOBJ FROM INOB INTO @DATA(ld_i_charg_cuobj). | ||||
| DATA(ld_i_charg_cuobj) | = ' '. | |||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_i_werks). | ||||
| "SELECT single ATFLV FROM AUSP INTO @DATA(ld_o_char_value). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_i_matnr). | ||||
| "SELECT single MEINS FROM MARA INTO @DATA(ld_i_meins). | ||||
| "SELECT single MEINS FROM MARA INTO @DATA(ld_i_meinh). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_i_kzmeinh). | ||||
| "SELECT single KZDCH FROM TCUCH INTO @DATA(ld_i_kzdch). | ||||
Search for further information about these or an SAP related objects