/sc4sap:adobe-previewfrom sc4sap
Renders Adobe form (SFP, S/4HANA) XFA layouts as HTML pages in mm with sample values matching DDIC types. Useful for reviewing form output before test documents exist.
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.
Offline profile (
common/offline-mode.md): blocked — reply with the stop line there and stop.
Reads one Adobe form (transaction SFP) from the connected system and draws what its printed pages will look like, without a print program: one HTML file with every page as an A4 SVG in mm, a model JSON (every text with its SOM path and binding) and, with Chrome / Edge, a PDF and a JPG. Interface parameters are filled with invented values that fit their DDIC types, converted the way the generated function module hands them to ADS (NUMC padding, packed decimals, currency shifts, ISO languages).
Consultants need to see an Adobe form before test documents exist, to review a layout change, or to attach expected output to a spec. Testing in SFP needs a driver and real data; this skill only needs the form.<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. This skill dispatches no agents (Dispatched: none).</Response_Prefix>
<Target_Object>The target object is looked up on the active profile's system only. Not found → stop and ask per ../../common/multi-profile-artifact-resolution.md § Target object not on the active system — never substitute a similar name, never switch profiles on your own.</Target_Object>
<Team_Mode>No teamMode integration. Reading and drawing are scripted; the main thread writes the sample values.</Team_Mode>
<Use_When>
<Do_Not_Use_When>
/sc4sap:smartform-preview; SAPscript (SE71) is not supported/sc4sap:smartform-to-adobe), building a form from a PDF (→ /sc4sap:adobe-from-pdf)ZMCP_FP_CONTENT)
</Do_Not_Use_When><Decisions_Fixed>
| Topic | Decision |
|---|---|
| Source | MCP GetAdobeFormContent (active version, logon language): <form>.form.xml (context), <interface>.interface.xml, <form>.layout.xdp in the MCP output directory |
| Values | Invented by the main thread from the DDIC types, never read from documents |
| Layout rules | XFA subset and measured ADS rules in layout-subset.md; anything outside is listed under approximations |
| Scripts | FormCalc subset and page-number JavaScript run; other scripts are listed, not run |
| Pages | All pages; master page content (headers, page numbers) on every page |
| Output | <artifact-base>/adobe/<FORM>/<FORM>-preview.{html,model.json,pdf,jpg} + values.json (artifact base per ../../common/multi-profile-artifact-resolution.md) |
| </Decisions_Fixed> |
Step 1 — Target. config.json sapVersion is ECC → stop in one line: the Adobe form helper (ZMCP_FP_CONTENT) runs on S/4HANA only; for a SmartForm use /sc4sap:smartform-preview. Form name from ARGUMENTS; if missing ask once in plain text with an example ("Which Adobe form (SFP)? e.g. ZSD_INVOICE_AF"). Uppercase it. Then say in one line what comes: read the form and its DDIC types → invented sample values → HTML / PDF / JPG, read-only.
Step 2 — Read the form. GetAdobeFormContent(form_name) → header (interface, layout type), summary (page areas, subforms, fields, draws, bindings, scripts) and files. Never load the XML / XDP files into the conversation.
layoutType blank or a fragment / output-management template (SFTE / SFLO) → say "not supported" and stop.Step 3 — What prints.
node scripts/adobe/build-adobe-preview.mjs fields "<dir>"
→ every printed context leaf: path (BOOKINGS.DATA.FLDATE), source field (BOOKINGS-FLDATE), inside a loop or not, text modules.
Step 4 — Field types. For every interface parameter and global (readInterface): GetStructure (DDL: abap.char(20) inline or a data element per field), GetDataElement for data-element fields, GetTypeInfo for a table type's row type. Built-in parameter types (C, N, P, D, T, I, STRING) need no read. Keep { type, length, decimals } per field, keyed like the context field: "BOOKINGS-FORCURAM": { "type": "CURR", "length": 15, "decimals": 2 }. scripts/adobe/read-adobe-sap.mjs readFormDdic does the same for the web.
Step 5 — Text modules and include texts (context nodes of kind text-module / text). Language: the node's own text.language when set (SAP prints that one), else the logon language.
GetSqlQuery on STXFTXT (formname IN (…) AND spras = '<language>' — Smart Forms repository text, not business data) and the paragraph formats of their SmartStyle from STXSPARA (style name: from the text module where known, else ask in plain text with the SmartStyle names the form's text modules use).text.name / object / id): GetStandardText (DEV systems only); a name held in a field (nameField) comes from the sample values.
Without them the node prints empty and is listed in missingTexts.Step 6 — Sample values → write <out>/values.json with the Write tool:
{ "form": "ZXX_FORM", "locale": "en_US",
"values": { "CUSTOMER": { "ID": "00004711", "NAME": "Example Travel Agency" },
"BOOKINGS": [ { "CARRID": "LH", "FLDATE": "2026-03-01", "FORCURAM": 830.5, "FORCURKEY": "EUR" } ] },
"globals": { "T_SUMS": [ { "FORCURAM": 830.5, "FORCURKEY": "EUR" } ] },
"system": { "SFPSY-DATE": "2026-03-01" },
"ddic": { "BOOKINGS-FORCURAM": { "type": "CURR", "length": 15, "decimals": 2 } },
"texts": { "ZXX_FOOTER": { "itf": [ { "f": "FT", "t": "…" } ], "formats": { "FT": { "pt": 6, "align": "center" } } } } }
YYYY-MM-DD, times HH:MM:SS, numbers as JSON numbers, amounts in the currency's own unit — the script converts them as SAP does (JPY shifts, NUMC padding, LANG → ISO, CHAR cut at its length).Step 7 — Build.
node scripts/adobe/build-adobe-preview.mjs build "<dir>" --values "<out>/values.json" --out-dir "<out>" --pdf --jpg [--inspect]
Report JSON: pages, missingTexts, approximations (scripts not run, unsupported elements), unbound (bindings without data), overflow, system + notes (the date used is your input — SAP prints its server date).
Step 8 — Check and show. Read the JPG before answering: empty areas, overlapping boxes, missing images, values cut off. Fix values.json and rebuild for value problems; report layout findings — never "fix" the form in the drawing.
Step 9 — SAP comparison (optional, DEV only, SAP example forms). RenderAdobeForm(form_name, values_file) prints through ADS (no spool) — the helper accepts only SAP's example forms of package SFPT and refuses customer forms. Then:
node scripts/adobe/score-forms.mjs "<sap.pdf>" "<out>/<FORM>-preview.pdf" --model "<out>/<FORM>-preview.model.json" --profile A
Show the metric vector (P1mm, P2mm, FIELD, FIXED, PAGES, ROWBRK, WRAP, FONT, RULE, IMG, EXTRA), maxError / meanError, the excluded lines (SAP used a fallback font — not measurable) and the top failures. The fidelity score (target ≥ 98 %) comes next to the vector, never instead of it: node scripts/forms-common/score-fidelity.mjs "<sap.pdf>" "<out>/<FORM>-preview.pdf", with its missing / moved / extra list. Give the SAP render the same system date as the preview. The thresholds are in ../../common/adobe-forms-verification.md.
<Data_Rules>
Only the form definition, interface, layout, DDIC metadata and Smart Forms text modules are read. Sample values are invented — never business data. No GetTableContents / GetSqlQuery on business tables; the only SQL reads are STXFTXT / STXSPARA (form texts and styles). A request for "the real output of document X" is refused: say the preview uses invented values and the real output comes from the application's output control.
</Data_Rules>
<Output_Format>
Adobe form preview: ZXX_FORM (interface ZXX_IF, XFA 2.4, 2 pages, A4 portrait)
Fields filled: 54 · Text modules: 2 · Sample rows: 12 (page break after row 9, header repeated)
Approximations: JavaScript on GRAPHIC_3 not run
HTML: .sc4sap/work/DEV/adobe/ZXX_FORM/ZXX_FORM-preview.html
PDF / JPG: …-preview.pdf / …-preview.jpg
Values: .sc4sap/work/DEV/adobe/ZXX_FORM/values.json
Next: "more rows", "other values", "show page 2", "compare with SAP (example forms only)"
Reply in the user's language; show the JPG when the client can display images. </Output_Format>
See [`layout-subset.md`](layout-subset.md) § Not supported. Fonts other than Arial / Helvetica / Courier / Times print in the browser's substitute; ADS's own fallback font for characters outside its encoding (e.g. `€` in Helvetica) is not imitated.<MCP_Tools_Used>
GetAdobeFormContent, RenderAdobeForm (Step 9 only, DEV, SAP example forms)GetStructure, GetDataElement, GetTypeInfo (field types), GetSqlQuery (STXFTXT, STXSPARA only)
</MCP_Tools_Used><Related_Skills>
/sc4sap:smartform-preview — the same for SmartForms/sc4sap:smartform-to-adobe — conversion plan of a SmartForm into an Adobe form
</Related_Skills>Task: $ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
inheritThree short reads, in order
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./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)./cbo-relation-mapDraw how the customer objects of one or more CBO packages relate — one self-contained HTML relation map built from the reference graph of /sc4sap:stock-cbo (DDIC typing, check tables, search helps, value tables, row types, view bases, plus includes, calls, submits, transactions, reads and writes from source). Overview with the most connected objects, usage and groups of related objects; a search-driven neighbourhood view drawn like Obsidian's graph (relation presets, filters by kind / type / basis / usage / package); impact of a change up to the TCodes; shortest paths; a table CRUD tab; a Fields tab (who creates / reads / updates / deletes each table field, incl. customer appends of standard tables, and the TCodes and jobs that reach the writers); source lines behind every relation; PNG / CSV export. Customer (Z / Y / namespace) objects only. Collects the graph itself when it is missing (whole package or used TCodes only; eco = map-only collection).Other plugins' skills for the same job