SAP MATERIAL_BDCDATA Function Module for Creating batch input data for the material master record maintenance









MATERIAL_BDCDATA is a standard material bdcdata SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Creating batch input data for the material master record maintenance 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 material bdcdata FM, simply by entering the name MATERIAL_BDCDATA into the relevant SAP transaction such as SE37 or SE38.

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



Function MATERIAL_BDCDATA 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 'MATERIAL_BDCDATA'"Creating batch input data for the material master record maintenance
EXPORTING
IBMM00 = "Header data - data for initial scr
IBMMH1 = "Main screen data
* IBMMHI = 'N' "Exclusively data which can be maintained automatically
KZMAPPE = "Ind. set transaction data in sessi
* KZPRF = ' ' "Ind. carry out pre-check
* KZ_ERWEITERN = ' ' "Indicator material is extended (only when creating)
* NODATA_SIGN = '/' "Special character 'copy no value f
* TRANS_CNT = '000001' "Transaction counter

TABLES
IBDCDATA = "Table of batch input data
IBMMH2 = "Control data
IBMMH3 = "Forecast values
IBMMH4 = "Consumption values
IBMMH5 = "Short texts
IBMMH6 = "Units of measure
IBMMH7 = "Long texts
IBMMH8 = "Referential EANs (input)

EXCEPTIONS
COMPONENTS_FLREF_NOT_FOUND = 1 MBRSH_MISSING = 10 MBRSH_NOT_EXISTING = 11 MTART_MISSING = 12 MTART_NOT_EXISTING = 13 NODATA_WRONG = 14 NO_ACTIVE_DYNPRO_SELECTED = 15 NO_AUTHORITY = 16 NO_CHANGEABLE_VIEW = 17 NO_DYNPRO = 18 NO_INCREASABLE_VIEW = 19 DYNPRO_SEQUENCE_ERROR = 2 SELECTION_ORGVALUE_MISMATCH = 20 T138B_ERROR = 21 T138M_ERROR = 22 TCODE_MISSING = 23 TCODE_NOT_EXISTING = 24 TCODE_NOT_SUPPORTED = 25 TRANSACTION_SKIPPED = 26 VALUATION_LEVEL_MISSING = 27 VALUATION_TYPE_NOT_EXISTING = 28 VKORG_WITHOUT_COUNTRY = 29 DYNPRO_SEQUENCE_ERROR_2 = 3 WRONG_VALUATION_LEVEL = 30 DYNPRO_SEQUENCE_ERROR_3 = 4 MATERIAL_INCREASE_ERROR = 5 MATERIAL_MBRSH_WRONG = 6 MATERIAL_MTART_WRONG = 7 MATNR_MISSING = 8 MATNR_NOT_EXISTING = 9
.



IMPORTING Parameters details for MATERIAL_BDCDATA

IBMM00 - Header data - data for initial scr

Data type: BMM00
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH1 - Main screen data

Data type: BMMH1
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMHI - Exclusively data which can be maintained automatically

Data type: BMMHI
Default: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)

KZMAPPE - Ind. set transaction data in sessi

Data type: RMMBI-KZMAP
Optional: No
Call by Reference: No ( called with pass by value option)

KZPRF - Ind. carry out pre-check

Data type: RMMBI-KZPRF
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

KZ_ERWEITERN - Indicator material is extended (only when creating)

Data type: RMMBI-KZPRF
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

NODATA_SIGN - Special character 'copy no value f

Data type: BGR00-NODATA
Default: '/'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TRANS_CNT - Transaction counter

Data type: RMMBI-TRANC
Default: '000001'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MATERIAL_BDCDATA

IBDCDATA - Table of batch input data

Data type: BDCDATA
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH2 - Control data

Data type: BMMH2
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH3 - Forecast values

Data type: BMMH3
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH4 - Consumption values

Data type: BMMH4
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH5 - Short texts

Data type: BMMH5
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH6 - Units of measure

Data type: BMMH6
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH7 - Long texts

Data type: BMMH7
Optional: No
Call by Reference: No ( called with pass by value option)

IBMMH8 - Referential EANs (input)

Data type: BMMH8
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

COMPONENTS_FLREF_NOT_FOUND - Field selection string for components is missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MBRSH_MISSING - Industry sector is not predefined ( for new entry)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MBRSH_NOT_EXISTING - Industry sector is not provided

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MTART_MISSING - Material type is not predefined ( for new entry)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MTART_NOT_EXISTING - Material type is not provided

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NODATA_WRONG - Character for 'empty field' is not a special character

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_ACTIVE_DYNPRO_SELECTED - No active screen was selected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORITY - No authorization is available

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_CHANGEABLE_VIEW - A view which can be changed was not selected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_DYNPRO - No main screen is available (trans

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_INCREASABLE_VIEW - A view which can be expanded was not selected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DYNPRO_SEQUENCE_ERROR - No 1st data screen is available in screen sequence tables

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SELECTION_ORGVALUE_MISMATCH - Selection and organizational levels do not match

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

T138B_ERROR - Error in the screen sequence table T138B

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

T138M_ERROR - Error in the screen sequence table T138M

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TCODE_MISSING - The transaction code is not predefined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TCODE_NOT_EXISTING - The transaction code is not provided

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TCODE_NOT_SUPPORTED - The transaction code is not supported

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TRANSACTION_SKIPPED - The current transaction is ignored

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VALUATION_LEVEL_MISSING - The valuation level has not yet be

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VALUATION_TYPE_NOT_EXISTING - Valuation category is not provided

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VKORG_WITHOUT_COUNTRY - The country cannot be determined for sales organization

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DYNPRO_SEQUENCE_ERROR_2 - No valid data screen according to screen sequence determined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_VALUATION_LEVEL - The valuation level is neither CCo

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DYNPRO_SEQUENCE_ERROR_3 - Inconsistency between screen table and screen sequence

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATERIAL_INCREASE_ERROR - Logical extension of a material is not possible

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATERIAL_MBRSH_WRONG - The predefined industry sector does not match the material

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATERIAL_MTART_WRONG - The predefined material type does not match the material

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATNR_MISSING - Material number is not predefined ( during changing)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATNR_NOT_EXISTING - Material does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MATERIAL_BDCDATA 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_ibmm00  TYPE BMM00, "   
lt_ibdcdata  TYPE STANDARD TABLE OF BDCDATA, "   
lv_components_flref_not_found  TYPE BDCDATA, "   
lv_mbrsh_missing  TYPE BDCDATA, "   
lv_mbrsh_not_existing  TYPE BDCDATA, "   
lv_mtart_missing  TYPE BDCDATA, "   
lv_mtart_not_existing  TYPE BDCDATA, "   
lv_nodata_wrong  TYPE BDCDATA, "   
lv_no_active_dynpro_selected  TYPE BDCDATA, "   
lv_no_authority  TYPE BDCDATA, "   
lv_no_changeable_view  TYPE BDCDATA, "   
lv_no_dynpro  TYPE BDCDATA, "   
lv_no_increasable_view  TYPE BDCDATA, "   
lv_ibmmh1  TYPE BMMH1, "   
lt_ibmmh2  TYPE STANDARD TABLE OF BMMH2, "   
lv_dynpro_sequence_error  TYPE BMMH2, "   
lv_selection_orgvalue_mismatch  TYPE BMMH2, "   
lv_t138b_error  TYPE BMMH2, "   
lv_t138m_error  TYPE BMMH2, "   
lv_tcode_missing  TYPE BMMH2, "   
lv_tcode_not_existing  TYPE BMMH2, "   
lv_tcode_not_supported  TYPE BMMH2, "   
lv_transaction_skipped  TYPE BMMH2, "   
lv_valuation_level_missing  TYPE BMMH2, "   
lv_valuation_type_not_existing  TYPE BMMH2, "   
lv_vkorg_without_country  TYPE BMMH2, "   
lt_ibmmh3  TYPE STANDARD TABLE OF BMMH3, "   
lv_ibmmhi  TYPE BMMHI, "   'N'
lv_dynpro_sequence_error_2  TYPE BMMHI, "   
lv_wrong_valuation_level  TYPE BMMHI, "   
lt_ibmmh4  TYPE STANDARD TABLE OF BMMH4, "   
lv_kzmappe  TYPE RMMBI-KZMAP, "   
lv_dynpro_sequence_error_3  TYPE RMMBI, "   
lv_kzprf  TYPE RMMBI-KZPRF, "   ' '
lt_ibmmh5  TYPE STANDARD TABLE OF BMMH5, "   
lv_material_increase_error  TYPE BMMH5, "   
lt_ibmmh6  TYPE STANDARD TABLE OF BMMH6, "   
lv_kz_erweitern  TYPE RMMBI-KZPRF, "   ' '
lv_material_mbrsh_wrong  TYPE RMMBI, "   
lt_ibmmh7  TYPE STANDARD TABLE OF BMMH7, "   
lv_nodata_sign  TYPE BGR00-NODATA, "   '/'
lv_material_mtart_wrong  TYPE BGR00, "   
lt_ibmmh8  TYPE STANDARD TABLE OF BMMH8, "   
lv_trans_cnt  TYPE RMMBI-TRANC, "   '000001'
lv_matnr_missing  TYPE RMMBI, "   
lv_matnr_not_existing  TYPE RMMBI. "   

  CALL FUNCTION 'MATERIAL_BDCDATA'  "Creating batch input data for the material master record maintenance
    EXPORTING
         IBMM00 = lv_ibmm00
         IBMMH1 = lv_ibmmh1
         IBMMHI = lv_ibmmhi
         KZMAPPE = lv_kzmappe
         KZPRF = lv_kzprf
         KZ_ERWEITERN = lv_kz_erweitern
         NODATA_SIGN = lv_nodata_sign
         TRANS_CNT = lv_trans_cnt
    TABLES
         IBDCDATA = lt_ibdcdata
         IBMMH2 = lt_ibmmh2
         IBMMH3 = lt_ibmmh3
         IBMMH4 = lt_ibmmh4
         IBMMH5 = lt_ibmmh5
         IBMMH6 = lt_ibmmh6
         IBMMH7 = lt_ibmmh7
         IBMMH8 = lt_ibmmh8
    EXCEPTIONS
        COMPONENTS_FLREF_NOT_FOUND = 1
        MBRSH_MISSING = 10
        MBRSH_NOT_EXISTING = 11
        MTART_MISSING = 12
        MTART_NOT_EXISTING = 13
        NODATA_WRONG = 14
        NO_ACTIVE_DYNPRO_SELECTED = 15
        NO_AUTHORITY = 16
        NO_CHANGEABLE_VIEW = 17
        NO_DYNPRO = 18
        NO_INCREASABLE_VIEW = 19
        DYNPRO_SEQUENCE_ERROR = 2
        SELECTION_ORGVALUE_MISMATCH = 20
        T138B_ERROR = 21
        T138M_ERROR = 22
        TCODE_MISSING = 23
        TCODE_NOT_EXISTING = 24
        TCODE_NOT_SUPPORTED = 25
        TRANSACTION_SKIPPED = 26
        VALUATION_LEVEL_MISSING = 27
        VALUATION_TYPE_NOT_EXISTING = 28
        VKORG_WITHOUT_COUNTRY = 29
        DYNPRO_SEQUENCE_ERROR_2 = 3
        WRONG_VALUATION_LEVEL = 30
        DYNPRO_SEQUENCE_ERROR_3 = 4
        MATERIAL_INCREASE_ERROR = 5
        MATERIAL_MBRSH_WRONG = 6
        MATERIAL_MTART_WRONG = 7
        MATNR_MISSING = 8
        MATNR_NOT_EXISTING = 9
. " MATERIAL_BDCDATA




ABAP code using 7.40 inline data declarations to call FM MATERIAL_BDCDATA

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_ibmmhi) = 'N'.
 
 
 
 
"SELECT single KZMAP FROM RMMBI INTO @DATA(ld_kzmappe).
 
 
"SELECT single KZPRF FROM RMMBI INTO @DATA(ld_kzprf).
DATA(ld_kzprf) = ' '.
 
 
 
 
"SELECT single KZPRF FROM RMMBI INTO @DATA(ld_kz_erweitern).
DATA(ld_kz_erweitern) = ' '.
 
 
 
"SELECT single NODATA FROM BGR00 INTO @DATA(ld_nodata_sign).
DATA(ld_nodata_sign) = '/'.
 
 
 
"SELECT single TRANC FROM RMMBI INTO @DATA(ld_trans_cnt).
DATA(ld_trans_cnt) = '000001'.
 
 
 


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!