SAP MC_PLOBJ_UNITS Function Module for NOTRANSL: Einheitenfelder der SxyzE-Struktur fuellen
MC_PLOBJ_UNITS is a standard mc plobj units 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: Einheitenfelder der SxyzE-Struktur fuellen 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 mc plobj units FM, simply by entering the name MC_PLOBJ_UNITS into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCP6
Program Name: SAPLMCP6
Main Program: SAPLMCP6
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MC_PLOBJ_UNITS 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 'MC_PLOBJ_UNITS'"NOTRANSL: Einheitenfelder der SxyzE-Struktur fuellen.
EXPORTING
* I_BASME = ' ' "
* I_WITH_PER = 'X' "
* I_UNITS = 'X' "
I_GSTRU = "Name physical of info structure
I_GSTRUE = "Planning object structure
* I_MODE = 'A' "(A) Create (B) Change (C) Display
* I_PERIV = ' ' "Period version
* I_PERKZ = ' ' "Period indicator
* I_REPID = ' ' "
* I_TEXT = ' ' "Text for entry screen
* I_WAERS = ' ' "
IMPORTING
O_GSTRUE = "planning object structure filled again
O_PERIV = "
O_PERKZ = "
O_SUBRC = "Contains error or termination code
TABLES
* T_EHFLG = "
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_SAPLMCP6_001 User Exit for Extrapolating Sales for OTB
EXIT_SAPLMCP6_002 User Exit for Checking OTB Within a Purchase Order
IMPORTING Parameters details for MC_PLOBJ_UNITS
I_BASME -
Data type: MARA-MEINSDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WITH_PER -
Data type: CHAR01Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_UNITS -
Data type: CHAR01Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_GSTRU - Name physical of info structure
Data type: RMCP2-GSTRUOptional: No
Call by Reference: No ( called with pass by value option)
I_GSTRUE - Planning object structure
Data type: RMCP2-GSTRUOptional: No
Call by Reference: No ( called with pass by value option)
I_MODE - (A) Create (B) Change (C) Display
Data type: CHAR01Default: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PERIV - Period version
Data type: RMCP2-PERIVDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PERKZ - Period indicator
Data type: RMCP2-SPPERDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_REPID -
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TEXT - Text for entry screen
Data type: CHAR80Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WAERS -
Data type: TCURX-CURRKEYDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MC_PLOBJ_UNITS
O_GSTRUE - planning object structure filled again
Data type: RMCP2-GSTRUOptional: No
Call by Reference: No ( called with pass by value option)
O_PERIV -
Data type: PERIVOptional: No
Call by Reference: No ( called with pass by value option)
O_PERKZ -
Data type: PERKZOptional: No
Call by Reference: No ( called with pass by value option)
O_SUBRC - Contains error or termination code
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MC_PLOBJ_UNITS
T_EHFLG -
Data type: MCP_EHFLGOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MC_PLOBJ_UNITS 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_i_basme | TYPE MARA-MEINS, " ' ' | |||
| lt_t_ehflg | TYPE STANDARD TABLE OF MCP_EHFLG, " | |||
| lv_o_gstrue | TYPE RMCP2-GSTRU, " | |||
| lv_i_with_per | TYPE CHAR01, " 'X' | |||
| lv_i_units | TYPE CHAR01, " 'X' | |||
| lv_i_gstru | TYPE RMCP2-GSTRU, " | |||
| lv_o_periv | TYPE PERIV, " | |||
| lv_o_perkz | TYPE PERKZ, " | |||
| lv_i_gstrue | TYPE RMCP2-GSTRU, " | |||
| lv_i_mode | TYPE CHAR01, " 'A' | |||
| lv_o_subrc | TYPE SY-SUBRC, " | |||
| lv_i_periv | TYPE RMCP2-PERIV, " ' ' | |||
| lv_i_perkz | TYPE RMCP2-SPPER, " ' ' | |||
| lv_i_repid | TYPE SY-REPID, " SPACE | |||
| lv_i_text | TYPE CHAR80, " ' ' | |||
| lv_i_waers | TYPE TCURX-CURRKEY. " ' ' |
|   CALL FUNCTION 'MC_PLOBJ_UNITS' "NOTRANSL: Einheitenfelder der SxyzE-Struktur fuellen |
| EXPORTING | ||
| I_BASME | = lv_i_basme | |
| I_WITH_PER | = lv_i_with_per | |
| I_UNITS | = lv_i_units | |
| I_GSTRU | = lv_i_gstru | |
| I_GSTRUE | = lv_i_gstrue | |
| I_MODE | = lv_i_mode | |
| I_PERIV | = lv_i_periv | |
| I_PERKZ | = lv_i_perkz | |
| I_REPID | = lv_i_repid | |
| I_TEXT | = lv_i_text | |
| I_WAERS | = lv_i_waers | |
| IMPORTING | ||
| O_GSTRUE | = lv_o_gstrue | |
| O_PERIV | = lv_o_periv | |
| O_PERKZ | = lv_o_perkz | |
| O_SUBRC | = lv_o_subrc | |
| TABLES | ||
| T_EHFLG | = lt_t_ehflg | |
| . " MC_PLOBJ_UNITS | ||
ABAP code using 7.40 inline data declarations to call FM MC_PLOBJ_UNITS
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 MEINS FROM MARA INTO @DATA(ld_i_basme). | ||||
| DATA(ld_i_basme) | = ' '. | |||
| "SELECT single GSTRU FROM RMCP2 INTO @DATA(ld_o_gstrue). | ||||
| DATA(ld_i_with_per) | = 'X'. | |||
| DATA(ld_i_units) | = 'X'. | |||
| "SELECT single GSTRU FROM RMCP2 INTO @DATA(ld_i_gstru). | ||||
| "SELECT single GSTRU FROM RMCP2 INTO @DATA(ld_i_gstrue). | ||||
| DATA(ld_i_mode) | = 'A'. | |||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_o_subrc). | ||||
| "SELECT single PERIV FROM RMCP2 INTO @DATA(ld_i_periv). | ||||
| DATA(ld_i_periv) | = ' '. | |||
| "SELECT single SPPER FROM RMCP2 INTO @DATA(ld_i_perkz). | ||||
| DATA(ld_i_perkz) | = ' '. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_i_repid). | ||||
| DATA(ld_i_repid) | = ' '. | |||
| DATA(ld_i_text) | = ' '. | |||
| "SELECT single CURRKEY FROM TCURX INTO @DATA(ld_i_waers). | ||||
| DATA(ld_i_waers) | = ' '. | |||
Search for further information about these or an SAP related objects