/sc4sap:smartform-to-adobefrom sc4sap
Plans SmartForm to Adobe form (SFP) conversion using SAP's CL_SSF_MIGRATION logic. Produces a node-by-node inventory, mapping, and gap list with manual steps. Read-only; optionally runs a DEV migration into $TMP objects.
Ships in sc4sap. 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.
Read when SKILL.md points to them.
Beta — output quality is still low. Tell the user so on every run: in the first reply (before Step 2) and again in the first line of the final report — the plan's predictions and gap rows can be wrong or incomplete, so check the result in SFP before relying on it. The HTML report carries the same notice.
Offline profile (
common/offline-mode.md): degraded — works on a form XML the user already has; no SAP read.
Reads one SmartForm and works out, node by node, what SAP's own migration (CL_SSF_MIGRATION=>MIGRATE, the "Smart Form migration" of SFP / SMARTFORMS) makes of it:
Every node ends either mapped or in the gap list with a reason and a manual step. Nothing is written to SAP.
Before anyone runs the migration (it saves at once, has no test mode and overwrites a target of the same name), the consultant needs to know how complete the result will be and what has to be rebuilt by hand. The plan answers that from the form itself, with the SAP method behind each rule.<Response_Prefix>Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention. Dispatches: sc4sap:sap-critic (gap review, Step 5).</Response_Prefix>
<Team_Mode>No teamMode integration. Inventory and plan are scripted; one critic review.</Team_Mode>
<Use_When>
<Do_Not_Use_When>
/sc4sap:adobe-previewadobe-from-pdf (awaiting approval)<Decisions_Fixed>
| Topic | Decision |
|---|---|
| Rules | SAP's migration behaviour, method by method — mapping.md. A rule that differs from SAP is a defect unless mapping.md gives the reason |
| Options | full by default (every migration flag); sap-default = what MIGRATE does without options. The report prints the options — a later SAP run must use the same |
| Scope | One form per run. A text module (FORMTYPE T) is reported as "not a form" |
| Data | Form definitions only; no business tables; sample values for previews are invented |
| Writes | Steps 1–6: none. Step 7 (DEV only, CreateAdobeFormFromSmartForm): a NEW form and interface ZSC4SAP_AFM_* in $TMP from a SAP-delivered SmartForm; nothing is overwritten or deleted (cleanup: DeleteAdobeForm, local objects only, per-call user approval) |
| Language | Named in ARGUMENTS (Korean / English / Japanese → ko / en / ja), else the profile config.json language, else en. Page labels follow it; SAP's messages, reasons and manual steps stay in English (they cite SAP methods) |
| Output | <artifact-base>/smartforms/<FORM>/ — adobe-plan-<lang>.html (the deliverable), adobe-plan-<lang>.md (same content), <FORM>.xml (from GetSmartFormContent), inventory.json, adobe-plan.json |
| </Decisions_Fixed> |
Step 1 — Form. Form name from ARGUMENTS (else ask once in plain text: "Which SmartForm? e.g. ZSD_INVOICE"). Uppercase it. Options: full unless the user names sap-default or a list of flags — do not ask; the report prints them. Then tell the user in one line that this skill is beta with low output quality (results must be checked in SFP), and in one more line what comes: read the form → plan → one review → HTML report, read-only, nothing written to SAP.
Step 2 — Read. GetSmartFormContent(form_name, summary: true). Note files.xml and copy it to <out>/<FORM>.xml.
Step 3 — Inventory.
node scripts/adobe/sf-inventory.mjs "<out>/<FORM>.xml" > "<out>/inventory.json"
Report the counts by node kind (windows, texts, tables / loops, templates, events, conditions, code, graphics, addresses, commands), the interface (import / tables / export) and the printed &fields&.
Step 4 — Plan.
node scripts/adobe/sf-to-adobe-plan.mjs "<out>/<FORM>.xml" --options full > "<out>/adobe-plan.json"
Read completeness, log, gaps, result:
result: aborted → the migration would stop (m13). Name the node and the cause; nothing else matters until it is fixed.E message is a gap; a W message keeps the node and needs a look. predicted m05 is a guess — DDIC was not checked.Step 5 — Review. Agent(subagent_type: "sc4sap:sap-critic") gets the gap list with node paths, the options, and mapping.md §2–§4. It checks the SAP meaning of each reason and action (for example, "a sort event prints for every row" for a group heading) and returns ok or a corrected line. Apply a correction in adobe-plan.json, in English, and set "reviewedBy": "critic" on that gap row (the report marks it reviewed): the action of any row; the reason of a silent row (logged: false) only — a logged row's reason is SAP's own message text and stays verbatim. Never a node's status, kind or the counts. Re-running Step 4 overwrites the file — then repeat Step 5. The plan's rules change only through mapping.md and a test.
Step 6 — Report (offline):
node scripts/adobe/sf-to-adobe-page.mjs "<out>/adobe-plan.json" --out-dir "<out>" --lang <lang>
It writes adobe-plan-<lang>.html (header with form, options, result; tiles mapped / SAP warning / gaps logged / silent; interface; gap list with silent gaps first — node path · kind · logged / silent · reason · manual step; manual steps by kind; SAP log; node kinds; next steps) and the same content as adobe-plan-<lang>.md, and prints summary. Relay the summary (Output_Format) — its first line is the beta notice — give the HTML path first, then offer the next steps in one line each — do not start them unasked:
$TMP objects" (Step 7)/sc4sap:adobe-preview <new form> to draw its printStep 7 — Run on DEV (optional, SAP example SmartForms only). On the user's yes, CreateAdobeFormFromSmartForm(source, form_name, interface_name) with new names ZSC4SAP_AFM_* (an existing name is refused). It runs SAP's migration steps with the full options, saves both objects in $TMP and activates them; it needs FM ZMCP_FP_MIGRATE and the dispatcher action FP_MIGRATE (see abap/README.md). Report complete, active, SAP's log next to the plan's gap list, and the result file. Known differences to SAP's own run: the description ends with [sc4sap] (the form type migrated is set as SAP sets it, through the public form-upload path), and duplicate sibling context nodes from a 4.6C table (SAP's result would not activate) are renamed <NAME>_<n> — report the renamed list; the layout also gets a fresh ADS cache info (cacheInfo), which SAP's run leaves as a shared placeholder until the form is saved in the Designer; include texts using CONTROL_PARAMETERS-LANGU get the output language, and with sender_country address nodes get a sender country — report the adjusted list; ask the user for the sender country (the issuing sales organisation's) rather than guessing. When the tool fails after a save, its error names the objects left behind — delete them only with the user's approval, one DeleteAdobeForm(name, kind, confirm: true) call per object after a dry run (form before its interface; needs ZMCP_FP_DELETE and the FP_DELETE action). Customer forms: plan only; do not suggest running the migration from SFP by hand on a form someone else owns.
<Data_Rules>
Only form definitions are read. A preview of the migrated form (/sc4sap:adobe-preview) uses invented sample values. Do not read documents with GetTableContents / GetSqlQuery.
</Data_Rules>
<Output_Format>
Beta — output quality is still low; check the result in SFP before relying on it.
ZDEMO_INVOICE → Adobe (options: full) — migrates, nodes 62: mapped 49 · SAP warning 4 · gap nodes 9 — manual steps 11 (logged 4, silent 7)
Interface: 3 import, 1 table, 3 export (+ standard parameters) · global data 5 · init code 18 lines
SAP log (predicted): m07 E OLD_ITEMS · m10 E ITEMS · m03 W CALC_TOTAL · m02 W ADDRESS
Silent: text-element 3 · event-sort-begin 2 · command 1 · graphic 1
Report: <artifact-base>/smartforms/ZDEMO_INVOICE/adobe-plan-ko.html
Next: fix the 7 silent steps first · run the migration on DEV (SAP example forms only) · /sc4sap:adobe-preview after the migration
Reply in the user's language. </Output_Format>
- The plan draws no layout. Draw the migrated form with `/sc4sap:adobe-preview` (S/4, DEV helper `ZMCP_FP_CONTENT`). - Border, fill and margin details and the XHTML of texts are not modelled (mapping.md §7). - Rules read from `CL_SSF_MIGRATION` on ECC and S/4 DEV systems (identical source); re-check after a SAP_BASIS upgrade.<MCP_Tools_Used>
GetSmartFormContent (form XML)GetStructure / GetDataElement (only to check a predicted m05 when the user asks)
</MCP_Tools_Used><Related_Skills>
/sc4sap:smartform-preview — the SmartForm's own expected print/sc4sap:adobe-preview — the migrated Adobe form's expected print/sc4sap:smartform-from-pdf — a new SmartForm from a PDF
</Related_Skills>Task: $ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
inheritThree short reads, in order
smartform, adobe-form, sap-migration, sfp, conversion-planning
npx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sap31 skills in this plugin
/adobe-from-pdfBuild an Adobe form (SFP — interface, context and XDP layout) from a PDF of the printed form, the way smartform-from-pdf builds a SmartForm, upload it to the DEV system, print it there and score the print against the source page. Awaiting approval — not runnable yet./adobe-previewDraw the expected print of an Adobe form (SFP, S/4HANA) as HTML pages in mm (plus JPG / PDF with a local browser) — the XFA layout with its master pages, flowed tables with repeated headers, page breaks, captions, pictures (dates, numbers, currency shifts), rich text with embedded fields, rounded boxes and images — filled with invented sample values sized to the interface's DDIC types. On a development system it can print SAP's example forms through ADS and score the preview against SAP's own PDF./analyze-codeABAP code analysis — size-gated review (one Opus sap-code-reviewer, or Haiku sap-checker detectors + Opus judge for large objects), Haiku evidence check on every finding, then a canned report or a richer briefing on the main thread/analyze-symptomRead-only, step-by-step root cause analysis for SAP operational errors. Reads the dump summary and failing source via MCP (known-issue web lookup only when the failure is in standard SAP code), widens to transports and where-used only when the clues call for it, narrows hypotheses with minimal user questions, and provides SAP Note search keywords. Never changes code or data./ask-consultantDirect operational Q&A with a SAP module consultant agent. Auto-routes the question to the matching sap-{module}-consultant and answers against the configured SAP environment (version, industry, country, active modules)./assistBusiness assistant for the connected SAP system — looks up and changes specific documents through the installed business actions (query → preview → user confirm → execute), one confirmed step at a time. Use for requests about concrete SAP data such as open purchase orders, goods receipt, delivery complete, PO release, production order release / confirmation / TECO, sales order create or change, delivery / billing block, post goods issue, billing, FI document display or reversal, payment block, G/L posting, internal order status, cost center actuals, cost repost or activity allocation, document output status or reprint, shipments, picking, packing / handling units, shipment costs, warehouse transfer orders and requirements, bin and warehouse stock (ECC LE / WM), maintenance notifications and orders, equipment, functional locations and maintenance plans (ECC PM), EWM warehouse tasks, warehouse orders, bins, stock locations, handling units and delivery warehouse progress (S/4 EWM, lookups only). Korean requests too — 미결 PO, 입고, 완결, 납기 변경, 승인, 생산오더, 실적 등록, 기술적 완료, 판매오더, 출하 보류, 청구 보류, 출고 전기, 청구 생성, 전표 조회, 역분개, 지급보류, 분개 전기, 내부오더, 코스트센터 실적, 비용 재전기, 활동 배부, 출력 상태, 재출력, 운송/선적 생성, 피킹, 포장, HU, 운송비, 이전오더(TO) 생성/확정/취소, 이전요청(TR), 저장빈, 창고 재고, 재고실사, 보전오더, 보전통지, 고장 통지, 설비, 기능위치, 보전계획, 보전오더 기술적 완료, 미결 창고작업, 창고작업 조회, 창고오더, 빈 저장빈, 재고 위치, 납품 창고 진행, 검사로트, 사용결정, 검사결과 입력, 품질통지. Not for how / why / configuration questions (ask-consultant).Other plugins' skills for the same job