Uh oh!
There was an error while loading. Please reload this page.
feat(sap_s4hana): add get_material_document and fix supplier invoice key order - #4317
Conversation
Why: SAP A_PurchaseOrder POST silently fails or returns opaque errors without to_PurchaseOrderItem entries. Block already required this body but the tool marked it optional and didn't validate items presence — mismatched contract with create_sales_order / create_purchase_requisition. Also clarifies the deliveryDocument placeholder to show both outbound and inbound number ranges. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…key order Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Tightens Updates docs/metadata: SAP docs now include the new material document GET tool and mark PO Reviewed by Cursor Bugbot for commit 5be41b7. Configure here. |
Greptile SummaryThis PR adds a Confidence Score: 5/5This PR is safe to merge — no logic errors, security concerns, or breaking regressions identified. All changes are consistent and well-scoped: the new tool follows the established pattern exactly, the key-order fix is safe under OData v2 named-predicate semantics, and the body validation is correct. No P0 or P1 findings. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Block UI (sap_s4hana.ts)
participant Registry as Tool Registry
participant Tool as get_material_document.ts
participant Proxy as SAP Proxy
participant SAP as SAP S/4HANA Cloud
UI->>Registry: operation = sap_s4hana_get_material_document
Registry->>Tool: invoke(materialDocument, materialDocumentYear, ...)
Tool->>Proxy: POST SAP_PROXY_URL {service: API_MATERIAL_DOCUMENT_SRV, path: /A_MaterialDocumentHeader(MaterialDocument=...,MaterialDocumentYear=...), method: GET}
Proxy->>SAP: GET /A_MaterialDocumentHeader(MaterialDocument=...,MaterialDocumentYear=...)
SAP-->>Proxy: 200 OK + entity JSON
Proxy-->>Tool: {status, data}
Tool-->>UI: {status, data: A_MaterialDocumentHeader}
Reviews (2): Last reviewed commit: "fix(sap_s4hana): align material doc key ..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ire purchase order body type
waleedlatif1
commented
Apr 28, 2026
waleedlatif1
commented
Apr 28, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5be41b7. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
get_material_documenttool to fetch a single A_MaterialDocumentHeader by composite key (MaterialDocumentYear + MaterialDocument)get_supplier_invoicecomposite key to alphabetic order (FiscalYear, SupplierInvoice)Type of Change
Testing
Tested manually. Lint and typecheck clean.
Checklist