Steps for Implementation:
1. Create Source and Target Tables:
a. Source Table: ZSODET_LEGACY(Sales Data Source Table).
Entries of legacy table.
b. Target Table: ZSODET_TARGET(Sales data target table) - Initially it doesn't have any record, the data will be migrated from legacy table.
2. Create a CDS View: The CDS view "ZSALESDATA_MIGRATION_USINGPP" is designed to access old sales data in a modular, secure, and efficient manner — particularly when filtered by date ranges — prior to its migration to the S/4HANA system.
Purpose of the CDS View
| Encapsulation | Encapsulates the logic to read only relevant legacy data (e.g., only for given date ranges) | Reusability | Makes the selection logic reusable across AMDP methods, reports, and more | Security & Readability | CDS views are clearer, safer, and easier to optimize than raw SELECT statements | Integration with AMDP | AMDP can easily consume CDS entities for fast, pushdown-enabled data processing in HANA |
To achieve parallel processing, we will use AMDP (ABAP Managed Database Procedures) along with the above CDS view for high performance and complex data processing directly in HANA — instead of slow ABAP logic. It runs entirely on the HANA DB, not in ABAP layer — so it's much faster.
AMDP:
3. Create Remote-Enabled FM: Wraps AMDP method in a RFC-enabled FM for remote execution.
4. Create Server Group (RFC Destination Group):
Purpose: Server groups allow ABAP programs to run function modules in parallel across multiple application servers using CALL FUNCTION->STARTING NEW TASK -> DESTINATION IN GROUP.
Steps for creating server group:
- Go to Transaction: RZ12
- Click on create assignment
- Give the server group and instance name
- Give the properties of the instance and click on Copy.
- Server group will be created and check the server group status.
- Distribute workload (for parallel execution)
5. Purpose of the Report Program
Dividing the Data: It breaks down the entire dataset (like sales orders) into smaller, more manageable pieces based on date ranges that the user can set. Starting Parallel Tasks: For every piece, the report kicks off a remote-enabled function module using STARTING NEW TASK, which lets multiple tasks run at the same time, greatly boosting performance.
Monitoring Tasks and Handling Completion: It keeps an eye on each parallel task and makes sure everything is in sync by waiting for all tasks to finish before wrapping up the process.
Enhanced Efficiency and Runtime: By using parallel processing, the report cuts down the total migration time and makes better use of system resources.
- Status Output
Once all chunks are processed, the report provides confirmation that the data migration has been successfully completed.
- Status Output
Now, check the target table to see the migrated data from legacy table.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.