/abapsmith:abapsmith-enhance-standard-codefrom abapsmith
Creates BAdI spots, definitions, implementations, filters, and source-code plug-in hooks with abap_enh. Use when enhancing SAP standard code rather than writing your own object.
Ships in abapsmith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two unrelated sequences. Pick one; do not mix them.
Each step is an operation of abap_enh. A plug-in's own source body goes
through abap_write, never through the enhancement tool.
Classic BAdI
enh_create_spot → enh_add_badi_def → [enh_add_filter_def]
→ enh_create_impl → enh_set_filter_values → enh_exercise
Source-code plug-in hook
enh_discover_hook_anchors → enh_create_hook
anchorFullName must come from discover_hook_anchors. Never construct it.
create_hook supports a PROG/P host only. Its enhoxhh media type
is negotiated from /sap/bc/adt/discovery, not hardcoded — a server whose
discovery has no enhoxhh collection refuses create_hook as
UNSUPPORTED before any request; see doc/TOOLS/enhancements.md.
spec identifier grammarbadiName, spotName, enhName, implName, implClass, interfaceName,
methodName, filterName, params[].name: a letter, then letters/digits/
underscores, max 30 chars. No namespace, no leading $.
params[].type is a type reference, not an object name, and follows a
different rule: same 30-char grammar per part, but a leading /NAMESPACE/ is
allowed and one -COMPONENT suffix is allowed — e.g. STRING,
/DMO/S_FLIGHT-CARRID, MARA-MATNR. TYPE REF TO/LINE OF/TABLE OF forms
are refused; give the plain type name SAP would resolve, not ABAP syntax.
create_spot, add_badi_def, add_filter_def, create_impl and
set_filter_values take package (default $TMP), corr_nr and
activate. Against a transportable package, corr_nr follows the same
transport rules as abap_write. activate: false saves the object without
activating it — read it with abap_read, then abap_activate it
explicitly when ready. create_hook still always lands in $TMP (use
spec.activate for it). exercise creates nothing of the caller's — its
bridge lives in $ABAPSMITH_FLUID_API. See doc/TOOLS/enhancements.md.ENHO/XH vs
ENHO/XHH vs ENHS/XS — a wrong guess dumps a work process and kills the ADT
session; the next call returns "Session Timed Out". Resolve the subtype
first. Never sweep sibling collections after a 404.corr_nr: "" — present but empty — makes SAP fabricate both a request and a
task. Omit it or supply a real one.enh_create_impl does not create implClass. SE19 generates the implementing
class shell; this does not. Write the class yourself with abap_write (CLAS/OC),
implementing the BAdI's marker interface, and activate it — otherwise the
implementation names a class that is not there and nothing dispatches.GET BADI types the handle against the BAdI definition name
(add_badi_def's badiName) — never the marker interface, never the spot.
DATA lo_badi TYPE REF TO ztm_bd_hw011b. " definition name
GET BADI lo_badi.
CALL BADI lo_badi->change_data CHANGING ct_data = ct_data.
Wrong type → compile error: "LO_BADI" is not a valid BAdI handle here. No
debugger will explain it; retype the one DATA statement. Do not conclude the
implementation is uncallable.
An implementation with no filter values on a filter-dependent, multiple-use BAdI fires for every call site in the system, and reads back completely healthy. Nothing warns you.
Always follow enh_create_impl with enh_set_filter_values when the definition
declares filters. Check the definition's filters first.
A single-use BAdI raises CX_BADI_NOT_IMPLEMENTED on a wrong filter — a real
signal. A multiple-use BAdI silently does nothing.
All pre/post/overwrite exit bodies of one class enhancement live in one blob. Editing one exit rewrites all of them — no per-exit URI, no lock conflict to warn you. GET, mutate, PUT. Never author a payload from scratch.
enho:active="X" = switched on at runtime. adtcore:version = whether an inactive
revision exists. Check both; two of the four combinations look active on a
careless single-attribute read but are inert. Never branch on
enho:runtimeBehaviorShorttext — it is localised prose, not an enum.
Activation returns 200 with errors inside chkl:messages. A missing
INTERFACES if_badi_interface. on a marker interface fails exactly this way.
Always read the messages, not the status code.
A multi-use BAdI's marker interface may declare only IMPORTING/CHANGING
parameters, and the check covers the whole interface, not just the new method.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub freight-art/abapsmith --plugin abapsmith18 skills in this plugin
/abapsmith-browse-img-customizingBrowses the SAP IMG (SPRO) customizing structure with abap_img — activities, their tree position, and the tables behind them. Use when asked what a customizing activity does, where a setting lives, or which table backs a view/transaction./abapsmith-check-code-qualityRuns ATC static checks with abap_atc and lists or applies ADT quick fixes with abap_quick_fix. Use when asked to review, clean up, or check an object for findings before it is transported./abapsmith-create-an-objectCreates, changes, or deletes an ABAP object with abap_write and checks whether it worked. Use for any mutation, and whenever a write returned success but the result looks wrong.Other plugins' skills for the same job