SAP MB_CHECK_MPN_RELATION Function Module for NOTRANSL: Funktionsbaustein zur Prüfung ob firmeneigenes HTN-Mat. zugeord









MB_CHECK_MPN_RELATION is a standard mb check mpn relation 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: Funktionsbaustein zur Prüfung ob firmeneigenes HTN-Mat. zugeord 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 mb check mpn relation FM, simply by entering the name MB_CHECK_MPN_RELATION into the relevant SAP transaction such as SE37 or SE38.

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



Function MB_CHECK_MPN_RELATION 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 'MB_CHECK_MPN_RELATION'"NOTRANSL: Funktionsbaustein zur Prüfung ob firmeneigenes  HTN-Mat. zugeord
EXPORTING
I_BMATN = "Number of firm's own (internal) inventory-managed material
I_EMATN = "Material Number
II_WERKS = "Plant
* I_MPROF = "Manufacturer Part Profile
II_DATUV = "ABAP System Field: Current Date of Application Server
* II_DATUB = "ABAP System Field: Current Date of Application Server
* II_MFRNR = "Manufacturer number
* II_REVLV = "Revision Level

EXCEPTIONS
NOT_FOUND = 1 NO_REFERENCE_AT_ALL = 2 NO_REFERENCE_FOR_IMAT = 3 NOT_MAINTAINED = 4 COMBINATION_IS_BLOCKED = 5 NOT_VALID = 6
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLMBMP_003 Customer Enhancement for AMPL Checks

IMPORTING Parameters details for MB_CHECK_MPN_RELATION

I_BMATN - Number of firm's own (internal) inventory-managed material

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

I_EMATN - Material Number

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

II_WERKS - Plant

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

I_MPROF - Manufacturer Part Profile

Data type: MARA-MPROF
Optional: Yes
Call by Reference: No ( called with pass by value option)

II_DATUV - ABAP System Field: Current Date of Application Server

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

II_DATUB - ABAP System Field: Current Date of Application Server

Data type: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

II_MFRNR - Manufacturer number

Data type: AMPL-MFRNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

II_REVLV - Revision Level

Data type: AMPL-REVLV
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_FOUND -

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

NO_REFERENCE_AT_ALL -

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

NO_REFERENCE_FOR_IMAT -

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

NOT_MAINTAINED -

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

COMBINATION_IS_BLOCKED -

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

NOT_VALID -

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

Copy and paste ABAP code example for MB_CHECK_MPN_RELATION 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_bmatn  TYPE MARA-BMATN, "   
lv_not_found  TYPE MARA, "   
lv_i_ematn  TYPE MARA-MATNR, "   
lv_no_reference_at_all  TYPE MARA, "   
lv_ii_werks  TYPE T001W-WERKS, "   
lv_no_reference_for_imat  TYPE T001W, "   
lv_i_mprof  TYPE MARA-MPROF, "   
lv_not_maintained  TYPE MARA, "   
lv_ii_datuv  TYPE SY-DATUM, "   
lv_combination_is_blocked  TYPE SY, "   
lv_ii_datub  TYPE SY-DATUM, "   
lv_not_valid  TYPE SY, "   
lv_ii_mfrnr  TYPE AMPL-MFRNR, "   
lv_ii_revlv  TYPE AMPL-REVLV. "   

  CALL FUNCTION 'MB_CHECK_MPN_RELATION'  "NOTRANSL: Funktionsbaustein zur Prüfung ob firmeneigenes HTN-Mat. zugeord
    EXPORTING
         I_BMATN = lv_i_bmatn
         I_EMATN = lv_i_ematn
         II_WERKS = lv_ii_werks
         I_MPROF = lv_i_mprof
         II_DATUV = lv_ii_datuv
         II_DATUB = lv_ii_datub
         II_MFRNR = lv_ii_mfrnr
         II_REVLV = lv_ii_revlv
    EXCEPTIONS
        NOT_FOUND = 1
        NO_REFERENCE_AT_ALL = 2
        NO_REFERENCE_FOR_IMAT = 3
        NOT_MAINTAINED = 4
        COMBINATION_IS_BLOCKED = 5
        NOT_VALID = 6
. " MB_CHECK_MPN_RELATION




ABAP code using 7.40 inline data declarations to call FM MB_CHECK_MPN_RELATION

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 BMATN FROM MARA INTO @DATA(ld_i_bmatn).
 
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_i_ematn).
 
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_ii_werks).
 
 
"SELECT single MPROF FROM MARA INTO @DATA(ld_i_mprof).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_ii_datuv).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_ii_datub).
 
 
"SELECT single MFRNR FROM AMPL INTO @DATA(ld_ii_mfrnr).
 
"SELECT single REVLV FROM AMPL INTO @DATA(ld_ii_revlv).
 


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!