SAP MARC_PLNNR Function Module for NOTRANSL: Prüfung Arbeitsplangruppe und Plangruppenzähler









MARC_PLNNR is a standard marc plnnr 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üfung Arbeitsplangruppe und Plangruppenzähler 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 plnnr FM, simply by entering the name MARC_PLNNR into the relevant SAP transaction such as SE37 or SE38.

Function Group: MG11
Program Name: SAPLMG11
Main Program: SAPLMG11
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MARC_PLNNR 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_PLNNR'"NOTRANSL: Prüfung Arbeitsplangruppe und Plangruppenzähler
EXPORTING
WMARC_PLNNR = "Key for Task List Group
WRMMG1_MATNR = "Material Number
WRMMG1_WERKS = "Plant
* P_MESSAGE = ' ' "For message type conversion
WMARC_APLAL = "Group Counter
WMARC_LOSGR = "Lot Size for Product Costing
WMARC_PLNTY = "Task List Type
RET_PLNNR = "Key for Task List Group
RET_APLAL = "Group Counter
RET_LOSGR = "Lot Size for Product Costing
RET_PLNTY = "Task List Type
NEUFLAG = "Propose Field Content from the Reference

IMPORTING
WMARC_PLNNR = "Key for Task List Group
WMARC_APLAL = "Group Counter
WMARC_LOSGR = "Lot Size for Product Costing
WMARC_PLNTY = "Task List Type

EXCEPTIONS
ERROR_PLNTY = 1 ERROR_CPSLID = 2
.



IMPORTING Parameters details for MARC_PLNNR

WMARC_PLNNR - Key for Task List Group

Data type: MARC-PLNNR
Optional: No
Call by Reference: No ( called with pass by value option)

WRMMG1_MATNR - Material Number

Data type: RMMG1-MATNR
Optional: No
Call by Reference: No ( called with pass by value option)

WRMMG1_WERKS - Plant

Data type: RMMG1-WERKS
Optional: No
Call by Reference: No ( called with pass by value option)

P_MESSAGE - For message type conversion

Data type: RMMG08_012-MSGTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WMARC_APLAL - Group Counter

Data type: MARC-APLAL
Optional: No
Call by Reference: No ( called with pass by value option)

WMARC_LOSGR - Lot Size for Product Costing

Data type: MARC-LOSGR
Optional: No
Call by Reference: No ( called with pass by value option)

WMARC_PLNTY - Task List Type

Data type: MARC-PLNTY
Optional: No
Call by Reference: No ( called with pass by value option)

RET_PLNNR - Key for Task List Group

Data type: MARC-PLNNR
Optional: No
Call by Reference: No ( called with pass by value option)

RET_APLAL - Group Counter

Data type: MARC-APLAL
Optional: No
Call by Reference: No ( called with pass by value option)

RET_LOSGR - Lot Size for Product Costing

Data type: MARC-LOSGR
Optional: No
Call by Reference: No ( called with pass by value option)

RET_PLNTY - Task List Type

Data type: MARC-PLNTY
Optional: No
Call by Reference: No ( called with pass by value option)

NEUFLAG - Propose Field Content from the Reference

Data type: T130F-KZREF
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MARC_PLNNR

WMARC_PLNNR - Key for Task List Group

Data type: MARC-PLNNR
Optional: No
Call by Reference: No ( called with pass by value option)

WMARC_APLAL - Group Counter

Data type: MARC-APLAL
Optional: No
Call by Reference: No ( called with pass by value option)

WMARC_LOSGR - Lot Size for Product Costing

Data type: MARC-LOSGR
Optional: No
Call by Reference: No ( called with pass by value option)

WMARC_PLNTY - Task List Type

Data type: MARC-PLNTY
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_PLNTY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_CPSLID -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MARC_PLNNR 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_plnty  TYPE STRING, "   
lv_wmarc_plnnr  TYPE MARC-PLNNR, "   
lv_wmarc_plnnr  TYPE MARC-PLNNR, "   
lv_wrmmg1_matnr  TYPE RMMG1-MATNR, "   
lv_wrmmg1_werks  TYPE RMMG1-WERKS, "   
lv_p_message  TYPE RMMG08_012-MSGTYP, "   SPACE
lv_wmarc_aplal  TYPE MARC-APLAL, "   
lv_wmarc_aplal  TYPE MARC-APLAL, "   
lv_error_cpslid  TYPE MARC, "   
lv_wmarc_losgr  TYPE MARC-LOSGR, "   
lv_wmarc_losgr  TYPE MARC-LOSGR, "   
lv_wmarc_plnty  TYPE MARC-PLNTY, "   
lv_wmarc_plnty  TYPE MARC-PLNTY, "   
lv_ret_plnnr  TYPE MARC-PLNNR, "   
lv_ret_aplal  TYPE MARC-APLAL, "   
lv_ret_losgr  TYPE MARC-LOSGR, "   
lv_ret_plnty  TYPE MARC-PLNTY, "   
lv_neuflag  TYPE T130F-KZREF. "   

  CALL FUNCTION 'MARC_PLNNR'  "NOTRANSL: Prüfung Arbeitsplangruppe und Plangruppenzähler
    EXPORTING
         WMARC_PLNNR = lv_wmarc_plnnr
         WRMMG1_MATNR = lv_wrmmg1_matnr
         WRMMG1_WERKS = lv_wrmmg1_werks
         P_MESSAGE = lv_p_message
         WMARC_APLAL = lv_wmarc_aplal
         WMARC_LOSGR = lv_wmarc_losgr
         WMARC_PLNTY = lv_wmarc_plnty
         RET_PLNNR = lv_ret_plnnr
         RET_APLAL = lv_ret_aplal
         RET_LOSGR = lv_ret_losgr
         RET_PLNTY = lv_ret_plnty
         NEUFLAG = lv_neuflag
    IMPORTING
         WMARC_PLNNR = lv_wmarc_plnnr
         WMARC_APLAL = lv_wmarc_aplal
         WMARC_LOSGR = lv_wmarc_losgr
         WMARC_PLNTY = lv_wmarc_plnty
    EXCEPTIONS
        ERROR_PLNTY = 1
        ERROR_CPSLID = 2
. " MARC_PLNNR




ABAP code using 7.40 inline data declarations to call FM MARC_PLNNR

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 PLNNR FROM MARC INTO @DATA(ld_wmarc_plnnr).
 
"SELECT single PLNNR FROM MARC INTO @DATA(ld_wmarc_plnnr).
 
"SELECT single MATNR FROM RMMG1 INTO @DATA(ld_wrmmg1_matnr).
 
"SELECT single WERKS FROM RMMG1 INTO @DATA(ld_wrmmg1_werks).
 
"SELECT single MSGTYP FROM RMMG08_012 INTO @DATA(ld_p_message).
DATA(ld_p_message) = ' '.
 
"SELECT single APLAL FROM MARC INTO @DATA(ld_wmarc_aplal).
 
"SELECT single APLAL FROM MARC INTO @DATA(ld_wmarc_aplal).
 
 
"SELECT single LOSGR FROM MARC INTO @DATA(ld_wmarc_losgr).
 
"SELECT single LOSGR FROM MARC INTO @DATA(ld_wmarc_losgr).
 
"SELECT single PLNTY FROM MARC INTO @DATA(ld_wmarc_plnty).
 
"SELECT single PLNTY FROM MARC INTO @DATA(ld_wmarc_plnty).
 
"SELECT single PLNNR FROM MARC INTO @DATA(ld_ret_plnnr).
 
"SELECT single APLAL FROM MARC INTO @DATA(ld_ret_aplal).
 
"SELECT single LOSGR FROM MARC INTO @DATA(ld_ret_losgr).
 
"SELECT single PLNTY FROM MARC INTO @DATA(ld_ret_plnty).
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!