SAP CHECK_REQUIREMENT_TYPE Function Module for Checks requirement type
CHECK_REQUIREMENT_TYPE is a standard check requirement type SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Checks requirement type 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 check requirement type FM, simply by entering the name CHECK_REQUIREMENT_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: MDSG
Program Name: SAPLMDSG
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CHECK_REQUIREMENT_TYPE 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 'CHECK_REQUIREMENT_TYPE'"Checks requirement type.
EXPORTING
MRP_GROUP = "MRP group (material type) of the material
PLANT = "Plant of the material
REQUIREMENT_TYPE_I = "Given requirements type
* SD_FLAG = 'X' "Access from SD
STR_GROUP = "
IMPORTING
REQUIREMENT_TYPE_E = "Main requirements type according to strategy
STRATEGY_E = "
EXCEPTIONS
INVALID_REQUIREMENT_TYPE = 1 NO_REQUIREMENT_TYPE_FOUND = 2
IMPORTING Parameters details for CHECK_REQUIREMENT_TYPE
MRP_GROUP - MRP group (material type) of the material
Data type: T438M-MTARTOptional: No
Call by Reference: No ( called with pass by value option)
PLANT - Plant of the material
Data type: T438M-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
REQUIREMENT_TYPE_I - Given requirements type
Data type: T461S-BEDKUOptional: No
Call by Reference: No ( called with pass by value option)
SD_FLAG - Access from SD
Data type: AM61X-FLG01Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
STR_GROUP -
Data type: MARC-STRGROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CHECK_REQUIREMENT_TYPE
REQUIREMENT_TYPE_E - Main requirements type according to strategy
Data type: T461S-BEDKUOptional: No
Call by Reference: No ( called with pass by value option)
STRATEGY_E -
Data type: T461S-STRA1Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_REQUIREMENT_TYPE - Given requirements type is not valid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_REQUIREMENT_TYPE_FOUND - No strategy found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CHECK_REQUIREMENT_TYPE 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_mrp_group | TYPE T438M-MTART, " | |||
| lv_requirement_type_e | TYPE T461S-BEDKU, " | |||
| lv_invalid_requirement_type | TYPE T461S, " | |||
| lv_plant | TYPE T438M-WERKS, " | |||
| lv_strategy_e | TYPE T461S-STRA1, " | |||
| lv_no_requirement_type_found | TYPE T461S, " | |||
| lv_requirement_type_i | TYPE T461S-BEDKU, " | |||
| lv_sd_flag | TYPE AM61X-FLG01, " 'X' | |||
| lv_str_group | TYPE MARC-STRGR. " |
|   CALL FUNCTION 'CHECK_REQUIREMENT_TYPE' "Checks requirement type |
| EXPORTING | ||
| MRP_GROUP | = lv_mrp_group | |
| PLANT | = lv_plant | |
| REQUIREMENT_TYPE_I | = lv_requirement_type_i | |
| SD_FLAG | = lv_sd_flag | |
| STR_GROUP | = lv_str_group | |
| IMPORTING | ||
| REQUIREMENT_TYPE_E | = lv_requirement_type_e | |
| STRATEGY_E | = lv_strategy_e | |
| EXCEPTIONS | ||
| INVALID_REQUIREMENT_TYPE = 1 | ||
| NO_REQUIREMENT_TYPE_FOUND = 2 | ||
| . " CHECK_REQUIREMENT_TYPE | ||
ABAP code using 7.40 inline data declarations to call FM CHECK_REQUIREMENT_TYPE
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 MTART FROM T438M INTO @DATA(ld_mrp_group). | ||||
| "SELECT single BEDKU FROM T461S INTO @DATA(ld_requirement_type_e). | ||||
| "SELECT single WERKS FROM T438M INTO @DATA(ld_plant). | ||||
| "SELECT single STRA1 FROM T461S INTO @DATA(ld_strategy_e). | ||||
| "SELECT single BEDKU FROM T461S INTO @DATA(ld_requirement_type_i). | ||||
| "SELECT single FLG01 FROM AM61X INTO @DATA(ld_sd_flag). | ||||
| DATA(ld_sd_flag) | = 'X'. | |||
| "SELECT single STRGR FROM MARC INTO @DATA(ld_str_group). | ||||
Search for further information about these or an SAP related objects