SAP CO_ZF_CHECK_MATSTAT_POS Function Module for NOTRANSL: Materialstatus fuer FA-Kopf pruefen
CO_ZF_CHECK_MATSTAT_POS is a standard co zf check matstat pos 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: Materialstatus fuer FA-Kopf pruefen 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 co zf check matstat pos FM, simply by entering the name CO_ZF_CHECK_MATSTAT_POS into the relevant SAP transaction such as SE37 or SE38.
Function Group: COZF
Program Name: SAPLCOZF
Main Program: SAPLCOZF
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_ZF_CHECK_MATSTAT_POS 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 'CO_ZF_CHECK_MATSTAT_POS'"NOTRANSL: Materialstatus fuer FA-Kopf pruefen.
EXPORTING
MATNR_IMP = "Material
MMSTA_IMP = "
WERKS_IMP = "
* MSTAE_IMP = "
IMPORTING
E_T141_MMSTA = "
E_T141T_TEXT = "
EXCEPTIONS
STATUS_NOT_FOUND = 1 PROD_ALLOWED = 2 PROD_NOT_ALLOWED = 3
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_SAPLCOZF_001 Customer Exits in Function Group COZF
EXIT_SAPLCOZF_002 Customer Exits in Function Group COZF
EXIT_SAPLCOZF_003 Exit for Predefining Fields in the Order Header
IMPORTING Parameters details for CO_ZF_CHECK_MATSTAT_POS
MATNR_IMP - Material
Data type: CAUFVD-MATNROptional: No
Call by Reference: No ( called with pass by value option)
MMSTA_IMP -
Data type: MSFCV-MMSTAOptional: No
Call by Reference: No ( called with pass by value option)
WERKS_IMP -
Data type: CAUFVD-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
MSTAE_IMP -
Data type: MARA-MSTAEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_ZF_CHECK_MATSTAT_POS
E_T141_MMSTA -
Data type: T141-MMSTAOptional: No
Call by Reference: Yes
E_T141T_TEXT -
Data type: T141T-MTSTBOptional: No
Call by Reference: Yes
EXCEPTIONS details
STATUS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROD_ALLOWED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROD_NOT_ALLOWED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_ZF_CHECK_MATSTAT_POS 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_matnr_imp | TYPE CAUFVD-MATNR, " | |||
| lv_e_t141_mmsta | TYPE T141-MMSTA, " | |||
| lv_status_not_found | TYPE T141, " | |||
| lv_mmsta_imp | TYPE MSFCV-MMSTA, " | |||
| lv_e_t141t_text | TYPE T141T-MTSTB, " | |||
| lv_prod_allowed | TYPE T141T, " | |||
| lv_werks_imp | TYPE CAUFVD-WERKS, " | |||
| lv_prod_not_allowed | TYPE CAUFVD, " | |||
| lv_mstae_imp | TYPE MARA-MSTAE. " |
|   CALL FUNCTION 'CO_ZF_CHECK_MATSTAT_POS' "NOTRANSL: Materialstatus fuer FA-Kopf pruefen |
| EXPORTING | ||
| MATNR_IMP | = lv_matnr_imp | |
| MMSTA_IMP | = lv_mmsta_imp | |
| WERKS_IMP | = lv_werks_imp | |
| MSTAE_IMP | = lv_mstae_imp | |
| IMPORTING | ||
| E_T141_MMSTA | = lv_e_t141_mmsta | |
| E_T141T_TEXT | = lv_e_t141t_text | |
| EXCEPTIONS | ||
| STATUS_NOT_FOUND = 1 | ||
| PROD_ALLOWED = 2 | ||
| PROD_NOT_ALLOWED = 3 | ||
| . " CO_ZF_CHECK_MATSTAT_POS | ||
ABAP code using 7.40 inline data declarations to call FM CO_ZF_CHECK_MATSTAT_POS
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 CAUFVD INTO @DATA(ld_matnr_imp). | ||||
| "SELECT single MMSTA FROM T141 INTO @DATA(ld_e_t141_mmsta). | ||||
| "SELECT single MMSTA FROM MSFCV INTO @DATA(ld_mmsta_imp). | ||||
| "SELECT single MTSTB FROM T141T INTO @DATA(ld_e_t141t_text). | ||||
| "SELECT single WERKS FROM CAUFVD INTO @DATA(ld_werks_imp). | ||||
| "SELECT single MSTAE FROM MARA INTO @DATA(ld_mstae_imp). | ||||
Search for further information about these or an SAP related objects