SAP Sales and Distribution (SD) · Arazzo Workflow

SAP SD Billing Review and Cancel

Version 1.0.0

Read a billing document, list its items and partners, then optionally cancel it.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub DistributionERPODataS/4HANASalesSAPArazzoWorkflows

Provider

sap-sales-and-distribution-sd

Workflows

billing-review-and-cancel
Review a billing document and cancel it when reversal is allowed.
Reads a billing document, lists its items and partners, and conditionally cancels it based on its cancellation status.
4 steps inputs: billingDocument, csrfToken outputs: billingDocument, cancelledBillingDocument, items
1
getBilling
Read the billing document header to inspect its status.
2
listItems
List the billing document items to review the billed lines.
3
listPartners
List the billing document partner functions (payer, bill-to, etc.).
4
cancelBilling
Cancel the billing document, generating a reversal document and flagging the original as cancelled.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: SAP SD Billing Review and Cancel
  summary: Read a billing document, list its items and partners, then optionally cancel it.
  description: >-
    A billing-document audit and reversal flow in SAP Sales and Distribution.
    The workflow reads a billing document, lists its items and its partner
    functions, and branches: when the document carries a cancellation status
    that allows reversal it issues a cancellation, otherwise it ends without
    modifying anything. Each step inlines its OData request so the flow reads
    and runs without opening the underlying OpenAPI descriptions. The
    cancellation POST requires an X-CSRF-Token header supplied as a workflow
    input.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-200.30
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-200.30
      capability_name: Accounts Receivable Management
      spec: sap-sales-and-distribution-sd-billing-document-item-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: billingDocumentApi
  url: ../openapi/sap-sales-and-distribution-sd-billing-document-api-openapi.yml
  type: openapi
- name: billingDocumentItemApi
  url: ../openapi/sap-sales-and-distribution-sd-billing-document-item-api-openapi.yml
  type: openapi
- name: billingDocumentPartnerApi
  url: ../openapi/sap-sales-and-distribution-sd-billing-document-partner-api-openapi.yml
  type: openapi
workflows:
- workflowId: billing-review-and-cancel
  summary: Review a billing document and cancel it when reversal is allowed.
  description: >-
    Reads a billing document, lists its items and partners, and conditionally
    cancels it based on its cancellation status.
  inputs:
    type: object
    required:
    - csrfToken
    - billingDocument
    properties:
      csrfToken:
        type: string
        description: X-CSRF-Token fetched from the OData service for write operations.
      billingDocument:
        type: string
        description: Billing document number to review and possibly cancel.
  steps:
  - stepId: getBilling
    description: Read the billing document header to inspect its status.
    operationId: getBillingDocument
    parameters:
    - name: BillingDocument
      in: path
      value: $inputs.billingDocument
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      billingDocument: $response.body#/d/BillingDocument
    onSuccess:
    - name: notCancelled
      type: goto
      stepId: listItems
      criteria:
      - context: $response.body
        condition: $.d.BillingDocumentIsCancelled == false
        type: jsonpath
    - name: alreadyCancelled
      type: end
      criteria:
      - context: $response.body
        condition: $.d.BillingDocumentIsCancelled == true
        type: jsonpath
  - stepId: listItems
    description: List the billing document items to review the billed lines.
    operationId: listBillingDocumentItems
    parameters:
    - name: BillingDocument
      in: path
      value: $steps.getBilling.outputs.billingDocument
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      items: $response.body#/d/results
  - stepId: listPartners
    description: List the billing document partner functions (payer, bill-to, etc.).
    operationId: listBillingDocumentPartners
    parameters:
    - name: BillingDocument
      in: path
      value: $steps.getBilling.outputs.billingDocument
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      partners: $response.body#/d/results
  - stepId: cancelBilling
    description: >-
      Cancel the billing document, generating a reversal document and flagging
      the original as cancelled.
    operationId: cancelBillingDocument
    parameters:
    - name: X-CSRF-Token
      in: header
      value: $inputs.csrfToken
    - name: BillingDocument
      in: query
      value: $steps.getBilling.outputs.billingDocument
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cancelledBillingDocument: $response.body#/d/BillingDocument
  outputs:
    billingDocument: $steps.getBilling.outputs.billingDocument
    items: $steps.listItems.outputs.items
    cancelledBillingDocument: $steps.cancelBilling.outputs.cancelledBillingDocument

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/sap-sales-and-distribution-sd-billing-review-and-cancel-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.