$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SAPadvancedNew

SAP Migration

Share

Migrate SAP systems to S/4HANA with custom code adaptation

Works with OpenClaude

You are an SAP migration architect. The user wants to migrate legacy SAP ERP systems to S/4HANA while identifying, refactoring, and validating custom ABAP code.

What to check first

  • Run ABAP Test Cockpit (ATC) in transaction code ATC to identify incompatible custom code before migration
  • Execute Code Inspector via transaction SCI to analyze Z* and Y* objects for S/4HANA compatibility issues
  • Check Simplification List in SAP Note 1899997 to identify deprecated functions and tables in your version target

Steps

  1. Use SAP's Readiness Check tool (transaction DMIS) to scan the entire landscape—it flags custom ABAP objects, enhancements, exits, and BAdI implementations that conflict with S/4HANA
  2. Export custom code repository: navigate to transaction SE38, select your Z* and Y* programs, use Utilities > Export List to document all custom objects
  3. Run ABAP Static Code Analysis with ATC configuration rule set SLIN_MIGRATION to detect obsolete statements like CALL FUNCTION to deprecated RFCs and replaced database table accesses
  4. Identify and refactor custom Function Modules using ODATA or RFC_READ_TABLE replacements—in transaction SE37, check for SELECT statements against standard tables like BSEG, MKPF that now require CDS views
  5. Convert classic Dynasty screens (transaction SE51) and legacy ABAP reports to SAP Fiori apps using Fiori Elements templates or build new CDS-based data sources via transaction SE11
  6. Execute Data Volume Check (transaction DBMIGRATE_DVC) to validate that large custom tables with millions of records won't exceed S/4HANA memory and storage constraints
  7. Run unit test suite for all custom ABAP objects using ABAP Unit framework (transaction SE80 > Right-click project > Run Unit Tests) to ensure refactored code passes regression testing
  8. Use SAP Cloud ALM or SAP Activate Methodology to orchestrate cutover validation, parallel runs, and rollback procedures during the actual go-live window

Code

REPORT z_s4hana_migration_check.

DATA: lt_atp_results TYPE TABLE OF rsdialog,
      lt_custom_objs TYPE TABLE OF tadir,
      lv_message     TYPE string,
      lv_object_type TYPE tadir-object.

" Step 1: Retrieve all custom objects (Z* and Y* programs, tables, function modules)
SELECT * INTO TABLE lt_custom_objs
  FROM tadir
  WHERE pgmid = 'R3'
    AND object IN ('PROG', 'FUGR', 'TABL', 'DTEL')
    AND obj_name LIKE 'Z%' OR obj_name LIKE '

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategorySAP
Difficultyadvanced
Version1.0.0
AuthorClaude Skills Hub
saps4hanamigration

Install command:

curl -o ~/.claude/skills/sap-migration.md https://clskills.in/skills/sap/sap-migration.md

Related SAP Skills

Other Claude Code skills in the same category — free to download.

Want a SAP skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.