SAP CS_CL_S_MBM_CREATE Function Module for NOTRANSL: Anlegen einer Material-Stücklisten Zuordnung
CS_CL_S_MBM_CREATE is a standard cs cl s mbm create 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: Anlegen einer Material-Stücklisten Zuordnung 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 cs cl s mbm create FM, simply by entering the name CS_CL_S_MBM_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CSCL_BOM
Program Name: SAPLCSCL_BOM
Main Program: SAPLCSCL_BOM
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CS_CL_S_MBM_CREATE 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 'CS_CL_S_MBM_CREATE'"NOTRANSL: Anlegen einer Material-Stücklisten Zuordnung.
EXPORTING
I_KEY_DATE_S = "ABAP System Field: Current Date of Application Server
* I_FLG_MBM_CHECK = 'X' "Checkbox
I_MBM_CLASS_DATA = "Class data for material - BOM allocation
* I_FLG_KEEP_VARIANT = ' ' "Checkbox
IMPORTING
E_BOM_LOCK = "
EXCEPTIONS
MBM_NOT_CONSISTENT = 1 NO_AUTHORITY = 2 BOM_NOT_LOCKED = 3 NO_VALID_MATERIAL = 4 NO_VALID_PLANT = 5 NO_VALID_USAGE = 6 IDENT_ALREADY_EXISTS = 7 NO_VALID_BOM = 8 INPUT_INCOMPLETE = 9
IMPORTING Parameters details for CS_CL_S_MBM_CREATE
I_KEY_DATE_S - ABAP System Field: Current Date of Application Server
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_MBM_CHECK - Checkbox
Data type: CSDATA-XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MBM_CLASS_DATA - Class data for material - BOM allocation
Data type: MBM_CLASS_DATAOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_KEEP_VARIANT - Checkbox
Data type: CSDATA-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CS_CL_S_MBM_CREATE
E_BOM_LOCK -
Data type: CSCL_BOM_LOCK_TYPEOptional: No
Call by Reference: Yes
EXCEPTIONS details
MBM_NOT_CONSISTENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BOM_NOT_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_MATERIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_PLANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_USAGE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IDENT_ALREADY_EXISTS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_BOM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INPUT_INCOMPLETE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CS_CL_S_MBM_CREATE 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_bom_lock | TYPE CSCL_BOM_LOCK_TYPE, " | |||
lv_i_key_date_s | TYPE SY-DATUM, " | |||
lv_mbm_not_consistent | TYPE SY, " | |||
lv_no_authority | TYPE SY, " | |||
lv_i_flg_mbm_check | TYPE CSDATA-XFELD, " 'X' | |||
lv_bom_not_locked | TYPE CSDATA, " | |||
lv_i_mbm_class_data | TYPE MBM_CLASS_DATA, " | |||
lv_no_valid_material | TYPE MBM_CLASS_DATA, " | |||
lv_i_flg_keep_variant | TYPE CSDATA-XFELD, " SPACE | |||
lv_no_valid_plant | TYPE CSDATA, " | |||
lv_no_valid_usage | TYPE CSDATA, " | |||
lv_ident_already_exists | TYPE CSDATA, " | |||
lv_no_valid_bom | TYPE CSDATA, " | |||
lv_input_incomplete | TYPE CSDATA. " |
  CALL FUNCTION 'CS_CL_S_MBM_CREATE' "NOTRANSL: Anlegen einer Material-Stücklisten Zuordnung |
EXPORTING | ||
I_KEY_DATE_S | = lv_i_key_date_s | |
I_FLG_MBM_CHECK | = lv_i_flg_mbm_check | |
I_MBM_CLASS_DATA | = lv_i_mbm_class_data | |
I_FLG_KEEP_VARIANT | = lv_i_flg_keep_variant | |
IMPORTING | ||
E_BOM_LOCK | = lv_e_bom_lock | |
EXCEPTIONS | ||
MBM_NOT_CONSISTENT = 1 | ||
NO_AUTHORITY = 2 | ||
BOM_NOT_LOCKED = 3 | ||
NO_VALID_MATERIAL = 4 | ||
NO_VALID_PLANT = 5 | ||
NO_VALID_USAGE = 6 | ||
IDENT_ALREADY_EXISTS = 7 | ||
NO_VALID_BOM = 8 | ||
INPUT_INCOMPLETE = 9 | ||
. " CS_CL_S_MBM_CREATE |
ABAP code using 7.40 inline data declarations to call FM CS_CL_S_MBM_CREATE
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 DATUM FROM SY INTO @DATA(ld_i_key_date_s). | ||||
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_i_flg_mbm_check). | ||||
DATA(ld_i_flg_mbm_check) | = 'X'. | |||
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_i_flg_keep_variant). | ||||
DATA(ld_i_flg_keep_variant) | = ' '. | |||
Search for further information about these or an SAP related objects