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

Function MARC_PRCTR 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_PRCTR'"NOTRANSL: Prüfen Profitcenter.
EXPORTING
WMARC_PRCTR = "
WRMMG1_BWKEY = "Controlling Area
* LMARC_PRCTR = "Profit Center
* WRMMG1_WERKS = "Plant
* WRMMG1_MATNR = "Material Number
* P_MESSAGE = "For Message Type Conversion
* DB_MARC_PRCTR = "Profit Center
EXCEPTIONS
ERROR_PRCTR = 1
IMPORTING Parameters details for MARC_PRCTR
WMARC_PRCTR -
Data type: MARC-PRCTROptional: No
Call by Reference: No ( called with pass by value option)
WRMMG1_BWKEY - Controlling Area
Data type: RMMG1-BWKEYOptional: No
Call by Reference: No ( called with pass by value option)
LMARC_PRCTR - Profit Center
Data type: MARC-PRCTROptional: Yes
Call by Reference: No ( called with pass by value option)
WRMMG1_WERKS - Plant
Data type: RMMG1-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
WRMMG1_MATNR - Material Number
Data type: RMMG1-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
P_MESSAGE - For Message Type Conversion
Data type: RMMG08_012-MSGTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
DB_MARC_PRCTR - Profit Center
Data type: MARC-PRCTROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_PRCTR - .
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MARC_PRCTR 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_error_prctr | TYPE STRING, " | |||
| lv_wmarc_prctr | TYPE MARC-PRCTR, " | |||
| lv_wrmmg1_bwkey | TYPE RMMG1-BWKEY, " | |||
| lv_lmarc_prctr | TYPE MARC-PRCTR, " | |||
| lv_wrmmg1_werks | TYPE RMMG1-WERKS, " | |||
| lv_wrmmg1_matnr | TYPE RMMG1-MATNR, " | |||
| lv_p_message | TYPE RMMG08_012-MSGTYP, " | |||
| lv_db_marc_prctr | TYPE MARC-PRCTR. " |
|   CALL FUNCTION 'MARC_PRCTR' "NOTRANSL: Prüfen Profitcenter |
| EXPORTING | ||
| WMARC_PRCTR | = lv_wmarc_prctr | |
| WRMMG1_BWKEY | = lv_wrmmg1_bwkey | |
| LMARC_PRCTR | = lv_lmarc_prctr | |
| WRMMG1_WERKS | = lv_wrmmg1_werks | |
| WRMMG1_MATNR | = lv_wrmmg1_matnr | |
| P_MESSAGE | = lv_p_message | |
| DB_MARC_PRCTR | = lv_db_marc_prctr | |
| EXCEPTIONS | ||
| ERROR_PRCTR = 1 | ||
| . " MARC_PRCTR | ||
ABAP code using 7.40 inline data declarations to call FM MARC_PRCTR
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 PRCTR FROM MARC INTO @DATA(ld_wmarc_prctr). | ||||
| "SELECT single BWKEY FROM RMMG1 INTO @DATA(ld_wrmmg1_bwkey). | ||||
| "SELECT single PRCTR FROM MARC INTO @DATA(ld_lmarc_prctr). | ||||
| "SELECT single WERKS FROM RMMG1 INTO @DATA(ld_wrmmg1_werks). | ||||
| "SELECT single MATNR FROM RMMG1 INTO @DATA(ld_wrmmg1_matnr). | ||||
| "SELECT single MSGTYP FROM RMMG08_012 INTO @DATA(ld_p_message). | ||||
| "SELECT single PRCTR FROM MARC INTO @DATA(ld_db_marc_prctr). | ||||
Search for further information about these or an SAP related objects