SAP VBWS_UNIT_CHECK_FOR_MATNR Function Module for NOTRANSL: Prüfen Anteils-/Produktmengeneinheit für ein Material









VBWS_UNIT_CHECK_FOR_MATNR is a standard vbws unit check for matnr 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: Prüfen Anteils-/Produktmengeneinheit für ein Material 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 vbws unit check for matnr FM, simply by entering the name VBWS_UNIT_CHECK_FOR_MATNR into the relevant SAP transaction such as SE37 or SE38.

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



Function VBWS_UNIT_CHECK_FOR_MATNR 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 'VBWS_UNIT_CHECK_FOR_MATNR'"NOTRANSL: Prüfen Anteils-/Produktmengeneinheit für ein Material
EXPORTING
I_MATNR = "Material Number
I_MEINH = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* LEADING_UNIT = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* VALUATION_RELEVANCE = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* WITH_UNITS_OF_SAME_DIMENSION = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* CHECK_USE_OF_UOM = 'X' "DE-EN-LANG-SWITCH-NO-TRANSLATION

EXCEPTIONS
UNIT_NOT_FOUND = 1 UNIT_NOT_ALLOWED = 2 UNIT_NOT_ACTIVE = 3 UNIT_NOT_CONSISTENT = 4 WRONG_CALL = 5
.



IMPORTING Parameters details for VBWS_UNIT_CHECK_FOR_MATNR

I_MATNR - Material Number

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

I_MEINH - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

LEADING_UNIT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

VALUATION_RELEVANCE - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

WITH_UNITS_OF_SAME_DIMENSION - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

CHECK_USE_OF_UOM - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: MWS_CHAR-XUSED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

UNIT_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

UNIT_NOT_ALLOWED - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

UNIT_NOT_ACTIVE - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

UNIT_NOT_CONSISTENT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

WRONG_CALL - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for VBWS_UNIT_CHECK_FOR_MATNR 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_matnr  TYPE MARM-MATNR, "   
lv_unit_not_found  TYPE MARM, "   
lv_i_meinh  TYPE MARM-MEINH, "   
lv_unit_not_allowed  TYPE MARM, "   
lv_leading_unit  TYPE MWS_CHAR-XUSED, "   ' '
lv_unit_not_active  TYPE MWS_CHAR, "   
lv_unit_not_consistent  TYPE MWS_CHAR, "   
lv_valuation_relevance  TYPE MWS_CHAR-XUSED, "   ' '
lv_wrong_call  TYPE MWS_CHAR, "   
lv_with_units_of_same_dimension  TYPE MWS_CHAR-XUSED, "   ' '
lv_check_use_of_uom  TYPE MWS_CHAR-XUSED. "   'X'

  CALL FUNCTION 'VBWS_UNIT_CHECK_FOR_MATNR'  "NOTRANSL: Prüfen Anteils-/Produktmengeneinheit für ein Material
    EXPORTING
         I_MATNR = lv_i_matnr
         I_MEINH = lv_i_meinh
         LEADING_UNIT = lv_leading_unit
         VALUATION_RELEVANCE = lv_valuation_relevance
         WITH_UNITS_OF_SAME_DIMENSION = lv_with_units_of_same_dimension
         CHECK_USE_OF_UOM = lv_check_use_of_uom
    EXCEPTIONS
        UNIT_NOT_FOUND = 1
        UNIT_NOT_ALLOWED = 2
        UNIT_NOT_ACTIVE = 3
        UNIT_NOT_CONSISTENT = 4
        WRONG_CALL = 5
. " VBWS_UNIT_CHECK_FOR_MATNR




ABAP code using 7.40 inline data declarations to call FM VBWS_UNIT_CHECK_FOR_MATNR

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 MATNR FROM MARM INTO @DATA(ld_i_matnr).
 
 
"SELECT single MEINH FROM MARM INTO @DATA(ld_i_meinh).
 
 
"SELECT single XUSED FROM MWS_CHAR INTO @DATA(ld_leading_unit).
DATA(ld_leading_unit) = ' '.
 
 
 
"SELECT single XUSED FROM MWS_CHAR INTO @DATA(ld_valuation_relevance).
DATA(ld_valuation_relevance) = ' '.
 
 
"SELECT single XUSED FROM MWS_CHAR INTO @DATA(ld_with_units_of_same_dimension).
DATA(ld_with_units_of_same_dimension) = ' '.
 
"SELECT single XUSED FROM MWS_CHAR INTO @DATA(ld_check_use_of_uom).
DATA(ld_check_use_of_uom) = 'X'.
 


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!