SAP MARC_FRTME Function Module for NOTRANSL: Prüfen Fertigungsmengeneinheit
MARC_FRTME is a standard marc frtme 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 Fertigungsmengeneinheit 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 marc frtme FM, simply by entering the name MARC_FRTME into the relevant SAP transaction such as SE37 or SE38.
Function Group: MG13
Program Name: SAPLMG13
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MARC_FRTME 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 'MARC_FRTME'"NOTRANSL: Prüfen Fertigungsmengeneinheit.
EXPORTING
WMARC_FRTME = "Production unit
* OK_CODE = ' ' "OK Code
* FLG_UEBERNAHME = ' ' "Propose Field Content from the Reference
* FLG_PRUEFDUNKEL = ' ' "Propose Field Content from the Reference
WMARA_MEINS = "Base Unit of Measure
* WMARA_ATTYP = "Material Category
* WMARA_SATNR = "Cross-Plant Configurable Material
* WMARC_WERKS = "Plant
WRMMG1_REF_MATNR = "Reference Material
* WRMMZU = "Material Master Maintenance: Additional Fields
LMARC_FRTME = "Production unit
AKTYP = "Activity Category
IMPORTING
WMARC_FRTME = "Production unit
WRMMZU = "Material Master Maintenance: Additional Fields
FLAG_BILDFOLGE = "ABAP System Field: Highlighted Input in Dynpro Field
HOKCODE = "Function Code
OK_CODE = "OK Code
TABLES
MEINH = "Units of Measure
Z_MEINH = "Structure of Table MEINH (Created for Update Program)
DMEINH = "Structure of Table MEINH (Created for Update Program)
EXCEPTIONS
ERROR_NACHRICHT = 1 ERROR_MEINS = 2
IMPORTING Parameters details for MARC_FRTME
WMARC_FRTME - Production unit
Data type: MARC-FRTMEOptional: No
Call by Reference: No ( called with pass by value option)
OK_CODE - OK Code
Data type: RMMG08_012-CHAR05Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_UEBERNAHME - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_PRUEFDUNKEL - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WMARA_MEINS - Base Unit of Measure
Data type: MARA-MEINSOptional: No
Call by Reference: No ( called with pass by value option)
WMARA_ATTYP - Material Category
Data type: MARA-ATTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
WMARA_SATNR - Cross-Plant Configurable Material
Data type: MARA-SATNROptional: Yes
Call by Reference: No ( called with pass by value option)
WMARC_WERKS - Plant
Data type: MARC-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
WRMMG1_REF_MATNR - Reference Material
Data type: RMMG1_REF-MATNROptional: No
Call by Reference: No ( called with pass by value option)
WRMMZU - Material Master Maintenance: Additional Fields
Data type: RMMZUOptional: Yes
Call by Reference: No ( called with pass by value option)
LMARC_FRTME - Production unit
Data type: MARC-FRTMEOptional: No
Call by Reference: No ( called with pass by value option)
AKTYP - Activity Category
Data type: T130M-AKTYPOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MARC_FRTME
WMARC_FRTME - Production unit
Data type: MARC-FRTMEOptional: No
Call by Reference: No ( called with pass by value option)
WRMMZU - Material Master Maintenance: Additional Fields
Data type: RMMZUOptional: No
Call by Reference: No ( called with pass by value option)
FLAG_BILDFOLGE - ABAP System Field: Highlighted Input in Dynpro Field
Data type: SY-DATAROptional: No
Call by Reference: No ( called with pass by value option)
HOKCODE - Function Code
Data type: RMMG08_012-CHAR05Optional: No
Call by Reference: No ( called with pass by value option)
OK_CODE - OK Code
Data type: RMMG08_012-CHAR05Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MARC_FRTME
MEINH - Units of Measure
Data type: SMEINHOptional: No
Call by Reference: No ( called with pass by value option)
Z_MEINH - Structure of Table MEINH (Created for Update Program)
Data type: SMEINHOptional: No
Call by Reference: No ( called with pass by value option)
DMEINH - Structure of Table MEINH (Created for Update Program)
Data type: SMEINHOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_NACHRICHT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_MEINS - 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 MARC_FRTME 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: | ||||
| lt_meinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_wmarc_frtme | TYPE MARC-FRTME, " | |||
| lv_wmarc_frtme | TYPE MARC-FRTME, " | |||
| lv_error_nachricht | TYPE MARC, " | |||
| lv_ok_code | TYPE RMMG08_012-CHAR05, " SPACE | |||
| lv_flg_uebernahme | TYPE T130F-KZREF, " SPACE | |||
| lv_flg_pruefdunkel | TYPE T130F-KZREF, " SPACE | |||
| lv_wrmmzu | TYPE RMMZU, " | |||
| lt_z_meinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_error_meins | TYPE SMEINH, " | |||
| lv_wmara_meins | TYPE MARA-MEINS, " | |||
| lt_dmeinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_wmara_attyp | TYPE MARA-ATTYP, " | |||
| lv_flag_bildfolge | TYPE SY-DATAR, " | |||
| lv_hokcode | TYPE RMMG08_012-CHAR05, " | |||
| lv_wmara_satnr | TYPE MARA-SATNR, " | |||
| lv_ok_code | TYPE RMMG08_012-CHAR05, " | |||
| lv_wmarc_werks | TYPE MARC-WERKS, " | |||
| lv_wrmmg1_ref_matnr | TYPE RMMG1_REF-MATNR, " | |||
| lv_wrmmzu | TYPE RMMZU, " | |||
| lv_lmarc_frtme | TYPE MARC-FRTME, " | |||
| lv_aktyp | TYPE T130M-AKTYP. " |
|   CALL FUNCTION 'MARC_FRTME' "NOTRANSL: Prüfen Fertigungsmengeneinheit |
| EXPORTING | ||
| WMARC_FRTME | = lv_wmarc_frtme | |
| OK_CODE | = lv_ok_code | |
| FLG_UEBERNAHME | = lv_flg_uebernahme | |
| FLG_PRUEFDUNKEL | = lv_flg_pruefdunkel | |
| WMARA_MEINS | = lv_wmara_meins | |
| WMARA_ATTYP | = lv_wmara_attyp | |
| WMARA_SATNR | = lv_wmara_satnr | |
| WMARC_WERKS | = lv_wmarc_werks | |
| WRMMG1_REF_MATNR | = lv_wrmmg1_ref_matnr | |
| WRMMZU | = lv_wrmmzu | |
| LMARC_FRTME | = lv_lmarc_frtme | |
| AKTYP | = lv_aktyp | |
| IMPORTING | ||
| WMARC_FRTME | = lv_wmarc_frtme | |
| WRMMZU | = lv_wrmmzu | |
| FLAG_BILDFOLGE | = lv_flag_bildfolge | |
| HOKCODE | = lv_hokcode | |
| OK_CODE | = lv_ok_code | |
| TABLES | ||
| MEINH | = lt_meinh | |
| Z_MEINH | = lt_z_meinh | |
| DMEINH | = lt_dmeinh | |
| EXCEPTIONS | ||
| ERROR_NACHRICHT = 1 | ||
| ERROR_MEINS = 2 | ||
| . " MARC_FRTME | ||
ABAP code using 7.40 inline data declarations to call FM MARC_FRTME
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 FRTME FROM MARC INTO @DATA(ld_wmarc_frtme). | ||||
| "SELECT single FRTME FROM MARC INTO @DATA(ld_wmarc_frtme). | ||||
| "SELECT single CHAR05 FROM RMMG08_012 INTO @DATA(ld_ok_code). | ||||
| DATA(ld_ok_code) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_uebernahme). | ||||
| DATA(ld_flg_uebernahme) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_pruefdunkel). | ||||
| DATA(ld_flg_pruefdunkel) | = ' '. | |||
| "SELECT single MEINS FROM MARA INTO @DATA(ld_wmara_meins). | ||||
| "SELECT single ATTYP FROM MARA INTO @DATA(ld_wmara_attyp). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_flag_bildfolge). | ||||
| "SELECT single CHAR05 FROM RMMG08_012 INTO @DATA(ld_hokcode). | ||||
| "SELECT single SATNR FROM MARA INTO @DATA(ld_wmara_satnr). | ||||
| "SELECT single CHAR05 FROM RMMG08_012 INTO @DATA(ld_ok_code). | ||||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_wmarc_werks). | ||||
| "SELECT single MATNR FROM RMMG1_REF INTO @DATA(ld_wrmmg1_ref_matnr). | ||||
| "SELECT single FRTME FROM MARC INTO @DATA(ld_lmarc_frtme). | ||||
| "SELECT single AKTYP FROM T130M INTO @DATA(ld_aktyp). | ||||
Search for further information about these or an SAP related objects