Abap Cloud Migration 标志

Abap Cloud Migration

社区
likweitan
abap-cloud-migration

帮助将经典 ABAP 自定义代码迁移到更高的 clean core 等级(Level A/B/C/D),包括调整自定义代码、识别已发布 API 和经典 API 的替代方案、为未发布对象生成包装类、进行 ATC clean core 和 Cloud Readiness 检查、查看 SAP 对象的变更日志、处理不兼容的语言结构,以及按步骤开展修复工作流。适用于用户询问迁移到 ABAP Cloud、自定义代码迁移、云就绪情况、clean core 等级修复、消除 Level D、降低 Level C、替换未发布 API、包装器模式、ATC clean core 检查、代码调整、从经典环境迁移到云端,或 clean core 合规性等问题时。触发词包括“migrate to ABAP Cloud”、“cloud readiness check”、“clean core level”、“eliminate Level D”、“reduce Level C”、“non-released API”、“replace with released API”、“custom code adaptation”、“wrapper for non-released”、“ATC clean core”、“clean core migration”、“changelog for SAP objects”或“ABAP Cloud compatibility”。

概览

发布者likweitan
代码仓库abap-skills
技能名称abap-cloud-migration
星标数
64
复刻数
15
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 likweitan 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Abap Cloud Migration AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/likweitan/abap-skills/tree/main/skills/abap-cloud-migration
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/likweitan/abap-skills.git /tmp/abap-skills
mkdir -p .claude/skills
cp -r /tmp/abap-skills/skills/abap-cloud-migration .claude/skills/abap-cloud-migration
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Abap Cloud Migration,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Abap Cloud Migration。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Abap Cloud Migration 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

ABAP Cloud Migration & Clean Core Level Remediation

Guide for systematically raising the clean core level of classic ABAP custom code — eliminating Level D, minimizing Level C, and moving toward Level A (ABAP Cloud).

Terminology note: the former 3-tier extensibility model is superseded by the clean core level concept (A, B, C, D). Migration is no longer "get everything to Tier 1" — it is "eliminate Level D, minimize Level C, accept stable Level B, target Level A for new work". See the abap-cloud skill for the level definitions.

Workflow

  1. Assess current state: run ATC clean core checks on existing code
  2. Classify findings by level: priority 1 → Level D, priority 2 → Level C, priority 3 → Level B
  3. Prioritize remediation: Level D first (must fix), then Level C (minimize), then Level B (monitor)
  4. Choose a transformation option: retire · renovate side-by-side · renovate on-stack · adapt
  5. Implement replacements: released APIs, classic APIs, or wrappers with a single ATC exemption
  6. Validate: re-run ATC checks, verify no priority 1/2 findings remain, test functionality

Migration Assessment

Running ATC clean core checks

  1. In ADT: right-click package → Run As → ABAP Test Cockpit
  2. Use check variant ABAP_CLEAN_CORE_DEVELOPMENT (SAP-delivered) or build a variant from ABAP_CLOUD_DEVELOPMENT_DEFAULT including:
    • SYCM_USAGE_OF_APIS — released/classic API classification, SQL on SAP tables, SAP form routines
    • SYCM_ALLOWED_ENH_TECHNOLOGY — enhancement technology compliance
    • CI_SEARCH_CUST_MODIFICATIONS — modifications
    • CI_CRITICAL_STATEMENTS — critical statements
    • SLIN_SEC — Code Vulnerability Analyzer (additionally recommended)
  3. Use ABAP_CLOUD_READINESS to verify ABAP Cloud rules before switching an object's language version
  4. Review findings in the ATC Results view

If SYCM_USAGE_OF_APIS or SYCM_ALLOWED_ENH_TECHNOLOGY are unavailable, implement SAP Note 3565942.

ATC findings mapped to clean core levels

ATC priorityLevelFindingAction
Priority 1 (Error)DObject is modifiedRemove modification; use a BAdI instead
Enhancement technology is not allowedDelete enhancement; use a BAdI
Implicit or explicit enhancement (source code plug-in)Delete enhancement; use a BAdI
Direct write access to SAP database tablesUse released or classic APIs
Call of form routines in SAP programUse released or classic APIs
Usage of SAP object classified as noAPIUse released or classic APIs; check successor info
Usage of critical ABAP statementsUse released or classic APIs
Priority 2 (Warning)CDirect read access to SAP database table/viewUse released CDS view or classic API
Usage of SAP object not classified as classic API (internal) and not releasedUse released or classic APIs
Priority 3 (Info)BUsage of deprecated APIsUse the successor
Usage of classic APIs— acceptable, no action required

Configure ATC transport settings so priority 1 and 2 findings block transport release.

Remediation priority

  1. Level D — eliminate entirely

    • No modifications → use BAdIs
    • No implicit or explicit enhancements → use BAdIs
    • No direct write access to SAP DB tables → released or classic APIs
    • No not-recommended (noAPI) APIs → released or classic APIs
    • Remove critical ABAP statements → released or classic APIs
    • Do not call form routines within SAP programs → released or classic APIs
  2. Level C — minimize as much as possible

    • No direct read access to SAP tables → released or classic CDS views
    • Replace SAP internal APIs with released or classic APIs
    • If internal APIs are still needed, explore the changelog for SAP objects for incompatible changes
    • Wrap remaining internal objects and create a single fine-grained ATC exemption
  3. Level B — monitor

    • Adopt successors for deprecated API findings
    • Monitor when SAP releases an equivalent API, then migrate to Level A
    • Do not rewrite stable classic code without a business reason
  4. Level A — sustain

    • Enforce with S_ABPLNGVS authorization and separate software components

Transformation Options for Legacy Code

OptionWhen to applyTypical tasks
Retire unused code~60% of custom code in a typical ERP is not used productivelyCollect usage data with SUSG/SCMON · analyze in Custom Code Migration app · remove/backup unused code · use the clone finder
Renovate & innovate side-by-sideLoosely coupled extensions better served on SAP Business AI PlatformAnalyze dependencies in Custom Code Migration app · transfer code to BTP · adapt via ATC quick fixes
Renovate & innovate on-stackTightly coupled extensions/modifications worth reimplementing in ABAP CloudAnalyze complexity for TCO drivers · make code ABAP Cloud compliant · replace non-released objects with released APIs · use only released extension points
AdaptNone of the above is feasible — minimum viable actionAdapt via readiness ATC checks, Simplification Database, ADT quick fixes (up to ~60% automation) · SQL Monitor · CDS/AMDP pushdown

Recommendation: leave behind as much legacy code as possible during the conversion — cleaning up afterwards costs significantly more.

Changelog for SAP Objects (Level C risk mitigation)

Custom code using internal SAP objects is not upgrade-stable by definition. Internal objects can change during an upgrade, a feature pack import, or even an SAP Note import.

Incompatible changes include:

  • Deletion of objects (e.g., function modules)
  • Renaming or deletion of function module parameters
  • Incompatible changes to parameter types
  • Renaming or deletion of methods in SAP classes
  • Removal of fields from CDS views

Covered object types: FUNC, CLAS, INTF, STOB, BDEF.

How to use it:

  1. Download the Simplification Database file from the SAP Software Download Center (SAP Support Portal)
  2. Import it via transaction SYCM
  3. Run the changelog ATC check during development, or before the system upgrade like other simplification item checks
  4. Refactor affected usages toward released or classic APIs

Objects in the changelog are not automatically demoted to Level D — continued usage may be allowed depending on the change's scope and criticality.

Common API Replacements

Database Access

Classic PatternABAP Cloud Replacement
SELECT FROM maraSELECT FROM i_product
SELECT FROM bkpf / bsegSELECT FROM i_journalentry
SELECT FROM vbak / vbapSELECT FROM i_salesorder
SELECT FROM ekko / ekpoSELECT FROM i_purchaseorder
SELECT FROM kna1SELECT FROM i_customer
SELECT FROM lfa1SELECT FROM i_supplier
SELECT FROM t001SELECT FROM i_companycode
Direct table accessUse I_* released CDS views

Function Modules → Released Classes

Classic FMReleased Replacement
GUID_CREATEcl_system_uuid=>create_uuid_x16_static( )
CONVERSION_EXIT_ALPHA_INPUTcl_abap_format=>alpha_input( )
CONVERSION_EXIT_ALPHA_OUTPUTcl_abap_format=>alpha_output( )
POPUP_TO_CONFIRMNot available — use Fiori UI
NUMBER_GET_NEXTcl_numberrange_runtime=>number_get( )
BAPI_TRANSACTION_COMMITHandled by RAP framework (no explicit commit)
SO_NEW_DOCUMENT_ATT_SEND_API1cl_bcs_mail_message (send emails)
READ_TEXT / SAVE_TEXTNot released — wrap or use custom persistence
JOB_OPEN / JOB_CLOSE / JOB_SUBMITcl_apj_rt_api (Application Jobs)
ENQUEUE_* / DEQUEUE_*RAP draft / managed locking or CL_ABAP_LOCK_OBJECT

Language Constructs

Incompatible ConstructCloud-Compatible Alternative
CALL TRANSACTIONNot available — use API or RAP
SUBMIT ... AND RETURNNot available — use Application Jobs
WRITE / SKIP / ULINE (list output)Not available — use Fiori UI for output
CALL SCREEN / CALL SELECTION-SCREENNot available — use Fiori/UI5
MESSAGE ... RAISINGRAISE EXCEPTION TYPE ...
CALL FUNCTION ... IN UPDATE TASKRAP saver class / managed save
EXEC SQL (Native SQL)ABAP SQL or AMDP
GENERATE SUBROUTINE POOLNot available — use strategy/factory pattern
DESCRIBE FIELD ... TYPERTTI: cl_abap_typedescr=>describe_by_data( )
GET/SET PARAMETER IDNot available — use method parameters

Wrapper Pattern

When no released API exists, create a wrapper class in a classic ABAP software component and release it for ABAP Cloud (Level A) consumption.

Wrapper level classification:

  • Wrapping a classic API (Level B object) → the wrapper is Level B
  • Wrapping an internal object (Level C object) → the wrapper is Level C
  • Wrapping a not-recommended (noAPI) object → Level D, do not build it

Wrapping also collapses N ATC findings into 1, so a single fine-grained exemption covers the usage. This is SAP's recommended practice for working with internal SAP objects.

Step 1: Create Wrapper Interface (classic ABAP, released for Cloud)

abap
"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-tdobject
              iv_language    TYPE sy-langu DEFAULT sy-langu
    RETURNING VALUE(rt_text) TYPE tline_tab
    RAISING   zcx_text_error.

  METHODS save_text
    IMPORTING iv_id       TYPE thead-tdid
              iv_name     TYPE thead-tdname
              iv_object   TYPE thead-tdobject
              iv_language TYPE sy-langu DEFAULT sy-langu
              it_text     TYPE tline_tab
    RAISING   zcx_text_error.
ENDINTERFACE.

Step 2: Create Wrapper Class (classic ABAP, released for Cloud)

abap
"Implementation uses non-released FMs internally
"Released for use in ABAP Cloud (C1 contract)
CLASS zcl_text_handler DEFINITION
  PUBLIC FINAL CREATE PUBLIC.
  PUBLIC SECTION.
    INTERFACES zif_text_handler.
ENDCLASS.

CLASS zcl_text_handler IMPLEMENTATION.
  METHOD zif_text_handler~read_text.
    "Uses non-released FM internally — acceptable inside the wrapper
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id       = iv_id
        name     = iv_name
        object   = iv_object
        language = iv_language
      TABLES
        lines    = rt_text
      EXCEPTIONS
        OTHERS   = 1.
    IF sy-subrc <> 0.
      RAISE EXCEPTION TYPE zcx_text_error.
    ENDIF.
  ENDMETHOD.

  METHOD zif_text_handler~save_text.
    DATA ls_header TYPE thead.
    ls_header-tdid     = iv_id.
    ls_header-tdname   = iv_name.
    ls_header-tdobject = iv_object.
    ls_header-tdspras  = iv_language.

    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING header = ls_header
      TABLES    lines  = it_text
      EXCEPTIONS OTHERS = 1.
    IF sy-subrc <> 0.
      RAISE EXCEPTION TYPE zcx_text_error.
    ENDIF.
  ENDMETHOD.
ENDCLASS.

Step 3: Release the Wrapper

In ADT, open the wrapper class properties:

  1. Go to API State tab
  2. Add Use System-Internally (C1) contract
  3. Set visibility to Use in ABAP Cloud

Step 4: Use in ABAP Cloud (Level A) Code

abap
"ABAP Cloud code — uses released wrapper
DATA(lo_text) = NEW zcl_text_handler( ).
DATA(lt_text) = lo_text->zif_text_handler~read_text(
  iv_id     = 'ST'
  iv_name   = lv_doc_name
  iv_object = 'VBBK' ).

Step 5: Handle authorizations and exemptions

  • Classic APIs often check non-released authorization objects, which cannot be used in ABAP Cloud. PFCG roles may mix released and non-released authorization objects.
  • Provide SU22 data for the wrapper when releasing it, and create SU22 variants for each designated usage so roles can be maintained.
  • Create a single fine-grained ATC exemption on the wrapper's internal usage rather than one per call site.
  • Retire the wrapper once SAP releases the API — replace it and move the code to the ABAP Cloud software component.

Wrapper guidance by object type

  • CDS views: create a custom CDS view on top of the non-released SAP CDS view and release it. Association targets and value help views may also need wrappers. If no SAP CDS view exists at all, wrap the database table.
  • Classes / interfaces: wrap the non-released FM or class. Do not copy non-released data types (data elements, structures, table types) used in the signature — wrap them via TYPES declarations in the wrapper's public section, so only the wrapper needs releasing.

Migration Strategy by Object Type

Reports / Programs

Classic Report → Application Job class + CDS view + Fiori app
1. Extract data logic → CDS view entities
2. Extract business logic → ABAP Cloud class
3. Create Application Job catalog entry (CL_APJ_DT_CREATE_CONTENT)
4. Schedule via Fiori app "Application Jobs"

Dynpro Transactions

Dynpro Transaction → RAP BO + Fiori Elements app
1. Identify CRUD operations → RAP behavior definition
2. Map screen fields → CDS view entity
3. Create service definition/binding
4. Generate Fiori Elements app

BAPIs

BAPI → RAP BO with custom actions
1. Map BAPI parameters → CDS abstract entities
2. Implement as RAP actions or factory actions
3. Expose via OData service binding

RFC Function Modules

RFC FM → Released API class or RAP service
1. If simple logic → Released ABAP class (Level A)
2. If CRUD → RAP BO with service binding (Level A)
3. If complex → Wrapper class in classic ABAP (Level B or C)

Finding Released and Classic Replacements

In ADT

  1. Released Object Search: Ctrl+Shift+A → Filter by "Released" APIs
  2. API State Filter: In Project Explorer, filter by C1 release state
  3. ABAP Element Info: Hover over a non-released object → see successor suggestion if available

Using the Released Objects App

Fiori app Released Objects (F5865):

  • Search by classic object name
  • Filter by release state (C1, C2)
  • View successor information

Using the Cloudification Repository

Determine an object's clean core level and successor:

Programmatic Check

abap
"Check if an object is released for ABAP Cloud (Level A)
SELECT SINGLE *
  FROM i_apistateofrepositoryobject
  WHERE ObjectType     = 'CLAS'
    AND ObjectName     = 'CL_NUMBERRANGE_RUNTIME'
    AND ReleaseState   = 'RELEASED'
  INTO @DATA(ls_state).

Step-by-Step Remediation Checklist

  1. Run ATC clean core checks (ABAP_CLEAN_CORE_DEVELOPMENT) on the package/objects
  2. Export findings and group by ATC priority → clean core level (P1=D, P2=C, P3=B)
  3. Eliminate all Level D findings (priority 1):
    • Remove modifications → use released or classic BAdIs
    • Remove implicit/explicit enhancements → use BAdIs
    • Remove direct write access to SAP tables → released or classic APIs
    • Replace noAPI object usage → check successor information
    • Remove critical ABAP statements
    • Remove calls to SAP form routines
  4. Minimize Level C findings (priority 2):
    • Replace direct read access to SAP tables → released or classic CDS views
    • Replace SAP internal APIs → released or classic APIs
    • For unavoidable internal usage: wrap + single ATC exemption
    • Import the changelog for SAP objects via SYCM and check for incompatible changes
  5. Review Level B findings (priority 3):
    • Adopt successors for deprecated APIs
    • Leave stable classic API usage as-is
  6. For each non-released API without a replacement:
    • Create a wrapper in the classic ABAP component and release it for ABAP Cloud
    • Provide SU22 data and variants for the wrapper
  7. For each incompatible language construct: refactor to a cloud-compatible alternative
  8. For Dynpro/ALV/list-based UIs: plan the Fiori replacement (separate project)
  9. Move migrated objects to the ABAP for Cloud Development software component
  10. Run ABAP_CLOUD_READINESS before switching an object's language version
  11. Re-run ATC checks — no priority 1 or 2 findings should remain
  12. Configure ATC transport settings to block release on priority 1 and 2 findings
  13. Execute regression tests

Output Format

When helping with migration topics, structure responses as:

markdown
## Migration Guidance

### Current Code Analysis

- Current clean core level: [A / B / C / D] (lowest level used)
- Level D findings (must fix): [list]
- Level C findings (minimize): [list]
- Level B findings (monitor): [list]
- Incompatible constructs: [list]
- Estimated effort: [low / medium / high]

### Remediation Strategy

[Ordered by level: D first, then C, then B]
[For each finding: original → replacement with code, target level]

### Wrapper Requirements

[Objects needing wrappers, with the resulting wrapper level (B or C)]

### Target State

- Achievable clean core level: [A / B]
- Residual exemptions required: [list with justification]

References

Detailed Reference

  • Remediation checklist: Read references/migration-checklist.md for the full level-based remediation checklist, effort estimation, and rollback planning

Related Skills

  • abap-cloud: Use for clean core level definitions, development models, and wrapper classification
  • atc-cloudification: Use for configuring ATC clean core checks and level governance
  • released-abap-classes: Use for finding Level A released API replacements
  • badi-enhancement: Use for replacing modifications and enhancements with BAdIs
  • abap-sql-amdp: Use for modernizing ABAP SQL and AMDP during migration

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Abap Cloud Migration AI 技能有什么作用?

帮助将经典 ABAP 自定义代码迁移到更高的 clean core 等级(Level A/B/C/D),包括调整自定义代码、识别已发布 API 和经典 API 的替代方案、为未发布对象生成包装类、进行 ATC clean core 和 Cloud Readiness 检查、查看 SAP 对象的变更日志、处理不兼容的语言结构,以及按步骤开展修复工作流。适用于用户询问迁移到 ABAP Cloud、自定义代码迁移、云就绪情况、clean core 等级修复、消除 Level D、降低 Level C、替换未发布 API、包装器模式、ATC clean core 检查、代码调整、从经典环境迁移到云端,或 clean core 合规性等问题时。触发词包括“migrate to ABAP Cloud”、“cloud readiness check”、“clean core level”、“eliminate Level D”、“reduce Level C”、“non-released API”、“replace with released API”、“custom code adaptation”、“wrapper for non-released”、“ATC clean core”、“clean core migration”、“changelog for SAP objects”或...

为什么在 TypingMind 中使用 Abap Cloud Migration?

因为您只需安装一次,就能搭配任何模型使用。Abap Cloud Migration 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Abap Cloud Migration?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/likweitan/abap-skills/tree/main/skills/abap-cloud-migration。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Abap Cloud Migration?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Abap Cloud Migration 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Abap Cloud Migration 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Abap Cloud Migration AI 技能免费吗?

是的。likweitan 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇