技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
s4hana-create-pir【数据与研究】Create Purchasing Info Records (PIRs) in SAP S/4HANA Cloud Public or on-prem private edition via OData V2 A_PurchasingInfoRecord deep-insert at API_INFORECORD_PROCESS_SRV. Use whenever the user wants to create, post, add, generate, seed, onboard, or maintain purchasing info records — phrases like "create PIRs for supplier X", "add info records", "see…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Create Purchasing Info Records on SAP S/4HANA Cloud Public. Verified production-ready against SAP S/4HANA Cloud Public Edition 2026-05-12 (PIR 5300000130 created via API; 119 prior bulk-migrated PIRs from 2026-05-05).
Verbs: create / post / add / generate / seed / maintain / onboard Objects: PIR(s), purchasing info record(s), info record(s), supplier-material pricing Counts: 1 to ~200 records.
ProcurementType=F, both exist in the target Plant.<cwd>/.s4hana-tmp/create-pirs-<YYYYMMDD-HHMM>/. Never commit, never modify .env./sap/opu/odata/sap/API_INFORECORD_PROCESS_SRVA_PurchasingInfoRecord, A_PurgInfoRecdOrgPlantDatato_PurgInfoRecdOrgPlantData)SAP_COM_0102 — "Purchasing Info Record Integration"Before any API call, before any tool use, do this check. Even if you already know credentials from earlier in the conversation — IGNORE that knowledge and re-check from scratch each invocation.
<current cwd>...".env file at ./.env (in the current working directory — NOT parent dirs, NOT ~/.env, NOT any memory file)SAP_HOST AND SAP_AUTH_MODE both present./.env from the bundled template (curl from https://raw.githubusercontent.com/ilia-inovaflow/s4hana-create-record-skills/main/.env.example), append .env to .gitignore if not already there, tell the user clearly what to fill in (auth mode + host + creds), and wait for them to say "ready" before making any API call. Never overwrite an existing .env.<host> in <auth-mode> mode. Proceeding with [task]."Never use credentials from conversation memory, from another project's .env, or from any tenant the user previously worked with in a different session. Each project gets its own .env. See shared/setup-check.md for the full rationale and edge cases.
| Code | Cause | Fix |
|---|---|---|
ME/083 | "Enter G/L Account" OR "Enter Standard Order Quantity" | The PIR variant: add StandardPurchaseOrderQuantity to org-plant entity |
ME/092 | Procurement type doesn't match (material is in-house E, but PIR needs F external) | Filter materials to ProcurementType=F only |
06/321 | Supplier does not exist in purchasing organization | Extend supplier with A_SupplierPurchasingOrg row for the target PurchOrg first |
Property X is invalid | Header has fields that belong on org-plant (e.g. PurchasingInfoRecordCategory) | Move them into to_PurgInfoRecdOrgPlantData |
MM_PUR_PIR/xxx generic | Check innererror.errordetails | Specific field will be named |
<cwd>/.s4hana-tmp/create-pirs-<YYYYMMDD-HHMM>/
├── eligible-pairs.json # (supplier, material) candidates after filtering
├── payloads.json
├── create-log.jsonl
├── results.json
└── verify-sample.json
references/envelope-template.md — full schema with all optional fieldsreferences/known-quirks.md — header vs org-plant fields, ProcurementType filter, supplier-purchorg requirement, side-effectsscripts/bulk-pir-poster.mjs — reference implementation