/sap-arc1-kit:sap-smartform-xmlfrom sap-arc1-kit
Reads, copies, and edits SAP SmartForms via XML without SAP GUI, with PDF preview verification. For changing texts, logos, windows, or logic in print forms like delivery notes and invoices.
Ships in sap-arc1-kit. 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; scripts run unread.
Four tools (installed by the skill sap-arc1-kit; the kit object prefix is the one chosen at
installation, ZAI by default):
| Tool | What it does |
|---|---|
Custom_SmartFormRead(name) | Saves the XML of any SmartForms to output/smartforms/<NAME>.xml |
Custom_SmartFormWrite(name, file) | Uploads the XML as a <PREFIX>_* form in $TMP: check, activation, FM generation. If the form exists, it first saves a backup in output/smartforms/backup/ |
Custom_PrintPreview(document, outputType, application?, form?, program?, routine?) | Runs the print program of the NAST message to spool (without printing) and saves the PDF in output/print-preview/ |
Custom_SmartFormReplace(action, original, copy, transport, token?) | Replaces the customer form Z*/Y* with the approved <PREFIX>_* copy, under the given request. prepare: XML backup of the original + summary + token, no writes. execute: with the token; refused if the original or the copy changed after prepare |
They are ARC-1 tools, named here by their short name: in Claude Code they are
mcp__<server>__<tool>, where <server> is the ARC-1 server of the target system in
.mcp.json (e.g. mcp__arc1__Custom_SmartFormRead; the same for SAPQuery, SAPTransport, SAPManage).
Intended constraints of the kit: changes are made only on copies with the kit prefix, in
$TMP, created by the current user; nothing is ever deleted. Standard forms are never touched;
project forms only with Custom_SmartFormReplace, after explicit confirmation by the user.
Copy this checklist into your answer and tick it off as you go:
SmartForms change:
- [ ] 1 Form and print program found
- [ ] 2 Reference preview of the current form
- [ ] 3 <PREFIX>_* copy created and read back
- [ ] 4 Copy preview identical to the reference
- [ ] 5 Change made, preview differs only where intended
- [ ] 6 Hand-over: where to see it, how to roll back
- [ ] 7 Original replaced (only if the user asked, after explicit OK)
Find the form and print program of the document. From TNAPR (output type, medium 1):
SAPQuery: SELECT kappl, kschl, pgnam, ronam, sform FROM tnapr WHERE kschl = '<TYPE>' AND nacha = '1'.
If the output type has no TNAPR entry, ask the user for program and routine (for standard
delivery notes: RLE_DELNOTE / ENTRY).
Reference preview of the current form: Custom_PrintPreview on the document.
Show the PDF to the user and use it to understand what to change.
Copy: Custom_SmartFormRead of the source form, then Custom_SmartFormWrite with a
<PREFIX>_... name on the same file. Read the copy back: apart from name, internal node IDs
and administrative data, the XML must be the same.
Check the copy: Custom_PrintPreview with form=<copy>, program, routine.
The PDF must be identical to the one from step 2. Run the comparison script (needs
pip install pypdf):
python "${CLAUDE_SKILL_DIR}/scripts/pdf_text_diff.py" <reference.pdf> <copy.pdf>
It prints "Identical text" (exit code 0) or the different lines (exit code 1). If the copy differs, find the cause in the XML before going on.
Change: copy the XML to a new file and change only what is needed (see below),
then Custom_SmartFormWrite, preview and compare with the reference using the same script:
only what was meant to change should change. If something else changed, fix the XML and
repeat.
Hand-over: tell the user where to see the result (PDF sent, spool in SP01 with title
Claude preview ..., form in transaction SMARTFORMS in display mode) and how to roll back
(upload the backup file again).
Replacing the original (only if the user asks for it, with the request the user gives):
Custom_SmartFormReplace(action="prepare", original, copy, transport), show the summary and
wait for an explicit OK for that form, then action="execute" with the token. Run the
preview again with the original. To roll back: upload the prepare backup into a copy with
Custom_SmartFormWrite, then prepare + execute again.
The rules (packages, author, allowed requests) are in the project .mcp.json
(see skill sap-arc1-kit). The tool never releases the request. In the summary check the
owner of the request: if it is not the user, ask for confirmation that it is the right one.
execute also saves a backup of the original before replacing it. After execute the form
is in the request as R3TR SSFO <original>: check it with SAPTransport(action="get").
A token is valid once: after execute a second execute is refused.
The original must already be in a transportable package. ADT does not handle SmartForms
(SAPManage change_package cannot find them): to move a form out of $TMP use SE03
→ "Change Object Directory Entries" (RSWBO052, R3TR SSFO <name>), done by the user
or in SAP GUI with their confirmation.
The file has one line per element, so you search with grep and edit with targeted
replacements. Useful structure:
<sf:WINDOW> with <NAME><INAME> = window name (e.g. ADRESS, INFO, MAIN).<NODETYPE>. Codes seen in LE_SHP_DELNOTE: PA page, WI window,
TI text, AD address, GR graphic, CO ABAP code, SE section (loop/table),
EV event, RC/RP roots. For a new form count the types with
grep -o "<NODETYPE>[A-Z]*</NODETYPE>" file.xml | sort | uniq -c. The output conditions of a
node are in sf:CONDITION.sf:TEXT): the printed lines are in <TEXT><item><TDFORMAT>/<TDLINE>
(original language of the form) and in <T_TEXT> one line per language (<SPRAS>).
Changing a text = changing the line in TEXT and the entry for the print language in
T_TEXT. In TDLINE the format tags are escaped (<TI>Title</>); fields are
&FIELD&.<TTYPE>I</TTYPE> and <TKEY> are include texts (SO10): their content is not in
the form.sf:ADDRESS, NODETYPE AD): they print the master data of <NUMB> (address
number). To print a fixed address, replace the node with a text: NODETYPE TI and
sf:TEXT with lines in TEXT/T_TEXT, keeping sf:OUTATTR (style and paragraphs) as is.sf:OUTATTR (WLEFT, WTOP, WWIDTH, WHEIGHT
with their units).For structural changes (moving nodes, new nodes) start from an existing node of the same type
and duplicate it with a script, giving it a unique INAME. Avoid writing XML by hand from
scratch.
| Result | Meaning |
|---|---|
| "Writing allowed only for SmartForms _*" | Target not allowed: use a copy |
| "cannot be changed: package ..., author ..." | The form exists but is not in $TMP or belongs to another user |
| "Invalid XML: ..." | Broken file, without SmartForms namespace or without HEADER: nothing was written |
| "Form check: N errors, e.g. ..." | Real errors of the SmartForms check (warnings do not block); the form in SAP is unchanged |
| "saved but not generated" | Saved but the FM is not generated: open it in SMARTFORMS and run the check, or upload the backup again |
| "Replacement allowed only for SmartForms Z* or Y*" / "is a ... copy" | Standard original, or a copy used as original |
| "Replacement refused by the project rules" | Package, author or request not allowed by .mcp.json |
| "changed after prepare" | Someone changed the original or the copy after prepare, or the token was already used: run prepare again and check again |
| "The copy must be a SmartForms _*" | A form without the kit prefix was passed as copy |
| "Transport request ... does not exist, is already released or is not a workbench request" | Wrong request: ask the user for the right one |
| "belongs to another user: author ..., logged-on user ..." | Author check active and form of a colleague: do not force it; on systems with a shared user it is disabled in .mcp.json |
| "Different original language" | Copy created from an XML in another language: create the copy again from the XML of the original |
| "... is already recorded in transport request ..." | execute failed after recording: the original is unchanged but is in the request; fix the copy and run prepare + execute again, or remove the object from the request before release |
| Preview: "has no print program configured (TNAPR)" | Pass form, program, routine together |
| Preview: HTTP 500 | The print program issued a MESSAGE E/A (e.g. nothing to print for that document) |
The preview does not change the NAST message, but the print program really runs: some programs update the document or consume number ranges when they print (e.g. picking lists). If the program is not print-only, ask for confirmation before running it.
sap-adobe-form; SAPscript forms can only be
previewed with Custom_PrintPreview.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/sap-adobe-formReads, copies and edits SAP Adobe forms (Interactive Forms by Adobe, transaction SFP) without SAP GUI or LiveCycle Designer, as files - the form XML (context), the layout XDP and the interface - through the ARC-1 tools Custom_AdobeFormRead/Custom_AdobeFormWrite/Custom_AdobeInterfaceWrite, checks the result on the PDF preview of a real document (Custom_PrintPreview), even with a form not yet configured in NACE/TNAPR, and gives the customer form the layout of the approved copy under a transport request (Custom_AdobeFormReplace). Use it when the user wants to change texts, fields, logos, positions, fonts or conditions of an Adobe print form (order confirmation, invoice, delivery note, purchase order), make a Z copy of a standard Adobe form, print a new field that the form does not have yet, see how a PDF form is built or find where a printed field comes from, even without saying "Adobe", "SFP" or "XDP". Not for SmartForms (skill sap-smartform-xml) or S/4 Output Management (BRF+/APOC)./sap-arc1-kitInstalls on an SAP system (on-premise, through the ARC-1 MCP server) the tool kit that lets Claude run reports with variants/selection values and read the ALV output, create PDF previews of NAST print output, read and edit SmartForms as XML, replace a customer form with the approved copy, read and copy Adobe forms (SFP) as XML + XDP with their form interfaces, and give a customer Adobe form the layout of the approved copy. Use it when starting a new SAP project and the tools Custom_LaunchReport, Custom_PrintPreview, Custom_SmartFormRead/Write/Replace, Custom_AdobeFormRead/Write/Replace, Custom_AdobeInterfaceWrite are not available, when the user asks to "install/port the tools", "prepare the system", "set up the report launcher or SmartForms tools" on a new system or client, or when the skills sap-report-launcher / sap-smartform-xml / sap-adobe-form report that the tools are missing.npx claudepluginhub silvius1996/claude-sap-kit --plugin sap-arc1-kitOther plugins' skills for the same job