Master data partition is division of the data using specific key. This can be done either using logical partition or physical partition at database level.
Logical partition is done, where numbers of attributes are huge and can be grouped together as single entity, whereas database partition is required to be done, when volume is too large. Typically database partition is done on specific set of tables.
Why Use Master Data Partition?
- When data volume is over million records, partition helps in data loading / retrieval.
- This improves data loading time
c. Improves query performance
How to do Master data partition?
There are various steps involve in partition of master data. Below steps are to be done in each system in landscape individually. These are not transportable!!!
Typically master data has P, X, S tables. If there is text, then there is T table. If object is time dependent master data, then Q and Y table will be required.
- Check the volume is each table
- If table volume is over million records, it should be partition.
- While selecting SID table – S table, consider the points mention in below sections.
- If you have higher version of DB6CONV utility (above 4.10), use program RSDB6PARTGEN to get more details.
- This is Basis activity. Separate data class is required to be created.
- A data class is the counterpart of a table-space in the SAP system. It combines a data table-space with an index table-space and defines a logical name for this combination. This logical name is referenced in the ABAP Dictionary and in the BW metadata.
- Basis team has to create a data class.
- This data class can be then assigned to master data object.
- To assign data class – edit the info object in RSD1. Go to Extras > Maintain DB parameters
- This activity can be done by Basis team or BW consultant.
- Before starting this activity, ensure that there are no data loads / roll up going on for this object. Try to do this activity during non-peak hours, to reduce the impact. Also this is best done when there is no data in the tables. (Typically plan this activity if new object is sent to production. Do these activities on existing object with data will take time and that object is not available during that period for reporting).
- Use SAP standard program – DB6CONV in SE38
- Click on New Conversion > Use Data class.
- Enter the table name and data class.
- Additional option – online conversion / Offline conversion. These depend on volume of data and current usage. In case, the object is not used – offline conversion is ok. But if object is used, go for online conversion.
- Ensure “Update Statistics after Conversion” is checked.
- Schedule the job in back ground.
- The main screen of DB6CONV shows the status of job running and details about each step can be seen under “Display Log File”.
- Once job status is finished, partition of the table is done.
- Quick way to check if the table is partition or not. Go to SE14.
- View table and then “Storage Parameters”
- SID table partition is not recommended, but if done, it improves the performance a lot.
- SID table alone cannot be partition as is. For partition of SID table, additional index is required to be created on the info object.
- Go to SE11 > view SID table to the object.
- Click Indexes. Application will show the existing index on info object.
- Edit the index.
- Add the info object as part of the index field.
- Once index is created, follow same steps as in step 3 of this document.
You should have authorization to do this activity. Else basis person is required to do these steps. Also, many times the index does not get created in database, but only exist on application layer. Basis person will have to create it manually in DB.
In each system in landscape, partition has to be done manually. This activity is not transportable.
- 1st time when object is moved across landscape, perform the activity for partition manually (step 2 & 3).
- Next time onwards (any change – added attributes / made then navigational etc) – system will take care of the object.
- Only issue is time taken to move the object. Say X table is partition, when new object is added to this main master data, navigational attributes get generated. Hence transport of this will run for long time during import and chance of import job getting cancel is high.
- Work around for this — manual method – Not support by SAP neither recommended by me!
- Copy the data from X / P / T table.
- Truncate table data.
- Import transport
- Reload the data from back up.
This all activity can be done by basis team. It is risky and all depends on way back up is taken.
- If you are adding time dependent attribute, then you can follow same steps as for table P / X.
- If you are making non-time dependent attribute as time dependent, then you can follow same steps as for table P / X.
- If you are making time-dependent attribute as non-time dependent, follow below steps:
- Identify the object that is required to be made non-time dependent. Remove this object from master data.
- Send the transport to next system in landscape and let the main master data object get activated (without your time-dependent attribute).
- Now add back the time-dependent attribute as non-time dependent in main master data object and send new transport.
If step a and c are done in same transport, transport will fail and your object will be inactive. Follow each step one by one.
- If SID table is already partition in landscape, transport with changes will always fail.
- Reason for this – the additional index added as part of step 4 (in this doc) is not transportable.
- When transport gets imported to another system, it tries to over write SID table. In doing so, it delete the existing index and create new one. Since table is already partition, it fails, as new index don’t have modified structure (as per step 4).
Below are error messages when transport fails.
- If SID table is partition and new changes have to be moved, there is only 1 way around.
- Follow below steps:
- Take backup of SID table
- Undo the partition – this is very critical step. To undo a partition please refer below part.
- Import the transport
- Redo partition and Restore data from back up.
Converting a Partitioned Table Back to a Normal Table
You can use the following procedure to convert a partitioned table back to a non-partitioned table:
- Go to SAP transaction SE14 and enter the table name.
- Click on Storage Parameters
- Click on “For new Creation”
- Select Computed from technical Settings
- If necessary adapt the storage parameters, e.g. add COMPRESS for row compression.
- Save the storage parameters.
- Perform a normal table conversion with DB6CONV
All above are based on my learning and method used in my project. Few things may be done differently / may not work in other environments.