SAP MCP_GET_PLANTYP_LINES Function Module for NOTRANSL: Zeilenaufbau und Planungstypbeschreibung einlesen
MCP_GET_PLANTYP_LINES is a standard mcp get plantyp lines 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: Zeilenaufbau und Planungstypbeschreibung einlesen 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 mcp get plantyp lines FM, simply by entering the name MCP_GET_PLANTYP_LINES 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 MCP_GET_PLANTYP_LINES 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 'MCP_GET_PLANTYP_LINES'"NOTRANSL: Zeilenaufbau und Planungstypbeschreibung einlesen.
EXPORTING
* I_LANGU = SY-LANGU "ABAP System Field: Language Key of Text Environment
I_SCTYP = "Planning type
* I_SCTYP_NEW = ' ' "Planning type
IMPORTING
E_MEM_LINES = "ABAP System Field: Loop Index
E_OWN_LINES = "ABAP System Field: Loop Index
TABLES
T_T445L = "SOP Planning Table Definitions
T_T445P = "Planning Types: LIS/SOP
T_T445T = "Texts: Definitions for Planning Table (SOP)
T_T445F = "Texts for Line Definitions (SOP)
EXCEPTIONS
PLANTYP_NOT_DEFINED = 1
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 MCP_GET_PLANTYP_LINES
I_LANGU - ABAP System Field: Language Key of Text Environment
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCTYP - Planning type
Data type: RMCP6-SCTYPOptional: No
Call by Reference: No ( called with pass by value option)
I_SCTYP_NEW - Planning type
Data type: RMCP6-SCTYPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MCP_GET_PLANTYP_LINES
E_MEM_LINES - ABAP System Field: Loop Index
Data type: SY-INDEXOptional: No
Call by Reference: No ( called with pass by value option)
E_OWN_LINES - ABAP System Field: Loop Index
Data type: SY-INDEXOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MCP_GET_PLANTYP_LINES
T_T445L - SOP Planning Table Definitions
Data type: T445LOptional: No
Call by Reference: No ( called with pass by value option)
T_T445P - Planning Types: LIS/SOP
Data type: T445POptional: No
Call by Reference: No ( called with pass by value option)
T_T445T - Texts: Definitions for Planning Table (SOP)
Data type: T445TOptional: No
Call by Reference: No ( called with pass by value option)
T_T445F - Texts for Line Definitions (SOP)
Data type: T445FOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PLANTYP_NOT_DEFINED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MCP_GET_PLANTYP_LINES 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_langu | TYPE SY-LANGU, " SY-LANGU | |||
| lt_t_t445l | TYPE STANDARD TABLE OF T445L, " | |||
| lv_e_mem_lines | TYPE SY-INDEX, " | |||
| lv_plantyp_not_defined | TYPE SY, " | |||
| lv_i_sctyp | TYPE RMCP6-SCTYP, " | |||
| lt_t_t445p | TYPE STANDARD TABLE OF T445P, " | |||
| lv_e_own_lines | TYPE SY-INDEX, " | |||
| lt_t_t445t | TYPE STANDARD TABLE OF T445T, " | |||
| lv_i_sctyp_new | TYPE RMCP6-SCTYP, " SPACE | |||
| lt_t_t445f | TYPE STANDARD TABLE OF T445F. " |
|   CALL FUNCTION 'MCP_GET_PLANTYP_LINES' "NOTRANSL: Zeilenaufbau und Planungstypbeschreibung einlesen |
| EXPORTING | ||
| I_LANGU | = lv_i_langu | |
| I_SCTYP | = lv_i_sctyp | |
| I_SCTYP_NEW | = lv_i_sctyp_new | |
| IMPORTING | ||
| E_MEM_LINES | = lv_e_mem_lines | |
| E_OWN_LINES | = lv_e_own_lines | |
| TABLES | ||
| T_T445L | = lt_t_t445l | |
| T_T445P | = lt_t_t445p | |
| T_T445T | = lt_t_t445t | |
| T_T445F | = lt_t_t445f | |
| EXCEPTIONS | ||
| PLANTYP_NOT_DEFINED = 1 | ||
| . " MCP_GET_PLANTYP_LINES | ||
ABAP code using 7.40 inline data declarations to call FM MCP_GET_PLANTYP_LINES
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 LANGU FROM SY INTO @DATA(ld_i_langu). | ||||
| DATA(ld_i_langu) | = SY-LANGU. | |||
| "SELECT single INDEX FROM SY INTO @DATA(ld_e_mem_lines). | ||||
| "SELECT single SCTYP FROM RMCP6 INTO @DATA(ld_i_sctyp). | ||||
| "SELECT single INDEX FROM SY INTO @DATA(ld_e_own_lines). | ||||
| "SELECT single SCTYP FROM RMCP6 INTO @DATA(ld_i_sctyp_new). | ||||
| DATA(ld_i_sctyp_new) | = ' '. | |||
Search for further information about these or an SAP related objects