SAP ASSORTMENT_FIND_MBEW_TYPES Function Module for NOTRANSL: Ermitteln der erforderlichen Bewertungsarten für ein Material/We
ASSORTMENT_FIND_MBEW_TYPES is a standard assortment find mbew types 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: Ermitteln der erforderlichen Bewertungsarten für ein Material/We 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 assortment find mbew types FM, simply by entering the name ASSORTMENT_FIND_MBEW_TYPES into the relevant SAP transaction such as SE37 or SE38.
Function Group: WSO5
Program Name: SAPLWSO5
Main Program: SAPLWSO5
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ASSORTMENT_FIND_MBEW_TYPES 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 'ASSORTMENT_FIND_MBEW_TYPES'"NOTRANSL: Ermitteln der erforderlichen Bewertungsarten für ein Material/We.
EXPORTING
* PLANT = "Plant
* MATNR = "Material
* BWKEY = "Valuation Area
* RETAIL_TYPE = 'R' "Valuation Category
* FUNCTION = '2' "Text 'Category'
* I_MARC = "Plant Data for Material
* SITUATION = ' ' "Text 'Category'
* MTART = "Material Type
IMPORTING
PROMOTION_MUST_BE_DIFFERENT = "Valuation type 'Promotion' mandatory
AUTOMATICAL_DEFINITION = "Indicator: valuation type is set automatically
DEFAULT_BWTAR = "Valuation Type
VALUATION_UNIQUE = "Text 'Category'
TABLES
* BWTAR_ALLOWED = "Transfer structure, (allowed) movement type determination
EXCEPTIONS
NO_BWTAR_FOUND = 1 ILLEGAL_PLANT = 2 NO_MARC_FOUND = 3
IMPORTING Parameters details for ASSORTMENT_FIND_MBEW_TYPES
PLANT - Plant
Data type: T001W-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
MATNR - Material
Data type: MBEW-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
BWKEY - Valuation Area
Data type: T001W-BWKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
RETAIL_TYPE - Valuation Category
Data type: T149-BWTTYDefault: 'R'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FUNCTION - Text 'Category'
Data type: WTDY-TYP01Default: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MARC - Plant Data for Material
Data type: MARCOptional: Yes
Call by Reference: No ( called with pass by value option)
SITUATION - Text 'Category'
Data type: WTDY-TYP01Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MTART - Material Type
Data type: MARA-MTARTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ASSORTMENT_FIND_MBEW_TYPES
PROMOTION_MUST_BE_DIFFERENT - Valuation type 'Promotion' mandatory
Data type: T149-KZVBAOptional: No
Call by Reference: No ( called with pass by value option)
AUTOMATICAL_DEFINITION - Indicator: valuation type is set automatically
Data type: T149-KZBAAOptional: No
Call by Reference: No ( called with pass by value option)
DEFAULT_BWTAR - Valuation Type
Data type: T149B-BWTAROptional: No
Call by Reference: No ( called with pass by value option)
VALUATION_UNIQUE - Text 'Category'
Data type: WTDY-TYP01Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ASSORTMENT_FIND_MBEW_TYPES
BWTAR_ALLOWED - Transfer structure, (allowed) movement type determination
Data type: WINT_BWTAROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_BWTAR_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_PLANT - Plant not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MARC_FOUND - 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 ASSORTMENT_FIND_MBEW_TYPES 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_plant | TYPE T001W-WERKS, " | |||
| lt_bwtar_allowed | TYPE STANDARD TABLE OF WINT_BWTAR, " | |||
| lv_no_bwtar_found | TYPE WINT_BWTAR, " | |||
| lv_promotion_must_be_different | TYPE T149-KZVBA, " | |||
| lv_matnr | TYPE MBEW-MATNR, " | |||
| lv_illegal_plant | TYPE MBEW, " | |||
| lv_automatical_definition | TYPE T149-KZBAA, " | |||
| lv_bwkey | TYPE T001W-BWKEY, " | |||
| lv_default_bwtar | TYPE T149B-BWTAR, " | |||
| lv_no_marc_found | TYPE T149B, " | |||
| lv_retail_type | TYPE T149-BWTTY, " 'R' | |||
| lv_valuation_unique | TYPE WTDY-TYP01, " | |||
| lv_function | TYPE WTDY-TYP01, " '2' | |||
| lv_i_marc | TYPE MARC, " | |||
| lv_situation | TYPE WTDY-TYP01, " ' ' | |||
| lv_mtart | TYPE MARA-MTART. " |
|   CALL FUNCTION 'ASSORTMENT_FIND_MBEW_TYPES' "NOTRANSL: Ermitteln der erforderlichen Bewertungsarten für ein Material/We |
| EXPORTING | ||
| PLANT | = lv_plant | |
| MATNR | = lv_matnr | |
| BWKEY | = lv_bwkey | |
| RETAIL_TYPE | = lv_retail_type | |
| FUNCTION | = lv_function | |
| I_MARC | = lv_i_marc | |
| SITUATION | = lv_situation | |
| MTART | = lv_mtart | |
| IMPORTING | ||
| PROMOTION_MUST_BE_DIFFERENT | = lv_promotion_must_be_different | |
| AUTOMATICAL_DEFINITION | = lv_automatical_definition | |
| DEFAULT_BWTAR | = lv_default_bwtar | |
| VALUATION_UNIQUE | = lv_valuation_unique | |
| TABLES | ||
| BWTAR_ALLOWED | = lt_bwtar_allowed | |
| EXCEPTIONS | ||
| NO_BWTAR_FOUND = 1 | ||
| ILLEGAL_PLANT = 2 | ||
| NO_MARC_FOUND = 3 | ||
| . " ASSORTMENT_FIND_MBEW_TYPES | ||
ABAP code using 7.40 inline data declarations to call FM ASSORTMENT_FIND_MBEW_TYPES
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 WERKS FROM T001W INTO @DATA(ld_plant). | ||||
| "SELECT single KZVBA FROM T149 INTO @DATA(ld_promotion_must_be_different). | ||||
| "SELECT single MATNR FROM MBEW INTO @DATA(ld_matnr). | ||||
| "SELECT single KZBAA FROM T149 INTO @DATA(ld_automatical_definition). | ||||
| "SELECT single BWKEY FROM T001W INTO @DATA(ld_bwkey). | ||||
| "SELECT single BWTAR FROM T149B INTO @DATA(ld_default_bwtar). | ||||
| "SELECT single BWTTY FROM T149 INTO @DATA(ld_retail_type). | ||||
| DATA(ld_retail_type) | = 'R'. | |||
| "SELECT single TYP01 FROM WTDY INTO @DATA(ld_valuation_unique). | ||||
| "SELECT single TYP01 FROM WTDY INTO @DATA(ld_function). | ||||
| DATA(ld_function) | = '2'. | |||
| "SELECT single TYP01 FROM WTDY INTO @DATA(ld_situation). | ||||
| DATA(ld_situation) | = ' '. | |||
| "SELECT single MTART FROM MARA INTO @DATA(ld_mtart). | ||||
Search for further information about these or an SAP related objects