SAP MPLAN_READ Function Module for Read Maintenance Plan
MPLAN_READ is a standard mplan read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Maintenance Plan 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 mplan read FM, simply by entering the name MPLAN_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: MPLAN_API
Program Name: SAPLMPLAN_API
Main Program: SAPLMPLAN_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function MPLAN_READ 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 'MPLAN_READ'"Read Maintenance Plan.
EXPORTING
MPLAN = "Maintenance Plan
* LOCK = "Set Locks
* WITH_HISTORY = 'X' "
* NO_BUFFER = "Do Not Read from Buffer
* NO_SI_CONVERSION = "Do Not Convert to Issue Units
* MAP_CONFIRMATION_DATE = 'X' "
IMPORTING
HEADER = "Header Data
TABLES
* ITEMS = "
* STRATEGY_CYCLES = "Cycle Definitions of Strategy
* ITEMS_ILOA = "
* ITEMS_OBJECT_LISTS = "
* CYCLES = "Cycle Definitions
* STATUS = "Status
* LONGTEXTS = "Long Text Lines
* HISTORY = "History Table
* CALLS = "Maintenance Call Table
* RETURN = "Notification Table
IMPORTING Parameters details for MPLAN_READ
MPLAN - Maintenance Plan
Data type: WARPLOptional: No
Call by Reference: No ( called with pass by value option)
LOCK - Set Locks
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_HISTORY -
Data type: BOOLEANDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_BUFFER - Do Not Read from Buffer
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
NO_SI_CONVERSION - Do Not Convert to Issue Units
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
MAP_CONFIRMATION_DATE -
Data type: BOOLEANDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MPLAN_READ
HEADER - Header Data
Data type: MPLAN_MPLAOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MPLAN_READ
ITEMS -
Data type: MPLAN_MPOSOptional: Yes
Call by Reference: Yes
STRATEGY_CYCLES - Cycle Definitions of Strategy
Data type: MPLAN_MMPTOptional: Yes
Call by Reference: Yes
ITEMS_ILOA -
Data type: MPLAN_ILOAOptional: Yes
Call by Reference: Yes
ITEMS_OBJECT_LISTS -
Data type: MPLAN_OBJKOptional: Yes
Call by Reference: Yes
CYCLES - Cycle Definitions
Data type: MPLAN_MMPTOptional: Yes
Call by Reference: Yes
STATUS - Status
Data type: JSTATOptional: Yes
Call by Reference: Yes
LONGTEXTS - Long Text Lines
Data type: MPLAN_LONGTEXTOptional: Yes
Call by Reference: Yes
HISTORY - History Table
Data type: MPLAN_MHISOptional: Yes
Call by Reference: Yes
CALLS - Maintenance Call Table
Data type: MPLAN_MHIOOptional: Yes
Call by Reference: Yes
RETURN - Notification Table
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for MPLAN_READ 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_items | TYPE STANDARD TABLE OF MPLAN_MPOS, " | |||
| lv_mplan | TYPE WARPL, " | |||
| lv_header | TYPE MPLAN_MPLA, " | |||
| lt_strategy_cycles | TYPE STANDARD TABLE OF MPLAN_MMPT, " | |||
| lv_lock | TYPE BOOLEAN, " | |||
| lt_items_iloa | TYPE STANDARD TABLE OF MPLAN_ILOA, " | |||
| lv_with_history | TYPE BOOLEAN, " 'X' | |||
| lt_items_object_lists | TYPE STANDARD TABLE OF MPLAN_OBJK, " | |||
| lt_cycles | TYPE STANDARD TABLE OF MPLAN_MMPT, " | |||
| lv_no_buffer | TYPE BOOLEAN, " | |||
| lt_status | TYPE STANDARD TABLE OF JSTAT, " | |||
| lv_no_si_conversion | TYPE BOOLEAN, " | |||
| lt_longtexts | TYPE STANDARD TABLE OF MPLAN_LONGTEXT, " | |||
| lv_map_confirmation_date | TYPE BOOLEAN, " 'X' | |||
| lt_history | TYPE STANDARD TABLE OF MPLAN_MHIS, " | |||
| lt_calls | TYPE STANDARD TABLE OF MPLAN_MHIO, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2. " |
|   CALL FUNCTION 'MPLAN_READ' "Read Maintenance Plan |
| EXPORTING | ||
| MPLAN | = lv_mplan | |
| LOCK | = lv_lock | |
| WITH_HISTORY | = lv_with_history | |
| NO_BUFFER | = lv_no_buffer | |
| NO_SI_CONVERSION | = lv_no_si_conversion | |
| MAP_CONFIRMATION_DATE | = lv_map_confirmation_date | |
| IMPORTING | ||
| HEADER | = lv_header | |
| TABLES | ||
| ITEMS | = lt_items | |
| STRATEGY_CYCLES | = lt_strategy_cycles | |
| ITEMS_ILOA | = lt_items_iloa | |
| ITEMS_OBJECT_LISTS | = lt_items_object_lists | |
| CYCLES | = lt_cycles | |
| STATUS | = lt_status | |
| LONGTEXTS | = lt_longtexts | |
| HISTORY | = lt_history | |
| CALLS | = lt_calls | |
| RETURN | = lt_return | |
| . " MPLAN_READ | ||
ABAP code using 7.40 inline data declarations to call FM MPLAN_READ
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.| DATA(ld_with_history) | = 'X'. | |||
| DATA(ld_map_confirmation_date) | = 'X'. | |||
Search for further information about these or an SAP related objects