SAP EAM Data Migration Part 2 – Work Centers
This is Part 2 in the series on the migration of SAP Plant Maintenance data from SAP ERP Central Component (ECC) to SAP S/4HANA® Cloud. In this blog post, I will review the work center object 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
Part 1 has the links to the other Blog Posts
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 (email@example.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.
Work Centers in SAP Plant Maintenance
Work Centers are fundamental objects in SAP Plant Maintenance that drive a lot of functionality. Work Centers in SAP Plant Maintenance can be groups of people, individual production machines, unique equipment or tools that are used in maintaining other equipment and must be scheduled. Depending on the type or Work Center category, data is maintained accordingly. There is a difference between what is called the Main Work Center which is the supervisory group to ensure work gets done, the Work Center on the Work Order Operations which perform the specific operation and the Work Center as a production machine which is a reference object that can be used to show when production machines are to be scheduled for maintenance to minimize production loss.
Work Centers, when used for people, are typically organized around a skill, trade or specific function. If the SAP Human Resources Module is in use, the internal employees can be linked to Work Centers for capacity planning, resource scheduling, qualifications assessment and assigning specific people to operations in the work order. There are also several ways that external contractors can be represented for similar assignments.
The key components in a Work Center are the control key (internal vs external), capacity (how many resources are available and who can be assigned), costing (what cost center and activity type/rate are applicable), scheduling (when are the resources available) and qualifications (what skills are required to perform the work).
Work Centers are used extensively throughout the SAP Plant Maintenance Objects. They are integrated in the equipment and functional locations that allow defaulting into notifications and work orders / operations, task lists, maintenance items, confirmations, just to name a few.
Because of this integration into the SAP Plant Maintenance business processes, it is critical to get right and depending on the Customers requirements, the design for the Work Centers can vary from simple to quite complex. For the Work Center conversion the SAP S/4HANA Data Migration Workbench was used to load the Work Centers.
This was a fairly straight forward extraction and conversion object for this Customer as standard functionality was maintained, hierarchies were not used nor were qualifications and skills used.
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:
Work Centers Data Relationships between Tables and Objects
The following Diagram describes the key relationships between the work center tables and other key objects that were relevant for the Customers migration efforts
Steps To Extract The Tables And Prep The Load Files
CRHD – Work Center Header
- In Transaction SE16N, enter CRHD for the table, then select Work Center Object Type = A (OBJTY) and Category 0005 (VERWE), Plant #### (WERKS), Deletion indicator = Blank
- Further refine list based on work center no longer relevant or is being consolidated (run transaction CR05 to get list of locked/deleted work centers and do VLOOKUP with CRHD)
- Can also download table CRTX or CRHD_V1 with OBJID and get list of text for the work center descriptions.
- In downloaded spreadsheet for CRHD, change the Control Key (STEUS) for all work centers as appropriate.
- Optional – delete columns for PAR01- PAR06, PARU1 – PARU6, PARV1 – PARV6, VGM01 – VGM06, ZGR01 – ZGR06, if blank and any other empty columns.
- Optional – ignore entries in MATYP, CPLGR, SORTB, these are on the technology tab and may not be relevant.
- VGWTS = SAP0 (Standard Value Key)
- Move KAPID column to Column A., Sort by OBJID initially. You will sort by KAPID later for other steps.
- Once the list is set, save as CRHD_005_ALL all and use in later steps and other objects to look up work center name based on OBJID.
- In the Work Center load template, Work Center Header tab: Insert column A for OBJID and align CRHD columns with data load template for copying into load file.
- FORKN may need to be changed to SAP008
- FORTN may need to be changed to SAP004.
- PLANV may need to be 04
- KTEXT needs to be brought in for the description of the work center in the load file.
- KAPID in load file needs to be removed for the work center header tab.
- VGDIM and VGARB in the work center header tab needs to have TIME and HR entered for every line item.
- FORN1 needs to be SAP008
- PDEST will need to be updated as the printer ID’s will all change. Update if known, enter the new printer ID, otherwise manually update after conversion once the printers are identified in the system..
- Sort by ARBPL A to Z
CRHD_V1 – Work Center Generated Table View
- In SE16N use refined list from CRHD to find work center description via VLOOKUP with OBJID between CRHD and CRHD_V1 and add to CRHD_005_ALL above.
CRCA – Work Center Capacity Allocation
- In SE16N use refined list from CRHD, use internal Work Center Number OBJID to get to valid Capacities.
- Insert column A for ARBPL, and do a VLOOKUP between CRHD_005_ALL and CRCA using OBJID to get ARBPL.
- KAPID is the internal ID for the Capacities that are applicable for each OBJID.
- Valid from Date is BEGDA, End date is ENDDA (latest will always be ENDDA = 12/31/9999
- Use KAPID to VLOOKUP entries valid in KAKO
- In the Work Center load template, Work Center Capacity tab, Insert column A for OBJID and align CHRD columns with load template, for copying into load file.
- FORKN = SAP008 for all entries. Might be different for other Customers.
- Sort by ARBPL A to Z and CANUM lowest to highest.
- Will be used on several of the Work Center load template tabs, (Work Center Capacity, Interval of Available Capacity, Capacity Shift Values and Work Center Cost Center.)
CRCO – Assignment of Work Center to Cost Center
- In SE16N use the Work Center Internal ID OBJID from CRHD to get the valid cost centers, activity type, etc.
- Valid from Date is BEGDA, End date is ENDDA (latest will always be ENDDA = 12/31/9999, Filter on ENDDA not = to 12/31/9999, delete all entries. You should have two remaining entries for each work center.
- Filter LANNUM = 1 and Delete entries
- Change KOKR to XXXX as appropriate.
- Check assigned cost centers against valid Cost centers for target system.
- Make sure CRCO-FORML has SAP008 for all entries. This field will map to FORN1 in the Work Center load template, tab for Work Center Cost Center
- Align table with Work Center load template, tab for Work Center Cost Center to copy into load file for work center and cost center
- Check activity types in LSTAR in CRCO. In load file LSTAR = LARN1 Not LSTAR1
KAKO – Capacity Header data with short text
- In SE16N use internal Capacity ID (KAPID from CRCA) to get the relevant records
- Change HRS to HR for KAPEH and MEINS (Depends on Settings)
- Factory Calendar: Change as needed to the valid calendars in the load file.
- Add Columns for OBJID and ARBPL, do VLOOKUP with CRHD_005_all to get values based on KAPID.
- BEGZT, ENDZT, and PAUSE are in Seconds, (60 sec x 60 min x 24 hours = 1 day) need to convert to Time units HH:MM:SS (Excel Time = Number of Seconds / 86400 to Days) Change cell format to Custom h:mm:ss.
- Check for Capacity (ANZOR) = 0 There shouldn’t be any 0’s in the capacity of the work center. Need to go back to planners to find out what the capacity should be.
- Check for (NGRAD) Utilization = 0, This means there is no capacity in the work center. Should 100% or 80% or 125% for example.
- Sort by ARBPL A to Z.
- Align table with Work Center load template, will be used on several tabs – Work Center Header tab, Work Center Capacity tab and Interval of Available Capacity tab to copy select fields into load file.
KAZY- Capacity Header data with short text (Only if relevant)
- In SE16N use internal Capacity ID (KAPID) from CRCA to get the relevant records.
- Do a VLOOKUP against CRHD_005_all to get KAPID not included in KAZY, Add the missing work centers, default version 1 (VERSN) and copy values from another work center to all missing entries.
- Only DATUB = from (Earliest Validity Date used across all master data elements) Ex.,1/1/2015 to 12/31/9999 where multiple KAPID and VERSN from 1 to 3.
- Insert column A in KAZY for work center name (ARBPL) and do VLOOKUP with CRHD field KAPID to get ARBPL (in CRHD you may have to move column that is KAPID to column A)
- Align table with Work Center load template, Interval of Available Capacity tab to copy into load file.
- In the Work Center load file, the Intervals of Available Capacity tab to get DATUV, Insert Column to right of DATAB (Valid to) and call it DATUV (Valid From), for each version 01 and 03, create a formula that adds one day to the date in DATUB for the previous entry. If version 01 has a DATUB of 12/31/9999, no need for any formula. If there are multiple entries for version 03, then the first entry has a blank DATVU and the second entry has the formula to add one day to the DATUB to get the correct DATVU value.
Sort by ARBPL A to Z, VERSN low to high, DATUB Oldest to newest
KAPA – Shift Parameters / Intervals (Only if relevant and if needed for conversion)
- In SE16N use Capacity ID from CRCA to find relevant records.
- Insert column B for ARBPL for work center name (ARBPL) and do VLOOKUP with CRHD field KAPID to get ARBPL (in CRHD you may have to move column that is KAPID to column A)
- Also insert column for ARBPL and do a VLOOKUP with CRHD_005_all to get Valid entries for ARBPL, delete the #N/A entries as no longer valid.
- Only need last intervals or ones in the future DATUB that start after base validity date, ex.,01/01/2015
- BEGZT, EINZT, ENDZT, KAPAZ are in Seconds, need to convert to Time units HH:MM:SS (Excel Time = Number of Seconds / 86400) Change cell format to Custom hh:mm:ss.
- Align entries with KAZY, remove VERSN 02 entries,
- Insert Columns for WERKS (XXXX) and CANUM (512) to the right of ARBPL for ease in copying to load file.
- Align table with Work Center load template, Capacity Shift Values tab to copy into load file.
Final Load File Preparation
- Align the fields in the extract files with the fields in the load file template as needed. Not all fields are needed for the load file.
- Once load file is ready, remove from Work Center Header tab OBJID (Column A that was inserted earlier). Make sure field KAPID is blank as this is created internally upon initial load.
- Once load file is complete remove from Work Center Capacity tab OBJID and KAPID (Columns A and B that were inserted earlier).
- Once load file is complete remove from Work Center Interval of Available Capacity tab the KAPID (Column A that was inserted earlier).
- Make sure Capacity Category = 002 (KAPAR) on the Work Center Header and the Work Center Capacity Tabs.
- On Work Center Header Tab, make sure VGDIM and VGARB are filled out with TIME and HR respectively.
Work Center Load File Structure
Used the SAP S/4HANA Version 1709 Data Migration Workbench for the loading of the Work Centers for SAP Plant Maintenance. The load file has separate tabs for Header information, Capacity, Intervals, Shifts and Costing. Current versions may have more fields and functionality so it is important to always use the up to date templates.
For additional information about migration templates, see the SAP Help Portal (currently available for SAP S/4HANA Cloud only): https://help.sap.com/s4hana. Choose <your release> → Product Assistance → English → Data Migration → SAP S/4HANA Migration Cockpit → Migration Objects for SAP S/4HANA → Available Migration Objects.
Manual Conversion of Employee Assignment to Work Centers
The SAP Human Resources (SAP HR) Mini-Masters were manually maintained by Customer for the employee scheduled absences as there was no integration between new Non-SAP Human Resource System and SAP S/4HANA. There are standard conversions available to load and it depends on the number of employees that are to be loaded. Customer chose to manually create the master data due to the relatively small number of records.
HR Org Structure – to be created manually by SAP HR Consultant
- T-Code is PPOCE to manually create
HR Mini-Masters – To be created manually by SAP HR Consultant
- T-Code is PA30 to manually create
Assign Employees to Work Centers – This was a manual process as there were only about 100 people to be assigned to the work centers as part of the cutover using T-Code IR02, on the Capacity Header tab, use the HR Assignment button. We did some employee assignment to multiple work centers.
Qualifications assigned to Employees – This was not relevant for this Customer.
Make sure to use a validity start date (BEGDA) that is in the past far enough to accomodate the starting dates for Maintenance Plans, Task Lists, etc. Also work with the Finance Team to have the cost centers, activity types and rates with matching start dates so that there are no issues when trying to create objects and schedule maintenance plans for the first time.
Validity Dates will cause all kinds of problems and errors so pay close attention to them!
If the Customer does not need to use intervals of available capacity, it does make the conversion process easier. After go-live and with discussions with the Customer, it was determined that the intervals of available capacity are always manually created when needed and we could have avoided this conversion piece and saved some time.
Customer did not use the Work Center Hierarchies and I believe the SAP S/4HANA Data Migration Workbench does not yet support the creation of the Work Center Hierarchies. If anyone knows different, please let me know.
This is an object that once the Cost Centers and Activity types are created by the Finance Team, can be loaded early, before cutover starts into the Production Client.
Please stay tuned for the next Blog Post in this Series SAP EAM Data Migration Part 3 – Characteristics and Classes, coming soon. I look forward to your comments, feedback and engaging conversation. Please follow my profile to get updates as new content is added.
Awesome, Looking forward for further blog post, thank you for your time and information.
Your Welcome, please check the Like and also follow me to get updates as they occur.
Hi Michael, Thanks for your time and information.
We are using transaction LTMC to upload Work Center.
But in the LTMC template file there is no tab for HR data (assignment to HR organizational entity).
As far as you know, are there no standard object to upload this information (Work center : assignment to HR org. entity) ?
Depending on the version of the LTMC that you are using, you are correct. I suggest that if you have a large number of employees to assign to work centers that you look into a custom development. If you have a small number, then manual assignment is the way to go.
Thank you Michael.
There will be 250 Work Centers to upload.
We are trying to create a specific LTMC object that will call HR function modules used by IR02 transaction to assign HR entity.
Thanks for this document. It is really helpful in understanding the logic. I am working on Production resources and facing one issue.
Our logic goes as below:-
Fetch the KAPID from KAKO and get the KAPAR(capacity Category) . Next we join KAPID from KAKO to CRCA to get the OBJID. Now for same OBJID in CRHD KAPID is missing or maintained as 000000.
We are trying to implement this as in Work center template Header has capacity category and same category is there in Work Center Capacity view. But with the above discrepancy we are unable to place the category in header hence the LTMC fails.
Can you please suggest if this is the correct way I am looking into this?
Capacity category in header
Capacity Category column in work center capacity
Thanks in advance.
Are you also taking into account the OBJTY for the OBJID? Those are two are the keys to make sure the results are unique.
Yes I am taking those fields when joining CRCA and CRHD.
I am attaching the sample sql result data from our ecc schema of hana DB(ECC) where records are containing such data. Can such data be there in the source ECC system where the CRHD KAPID has no reference to CRCA/KAKO even though OBJID and OBJTY is same?
Sample ECC source case
Have you looked in the ECC System to see what is being displayed in IR03 or CR03 for the specific work center in question? Look at the Capacity Tab and go to the header and details, check if there are multiple capacity segments assigned to the work center. Just a guess.
Thanks for your elaborate analysis.
Pardon me but I think am still missing something. In the header tab we have Work Center/Resource. Can't we pass a new value (non existing Work center in CRHD) over there? If that can't be done then what's the process of 'creating' a new Work Center?
I tried to pass a value in that field and it threw error in mapping state.
Thanks a lot in advance!
What version of SAP S/4HANA are you implementing and are you using the Migration workbench tools for the upload of the work centers? Please make sure the OBJID fields are blank as per the instructions above. Also make sure the other tabs in the workbook are filled in correctly to complete the load efforts.
Thanks for your response. We are using 2020 version. I am using Migration cockpit (LTMC) and not migration workbench(LSMW) as of now.
Let me attach here ss from the workbook that I am using. Could you please check once if you have couple of mins.
Thanks a lot!
Work Center Header Tab
Work Center Capacity Tab
A couple of things to consider.
Make sure your Work Center ID is within the allowable character length
Make sure that some of the internal number do not have values in them.
Make sure your formulas are correctly defined.
Make sure the other tabs are correctly filled in to complete the build out of the file and load.
What errors are you getting?
This is the issue am getting as of now. Made those couple of points double sure but can't see an issue there.
Check the length of you work center ID, you have 11 Characters and ARBPL is 8 an Character field..
Is the CAF1 Plant a valid Plant?
Spot on the Master! Trimming it to 8 chars and solving few other config issues enabled us to load the data. Immense thanks for your help! A true savior!
no worries, glad it is working.