agentleFS
logalitechlogalitech/abap-skills/skills/abap-cloud-migration/SKILL.md

abap-cloud-migration

Skill0 starsChanged 3 months agoMITView on GitHub

Migración de ABAP clásico a ABAP Cloud: sustituir accesos directos a tablas y APIs no liberadas por released CDS/APIs, y usar ATC readiness. Úsala cuando el usuario migre código a la nube, pregunte por equivalentes liberados, wrappers de código legacy o preparación cloud.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No migres a ciegas: sin la línea base de ATC no sabes el alcance real ni puedes medir progreso.

    line 85
  2. Distinctive:

    No confundas "compila" con "cloud ready": el package check Cloud Development marca como error el acceso a tabla cruda aunque el SELECT sea …

    line 86
  3. Distinctive:

    No abuses de exemptions para cerrar findings rápido: una exención mal justificada solo pospone la deuda técnica.

    line 87

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ABAP Cloud Migration

Proceso para llevar código ABAP clásico al modelo ABAP Cloud: detectar lo que no cumple clean core, sustituir accesos directos a tablas y APIs no liberadas por equivalentes liberados, y encapsular lo que no tiene equivalente.

Cuándo y cómo usarla

  1. Identifica el objetivo: preparar un paquete para S/4HANA Cloud, evaluar el esfuerzo de migración o convertir un objeto concreto.
  2. Sitúa el contexto: mide primero con ATC (variante ABAP_CLOUD_READINESS) para tener la lista real de hallazgos antes de tocar código.
  3. Aplica el remedio por categorías: acceso a tablas, APIs no liberadas, sentencias obsoletas; y valida de nuevo con ATC tras cada cambio.

Paso 1: medir con ATC readiness

Ejecuta ATC sobre el paquete u orden de transporte con la variante ABAP_CLOUD_READINESS. Prioriza los hallazgos: primero los errores rojos (bloquean cloud), luego advertencias. Cada finding indica exactamente qué sentencia u objeto no es compatible.

Paso 2: sustituir acceso directo a tablas por vistas liberadas

El patrón más frecuente. Cambia el SELECT sobre la tabla estándar por la vista I_* liberada equivalente.

// ANTES (rompe clean core): acceso directo a tabla estándar
define view entity ZI_FINANCIAL_DOC_BAD
  as select from acdoca
{
  key rldnr,
  key rbukrs,
  key gjahr,
  key belnr,
      racct,
      hsl
}

// DESPUES: vista I_* liberada del VDM
@AccessControl.authorizationCheck: #CHECK
define view entity ZI_FINANCIAL_DOC
  as select from I_JournalEntryItem
{
  key Ledger,
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument,
      GLAccount,
      AmountInCompanyCodeCurrency
}

Para localizar el equivalente: filtra I_ + tema en el Project Explorer (Cloud Development), consulta SELECT * FROM I_ApiObjects WHERE ApiState = 'RELEASED', o busca en el SAP API Business Hub.

Paso 3: encapsular APIs no liberadas (wrapper Tier 2)

Cuando no existe API liberada (típico con BAPIs), en Private Edition aíslas la llamada legacy en un Software Component Tier 2 y expones una interfaz Cloud-friendly.

CLASS zcl_wrapper_material DEFINITION PUBLIC.
  PUBLIC SECTION.
    METHODS read_material
      IMPORTING material      TYPE matnr
      RETURNING VALUE(result) TYPE zif_material_data.
ENDCLASS.

CLASS zcl_wrapper_material IMPLEMENTATION.
  METHOD read_material.
    CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'   " legacy, encapsulado
      EXPORTING material = material
      IMPORTING result   = result.
  ENDMETHOD.
ENDCLASS.

Tu código Tier 1 consume el wrapper por una interfaz liberada, nunca el BAPI directamente.

Paso 4: modernizar sentencias obsoletas

  • Reemplaza SQL nativo (EXEC SQL) por ABAP SQL o AMDP.
  • Sustituye acceso a dynpros clásicos y write/list por Fiori/RAP o servicios.
  • Añade el escape @ a las variables host en todo ABAP SQL.
  • Apóyate en ABAP Cleaner para automatizar buena parte de la modernización sintáctica.

Buenas prácticas y errores comunes

  • No migres a ciegas: sin la línea base de ATC no sabes el alcance real ni puedes medir progreso.
  • No confundas "compila" con "cloud ready": el package check Cloud Development marca como error el acceso a tabla cruda aunque el SELECT sea válido.
  • No abuses de exemptions para cerrar findings rápido: una exención mal justificada solo pospone la deuda técnica.
  • Prioriza reutilizar el VDM antes que crear wrappers: el wrapper es la última opción, no la primera.
  • Reejecuta ATC después de cada bloque de cambios para confirmar que no introduces regresiones.

Referencias

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.