abap-cloud-migration
Help with migrating classic ABAP custom code to ABAP Cloud including custom code adaptation, identifying unreleased API replacements, generating wrapper classes for unreleased objects, ATC Cloud Readiness checks, handling incompatible language constructs, and step-by-step migration workflows. Use when users ask about migrating to ABAP Cloud, custom code migration, cloud readiness, unreleased API replacement, wrapper pattern, ATC cloud checks, code adaptation, classic to cloud migration, S/4HANA cloud migration, or clean core compliance. Triggers include "migrate to ABAP Cloud", "cloud readiness check", "unreleased API", "replace with released API", "custom code adaptation", "wrapper for unreleased", "ATC cloud", "clean core migration", "move to tier 1", or "ABAP Cloud compatibility".
likweitan · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add likweitan/abap-skills --skill abap-cloud-migrationAbout this skill
name: abap-cloud-migration description: Help with migrating classic ABAP custom code to ABAP Cloud including custom code adaptation, identifying unreleased API replacements, generating wrapper classes for unreleased objects, ATC Cloud Readiness checks, handling incompatible language constructs, and step-by-step migration workflows. Use when users ask about migrating to ABAP Cloud, custom code migration, cloud readiness, unreleased API replacement, wrapper pattern, ATC cloud checks, code adaptation, classic to cloud migration, S/4HANA cloud migration, or clean core compliance. Triggers include "migrate to ABAP Cloud", "cloud readiness check", "unreleased API", "replace with released API", "custom code adaptation", "wrapper for unreleased", "ATC cloud", "clean core migration", "move to tier 1", or "ABAP Cloud compatibility".
ABAP Cloud Migration Patterns
Guide for systematically migrating classic ABAP custom code to ABAP Cloud (Tier 1) compliance.
Workflow
- Assess current state: Run ATC Cloud Readiness checks on existing code
- Categorize findings: Group by finding type (unreleased API, language construct, etc.)
- Plan migration: Prioritize by impact and determine replacement strategy
- Implement replacements: Apply released API replacements or create wrappers
- Validate: Re-run ATC checks and test functionality
Migration Assessment
Running ATC Cloud Readiness Checks
- In ADT: Right-click package → Run As → ABAP Test Cockpit
- Use check variant
ABAP_CLOUD_READINESSor a custom variant with cloud-relevant checks - Review findings in the ATC Results view
Key ATC Check Messages
| Message ID | Description | Action |
|---|---|---|
NROB | Use of unreleased number range API | Use CL_NUMBERRANGE_RUNTIME |
BAPI | Direct BAPI call | Use released RAP API or wrapper |
DYNP | Dynpro/screen usage | Replace with Fiori/UI5 |
FUGR | Unreleased function module call | Find released replacement or wrap |
CLAS | Unreleased class usage | Find released replacement or wrap |
TABL | Direct DB table access (not released) | Use released CDS view entity |
LANG | Incompatible language construct | Refactor to use modern ABAP |
Common API Replacements
Database Access
| Classic Pattern | ABAP Cloud Replacement |
|---|---|
SELECT FROM mara | SELECT FROM i_product |
SELECT FROM bkpf / bseg | SELECT FROM i_journalentry |
SELECT FROM vbak / vbap | SELECT FROM i_salesorder |
SELECT FROM ekko / ekpo | SELECT FROM i_purchaseorder |
SELECT FROM kna1 | SELECT FROM i_customer |
SELECT FROM lfa1 | SELECT FROM i_supplier |
SELECT FROM t001 | SELECT FROM i_companycode |
| Direct table access | Use I_* released CDS views |
Function Modules → Released Classes
| Classic FM | Released Replacement |
|---|---|
GUID_CREATE | cl_system_uuid=>create_uuid_x16_static( ) |
CONVERSION_EXIT_ALPHA_INPUT | cl_abap_format=>alpha_input( ) |
CONVERSION_EXIT_ALPHA_OUTPUT | cl_abap_format=>alpha_output( ) |
POPUP_TO_CONFIRM | Not available — use Fiori UI |
NUMBER_GET_NEXT | cl_numberrange_runtime=>number_get( ) |
BAPI_TRANSACTION_COMMIT | Handled by RAP framework (no explicit commit) |
SO_NEW_DOCUMENT_ATT_SEND_API1 | cl_bcs_mail_message (send emails) |
READ_TEXT / SAVE_TEXT | Not released — wrap or use custom persistence |
JOB_OPEN / JOB_CLOSE / JOB_SUBMIT | cl_apj_rt_api (Application Jobs) |
ENQUEUE_* / DEQUEUE_* | RAP draft / managed locking or CL_ABAP_LOCK_OBJECT |
Language Constructs
| Incompatible Construct | Cloud-Compatible Alternative |
|---|---|
CALL TRANSACTION | Not available — use API or RAP |
SUBMIT ... AND RETURN | Not available — use Application Jobs |
WRITE / SKIP / ULINE (list output) | Not available — use Fiori UI for output |
CALL SCREEN / CALL SELECTION-SCREEN | Not available — use Fiori/UI5 |
MESSAGE ... RAISING | RAISE EXCEPTION TYPE ... |
CALL FUNCTION ... IN UPDATE TASK | RAP saver class / managed save |
EXEC SQL (Native SQL) | ABAP SQL or AMDP |
GENERATE SUBROUTINE POOL | Not available — use strategy/factory pattern |
DESCRIBE FIELD ... TYPE | RTTI: cl_abap_typedescr=>describe_by_data( ) |
GET/SET PARAMETER ID | Not available — use method parameters |
Wrapper Pattern
When no released API exists, create a wrapper class in Tier 2 (classic ABAP) and release it for Tier 1 consumption.
Step 1: Create Wrapper Interface (Tier 2, released for Cloud)
"Released for use in ABAP Cloud (C1 contract)
INTERFACE zif_text_handler
PUBLIC.
METHODS read_text
IMPORTING iv_id TYPE thead-tdid
iv_name TYPE thead-tdname
iv_object TYPE thead-tdobjec
Read the complete source ↗