Skip to Content
Personal Insights
Author's profile photo Michael Kernan

SAP EAM Data Migration Part 7 – Maintenance Plans

Hello All,

This is Part 7 in the series on the migration of SAP Plant Maintenance data from SAP ERP Central Component (ECC) to SAP S/4HANA® Cloud. It has been a challenging time and being able to get back to writing some more Blog Posts is a welcomed time. Personally, I have been very busy helping Customers with their SAP Journey and continue to enjoy helping them succeed.

In this blog post, I will review the Maintenance Plan objects and the key table relationships, tricks, tips and processes for migrating your data using the files approach.

Part 1 – Introduction can be found with this link Part 1. It will also have links to all of the other posts in this series.

Some of the information herein had been gathered from various SAP Blog Posts in the SAP Community, (References included where applicable) and some of it is my original work. I would like to thank all of those that have posted solutions and hopefully I have added some value that you find useful. A special thanks to Camilo Veloso (camiloveloso@hotmail.com) whose work done years back in putting a graphic of the SAP PM Table Relationships out on the internet was a time saver and many of the relationships started from that work. I have expanded the work into what is shown herein.

Some Basics

Maintenance Plans – The Maintenance Plans can be Strategy Based, Single Cycle, Counter Based or Multi-Counter Plans. There are options for calling them from Conditioned Based Maintenance systems. Customer uses Strategy Plans exclusively to give them control over the end date for the work orders (Late Lag on the maintenance package in the strategy).

MPLA – Maintenance Plan

MPOS – Maintenance Plan Item

OBJK – Object List

Maintenance Items – are basically the Technical Object and task list linkage, also the object list is created, and all linked to the Maintenance Plan.

MPOS – Maintenance Plan Item

OBJK – Object List

Data Relationship Diagrams

In this series, I have included diagrams to explain some of the key relationships between the tables. The legend for the diagrams is as follows:

Data%20Relationships%20Diagram

Maintenance Items and Plans Data Relationships between Tables

File Preparation Activities

There are some extensive preparation steps needed to get the extracted files ready for the load format.

Be very mindful of the validity dates for the task lists as these will cause errors when calling the maintenance plans if there is no valid task lists when the plan is called.

Due to the various hierarchies and other tables to be used for reference, the following file preparation activities are complex and require a good knowledge of excel. This is not an exhaustive list, and has the steps we went through to get the files ready to be loaded using the LSMW Tool (Legacy System Migration Workbench) even though it is not recommended for S/4HANA, in our case it still functioned for this object. Please be aware that it may not be available in future releases of S/4HANA.

If you have any suggestions or additional tips, corrections or advice, please comment and share.

In general, we used transaction SE16N to extract data from specific tables and then exported to Excel. In some cases we had other programs that created text files that we subsequently imported into Excel for further processing. Depending on your situation, you might need to add additional selection criteria for a table extract to get the data relevant for your project.

Note: This Customer added to the descriptions of the maintenance plans when the plan was inactivated for a short time, or deactivated for a longer period. They did use the system flags for Inactive and Flagged for deletion so both ways needed to be checked to get the valid plans.

We also used an external number range for the maintenance plans to match the legacy numbers as they had some condition based maintenance tied to measurement reading in a separate Process Control System that either call a create notification or a manual call of a maintenance plan, depending on the settings on the PI Tags. The maintenance items were kept internal as these were not tied tot he PI Tags.

MPLA – Maintenance Plan Header – File Clean up

  • Use SE16N for MPLA STRAT = Blank, XXXXXX, (Enter the specific strategies that are valid. Execute. (May be optional depending on how extensive the Customer uses Strategies.
  • Filter description for “allocated”, “dealloc”, “Available”, “reuse”, “re-use”, “deleted”, “blocked” items and delete them from MPLA download.
  • Run IP16 for all Maintenance Plans, look at the Status and get all plans that have the DLFL and/or INAC Status, use this to check the valid plans in MPLA. Download and save as IP16_Maint_Plans_CRTD.xlsx
  • In MPLA Insert column B to right of WARPL named Status.
  • Use IP16 report to do a VLOOKUP using WARPL in MPLA to see if WARPL is still valid from IP16 Report
  • VLOOKUP for WARPL to get status (DLFL INAC).
  • Check with Business prior to removal of WARPL’s that are DLFL. If only INAC, also have business to verify keep or go.
  • Also have business enter the valid PLAN_SORT Values from the dropdown list of values. If used)
  • After Clean-up of MPOS Table do a VLOOKUP between MPOS and MPLA to see if WARPL still have valid items, if not remove the plans.
  • A separate effort to set the cycle start dates will be accomplished from the MHIS Tables and review by the business.
  • Remove status columns for MPOS and MPLA after deletion.

MPOS – Maintenance Plan Items – File Clean up

  • From MPLA copy the WARPL and use as input in SE16N for table MPOS to download file
  • Sort by description (PSTXT)
  • Look for “deallocated” and “reuse” and “re-use” and “deleted” and “blocked” items and delete them Look at the strategies that are blank to see if items are deallocated and delete them.
  • Insert column B to right of WARPL named Status.
  • Use IP16 report to do a VLOOKUP between IP16 report and MPOS to see if WARPL is still valid
  • Check with Business prior to removal of WARPL’s that are DLFL. If only INAC, also have business to verify keep or go.
  • Filter MPOS-WARPL for Blanks and copy to new tab. Send to business to see if these are still valid.
    • Check these against the valid Functional Locations and Equipment, (TPLNR and EQUNR) are #N/A delete them as they are no longer being converted.
  • After Clean-up of MPOS Table do a VLOOKUP between MPOS and MPLA to see if WARPL is still valid. if not remove the items.
  • Make needed Work Center substitutions
  • The Columns for TL_INDEX and TLINDEX2 are used to validate between the PLKO and MPOS tables.

Maintenance Item Translation Old to New

  • Will need to create a translation table between the old Maintenance Item Number and the New Maintenance Item Number once the maintenance plans have been loaded in S/4Hana.
  • Run Transaction IP18 Maintenance Items List in S/4 to get the new items and plans. Include the Maint plan number, item, description, functional location, and equipment, any other fields you want for validation are ok as well. Export to excel.
  • Run IH08 and get a list of equipment, with the functional locations. Use this to update any equipment that is missing functional location in the Load file for the maintenance Plans and Items.
  • Insert Column A and call it INDEX, concatenate the Maintenance plan number, functional location and equipment fields to make the INDEX
  • In the load file for the maintenance plans and Items, on the items tab, Insert Column A and call it INDEX, concatenate the Maintenance plan number, functional location, and equipment fields to make the INDEX
  • In the IP18 file insert Column A for old Maintenance item and do a VLOOKUP using the created INDEX and bring in the old maintenance item number into the file.
  • Check for #N/A and check to see if the functional location was included in the load file for equipment items, copy the INDEX from the new file and update the old maintenance item or remove lines

OBJK – Objects List

  • Use SE16N for Table OBJK, use MPOS to get OBKNR >0 for the maintenance items and enter the Object List Fields OBKNR. Enter a W in the OBJVW field.
  • Download list and lookup ILOAN using ILOA to get functional locations.
  • Use IH08 to get functional locations for equipment.
  • Filter out #N/A
  • Use the translation of Old to new Maintenance Item Numbers to get the New WAPOS by doing a VLOOKUP on the Old Maint Item Number.
  • Filter for OBKNR>0 and NEW WAPOS = #N/A and Delete
  • Where OBKNR >0, copy the new maintenance item, Floc and Equip number into object load file.

T351 – Maintenance Strategies

  • Use SE16N to extract the data for the relevant strategies from table T3511P. Download to excel and save as T3511P Strat and Package.xlsx.
  • In file T3511P Strat and Pack Insert temp column to right of ZAEHL, in new column F, use formula =C3*1 to convert the value in ZAEHL to a number, copy it down for all rows. Format it with General. Copy and paste values. Replace Values in ZAEHL with values from column D and Delete Column D.
  • In the File T3511P Strat and Pack, insert Col A and Call INDEX. Concatenate the fields STRAT and ZAEHL, then convert to values.

MPOS – Maintenance Plan Items Task List Cross Reference

  • After the Equipment Task List and functional location load files complete, download list to spreadsheet with new groups, counters and external identification fields so that a translation can be made from the old group to the new group. Move the External Identification field to Column A.
  • Insert 2 Columns in Maintenance plan load file, maintenance Items tab to the left of the PLNTY Field.
  • In one column, concatenate the PLNTY_PLNNR_PLNAL fields
  • Filter the PLNTY for E = Equipment or T = Functional locations, (A = General may not be needed if you used the legacy ID for the PLNTY).
  • Do a VLOOKUP using the concatenated fields with the downloaded list for the Equipment task lists and get the new Group number. Save as values.
  • Check the group counters and copy the new group numbers to the PLNNR field.
  • Do the same for the functional location task lists and the PLNTY = T.
  • Delete the two columns inserted in the load file after the functional locations are corrected
  • Make sure to include the functional location for the equipment related items, use the IH08 report to get the functional locations
  • Use the IH08 Report to validate the equipment numbers as well.
  • Validate the work center in the Maint Plan tab.

Updating Start of Cycle Dates for Maintenance Plans

MHIS – Maintenance Plan History

  • Download MHIS using list of maintenance plans from MPLA.
  • NOTE: We did not have any Maintenance plans that created notifications. Would need to do something similar with the QMIH Table. We also did not have any counter-based plans, so that is not included here.
  • Align columns per MHIS COLUMN DEFINITION list below.
  • Copy and insert into separate excel file and paste – Transpose so that the field descriptions are across the top of the spreadsheet. Name file MHIS COLUMN DEFINITION, and align fields in MHIS
    • MaintenancePlan WARPL
      Strategy STRAT
      Maint Plan Description WPTXT
      Package ZAEHL
      SchedulngType TERMA
      Call Number ABNUM
      Previous call VGNUM
      Cycle start STADT
      LastCallDate ABRUD
      LastPlanneddate NPLDO
      Last Completion LRMDT
      NextPlanned Date NPLDA
      Future Call date HORDA
      Compl.Predecess NPLDZ
      Fixed/Skippeddate FIXDA
      ManualCallDate MANDA
      SchedIndic. TERMK
      SchedStatus TSABR
      SchedStatus TSVBT
      SchedStatus TSENQ
      SchedStatus TSENM
      Sched. status TSTAT
      Changed by FIXDU
      Late Completion VERSCH
      Tolerance (+) TOLER
      CycModifFactor SFAKT
      Package cycle ZYKZT
      Lead float PUFFP
      Follow-up float PUFFN
      Time offset OFFZE
      Time offset OFFZO
  • Filter on data field names (Row 2), not descriptions
  • Delete unneeded Columns
  • Save File as MHIS_Cleaned.xls and use this going forward.

MHIS Clean-up (If you have a better way to clean up the start dates, please share!)

  • In File MHI_Cleaned.xlsx Insert Column B for STRAT
  • Do a VLOOKUP with MPLA to get strategies based on WARPL
  • Insert Column C for Description of Maintenance Plan (WPTXT)
  • Do a VLOOKUP with MPLA to get WPTXT
  • In the file MHIS and the T351P file, insert Column B for INDEX and Concatenate the fields STRAT and ZAEHL, save as values
  • Use File T3511P Strat and Pack to add ZYKL1, ZEIEH and KTEXT1 by inserting columns to the right of ZAEHL. Do a VLOOKUP from MHIS and T351P, using INDEX to get fields ZYKL1, ZEIEH and KTEXT1.
  • Save as values. Save File.
  • Close File T3511P Strat and Pack
  • Filter STRAT and exclude strategies not relevant (ie for CBM, are not scheduled on routine basis)
  • Filter STADT for Blanks (Manual Calls)
  • Delete entries with manual calls, not strategy XXXXXX or XXXXXX
  • Remove filter on STRAT
  • Format ABNUM to 3 characters with leading zeros =TEXT(REF,”000”). Save as values.
  • Initial Sort of File by WARPL A to Z, ABNUM Largest to Smallest, ABRUD Newest to Oldest
  • Filter STRAT (Strategy = DU-WNH) and filter UoM (ZEIEH) for WK, and Last Completion Date (LRMDT) = blank, delete the entries as these are typically future calls or if in the past calls on hold. This should give you the weekly duration last completed.
  • Filter STRAT (Strategy = DU-MNH) and filter UoM (ZEIEH) for MON and then filter Duration for 1 MON. and Last Completion Date (LRMDT) = blank, delete the entries as these are typically future calls or if in the past calls on hold. This should give you the Monthly duration last completed.
  • Do the same for 2, 3, 4, 5, MON Durations
  • For the durations that are 6 month and UP TO 11 MON, delete the blank LRMDT that are way in the past and leave the blank LRMDT that has dates for this year as these are orders that are probably In-Process. Any NEXT PLANNED DATE (dates for following years and beyond can be removed.)
  • For the durations that are 12 mon or more don’t delete any rows for future dates.
  • Menu Path Data > Remove Duplicates, unselect all, then select fields WARPL, WPTXT, Zaehl
  • click OK to remove duplicate values
  • This should be the list of maintenance plans and the last call date (ABRUD)
  • SAVE FILE!
  • Review file for duplicated WARPL Entries and check if the WPTEXT reflects multiple Frequencies and highlight them to see which dates should be used for the start of cycle.
  • If the duplicated WARPL Entries have different frequencies (ZYK1) delete older entry(s)
  • Check for WPTEXT not matching KTEXT1. Example – (60MON) in WPTEXT and 024 MONTH in KTEXT1
  • Insert column B to right of WARPL named Status.
  • Use IP16 report to do a VLOOKUP between IP16 report and MPOS to see if WARPL is still valid
  • For all status that is DLFL, delete. (Should be none) then delete status column after check.
  • If there are multiple entries for WARPL, Do a second Sort by WARPL A to A, STRAT A to Z, NPLDO Newest to Oldest and ABNUM Largest to Smallest
  • Menu Path Data > Remove Duplicates, unselect all, then select fields WARPL, STRAT, WPTEXT click OK to remove duplicate values
  • Use NPLDO as the Cycle start date in the Maintenance Plan Load File
    • If NPLDO is Blank, check ZYKL1 value and compare to last call date to see if applicable to be used.
    • Check next planned date to see when it to occurs
    • Update all dates to start at beginning of the month instead of middle
    • Filter STRAT for XXXX02 (Weekly) and adjust last planned date so that start of cycle starts in current week or in the future if these are being deferred for starting the plans.
    • Filter STRAT for XXXX01 (Monthly). Insert Column to right of NPLDO call it New Cycles Start Date (STADT2)
    • Insert Formula =M3-14 to get date that starts at the beginning of the month. Remove filter on STRAT and save new STADT2 as values. (This will depend on if you are using forward or backwards scheduling. Customer changed from backwards to forward scheduling so we needed to adjust the start dates to the beginning of the month.)
      • If date is blank or not at beginning of the month, adjust accordingly. For Blanks look at next planned date and back up date for the package duration. If the next planned date is 2019, use that date adjusted to the beginning of the month.
      • If the ZYKL1 is 120, and if NPLDO is Blank, use 1/1/2020 as the start of cycle
      • If there is a date check to see if coming due and only adjust if necessary
        • Also check Last Completion and use it and look at cycle start, if at beginning of year, use the beginning of the year when last completed
        • Check next planned date and subtract duration to see if it is more applicable.
        • Check each of the durations separately and update the cycle start to reflect current dates that will drive the next call.
      • Use the STADT2 as the start of cycle (STADT) in the load file. Use VLOOKUP to populate in the load file.

LSMW for Maintenance Plans

Like the task lists, the SAP Legacy System Migration Workbench uses a method to create the maintenance plans

The IBIP structure is as follows;

ZIBIPMPLA – Maintenance Plan

ZIBIPMPOS – Maintenance Items

ZIBIPTEXT – Long Text

ZIBIPOLST – Object List

You have different levels for example level 1 – header then below that level 2 – Maintenance Items, then below that you have level 3 – Long text, Object List.

  • For each of these levels you need an identifier that links then together. In your source file.
    • Use the existing field RECORDNAME for header,
    • RECORDNAME and INDEX2 for Maintenance Items, Long Text
    • RECORDNAME and INDEX2 and INDEX3 for all items below the Maintenance Items (Object List).
  • This way the system can create the correct structure when it reads the data from the text files.
ZIBIPMPLA – Maintenance Plan
TCODE Transaction Code
RECORDNAME IBIP: Name of the Data Transfer Rec

 

ZIBIPMPOS – Maintenance Items
TCODE Transaction Code
RECORDNAME IBIP: Name of the Data Transfer Rec
INDEX2 Item Index

 

ZIBIPOLST – Object List
TCODE Transaction Code
RECORDNAME IBIP: Name of the Data Transfer Rec
INDEX2 MPOS INDEX
INDEX3 OBJLIST Index

 

ZIBIPTEXT – Long Text
TCODE IBIP:TCode (Only Entered in Header
RECORDNAME IBIP: Name of the Data Transfer Rec
INDEX2 MPOS INDEX

Align the field from the tables with the load files and copy into the load file spreadsheets. If you are using the internal number range for the maintenance plans, WARPL = ! and WAPOS can be Blank on the MPOS File.

If you r functional locations exceed 40 characters, make sure to copy them from TPLNR to STRNO in the MPOS File.

Change the field names in the OBJK File and LSMW Source fields for TPLNR2, EQUNR2 and STRNO2. Make sure the mapping is updated.

The identifiers are numeric and will disappear once the files are loaded. specify them in the source structure as 2 or more characters and remember to set the excel file up to have a length of 2 or more characters field.

For the header file each line will be a new identifier 1,2,3, etc.

Closing Comments

The conversion of Maintenance Plans is fairly straight forward and the challenging part is the filtering of the MHIS Table, especially if there are a lot of calls in this table. We spent a  lot of time with the business reviewing the new start dates to get aligned correctly and we got about 98% correct. There were a few that we had to restart, it was a pretty straight forward process an went quickly.

With the latest releases of SAP S/4HANA Migration Cockpit, there are LTMC tools that incorporate the Maintenance Plan Conversions. I am looking forward to applying some of this to the new tools to see how it goes.

Please stay tuned for the next Blog Post in this Series SAP EAM Data Migration Part 8 – Notifications, coming soon. I look forward to your comments, feedback and engaging conversation. Please follow my profile to get updates as new content is added.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.