Skip to content

improvement(sap_s4hana): use MERGE for OData v2 updates and enlarge icon#4332

Merged
waleedlatif1 merged 1 commit into
stagingfrom
waleedlatif1/sap-validation-final
Apr 29, 2026
Merged

improvement(sap_s4hana): use MERGE for OData v2 updates and enlarge icon#4332
waleedlatif1 merged 1 commit into
stagingfrom
waleedlatif1/sap-validation-final

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Switch all 7 SAP S/4HANA update tools (business partner, customer, supplier, product, sales order, purchase order, purchase requisition) from PATCH to MERGE for better legacy SAP gateway compatibility on OData v2 services
  • Tighten SapS4HanaIcon viewBox so the logo renders slightly larger in block tiles (mirrored in docs icon set)

Type of Change

  • Improvement

Testing

Tested manually. Final validate-integration pass over all 38 tools + block + registries + proxy contract: 100% aligned with SAP API docs.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 29, 2026 1:17am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 29, 2026

PR Summary

Cursor Bugbot is generating a summary for commit 199fbff. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR switches all 7 SAP S/4HANA update tools from PATCH to MERGE for better OData v2 compatibility with legacy SAP gateways, and tightens the SapS4HanaIcon viewBox to make the logo render larger in block tiles. The proxy (route.ts) already had MERGE in its HttpMethod enum and WRITE_METHODS set prior to this PR, so no server-side changes were required — the tools simply weren't using the supported method.

Confidence Score: 4/5

Safe to merge — targeted, low-risk changes with full proxy-layer support already in place

All 7 tool changes are identical one-liners; the proxy already accepted MERGE before this PR. The viewBox crop is a straightforward visual adjustment mirrored correctly in both icon files. No automated tests were added (checkbox unchecked), keeping this below a perfect 5.

No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/sap_s4hana/update_business_partner.ts Single-line PATCH → MERGE change; consistent with OData v2 spec and already validated by the proxy's HttpMethod enum
apps/sim/tools/sap_s4hana/update_customer.ts Single-line PATCH → MERGE change; mirrors update_business_partner pattern
apps/sim/tools/sap_s4hana/update_supplier.ts Single-line PATCH → MERGE change; same API_BUSINESS_PARTNER service as customer and business partner tools
apps/sim/tools/sap_s4hana/update_product.ts Single-line PATCH → MERGE change on API_PRODUCT_SRV service
apps/sim/tools/sap_s4hana/update_sales_order.ts Single-line PATCH → MERGE change on API_SALES_ORDER_SRV service
apps/sim/tools/sap_s4hana/update_purchase_order.ts Single-line PATCH → MERGE change on API_PURCHASEORDER_PROCESS_SRV service
apps/sim/tools/sap_s4hana/update_purchase_requisition.ts Single-line PATCH → MERGE change on API_PURCHASEREQ_PROCESS_SRV service
apps/sim/components/icons.tsx viewBox narrowed from '0 0 412.38 204' to '15 10 382.38 184' — crops 15px per horizontal side and 10px per vertical side, making the SAP logo appear larger in fixed-size containers
apps/docs/components/icons.tsx Identical viewBox change to the docs icon set, keeping sim and docs icons in sync

Sequence Diagram

sequenceDiagram
    participant Tool as Update Tool<br/>(e.g. update_business_partner)
    participant Proxy as SAP Proxy<br/>/api/tools/sap_s4hana/proxy
    participant CSRF as SAP Metadata<br/>/$metadata
    participant SAP as SAP OData v2<br/>Gateway

    Tool->>Proxy: POST {method: "MERGE", path, body, ifMatch}
    Proxy->>Proxy: Validate method in HttpMethod enum
    Proxy->>CSRF: GET /$metadata (X-CSRF-Token: Fetch)
    CSRF-->>Proxy: x-csrf-token + Set-Cookie
    Proxy->>SAP: MERGE /A_BusinessPartner('123')<br/>If-Match: * | X-CSRF-Token: token
    SAP-->>Proxy: 204 No Content
    Proxy-->>Tool: {success: true, output: {status: 204, data: null}}
Loading

Reviews (1): Last reviewed commit: "improvement(sap_s4hana): use MERGE for O..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant