{
  "test_id": "ORCL.P2P.PROC.PO.CANCEL",
  "scenario_name": "Cancel Purchase Order",
  "application": "Oracle Fusion Cloud",
  "product": "SCM / Procurement",
  "module": "Procurement",
  "process": "Purchase Orders",
  "business_flow": "Procure-to-Pay",
  "scenario_type": "Positive / Functional",
  "priority": "High",
  "automation_status": "SyntraFlow Ready",
  "library": "Syntra Standard",
  "canonical_url": "https://www.syntraflow.cloud/oracle-erp-testing-tool/test-library/scm/procurement/purchase-orders/cancel-purchase-order/",
  "objective": {
    "intro": "The objective of this test is to verify that an authorized Procurement user can cancel an eligible purchase order, or a specific line within it, in Oracle Fusion, and confirm the resulting status, open quantity and downstream impact.",
    "confirms": [
      "the selected purchase order or PO line is eligible for cancellation",
      "a full purchase order can be cancelled, and a single line can be cancelled independently on a multi-line PO",
      "the cancellation reason is accepted and retained against the transaction",
      "the purchase order or line status correctly updates to Cancelled",
      "the open (unfulfilled) quantity is correctly adjusted, while any already-received quantity is left unaffected",
      "downstream fulfillment activity such as further receiving is correctly blocked once a PO or line is cancelled",
      "the cancellation is retained in purchase order history rather than removing the record"
    ],
    "scope_note": "This scenario does not claim that every downstream receiving, invoicing or budgetary control interaction is covered — those depend on the customer's specific Oracle Fusion configuration and are addressed by separate test scenarios."
  },
  "preconditions": [
    "Oracle Fusion Procurement Purchase Orders is configured and available to the test user.",
    "An existing purchase order exists, with at least one line eligible for cancellation.",
    "The purchase order or line is not fully received and not already closed.",
    "The purchase order or line has not already been cancelled.",
    "The test user has the appropriate security/privilege to cancel purchase orders."
  ],
  "test_data": [
    {
      "field": "PO Number",
      "example": "${PO_NUMBER}"
    },
    {
      "field": "Line Number",
      "example": "${LINE_NUMBER}"
    },
    {
      "field": "PO/Line Status",
      "example": "Open / Approved — eligible for cancellation"
    },
    {
      "field": "Cancellation Scope",
      "example": "Full Purchase Order or Specific Line"
    },
    {
      "field": "Open Quantity",
      "example": "${OPEN_QUANTITY}"
    },
    {
      "field": "Cancellation Reason",
      "example": "${CANCELLATION_REASON}"
    },
    {
      "field": "Buyer",
      "example": "${BUYER}"
    }
  ],
  "business_steps": [
    {
      "step_number": 1,
      "step_name": "Sign In to Oracle Fusion",
      "action": "Sign in to Oracle Fusion Cloud with a user that holds purchase order cancellation privileges.",
      "test_data": "${BUYER}",
      "expected_result": "The user successfully signs in and lands on the Oracle Fusion home page.",
      "validation_type": "action"
    },
    {
      "step_number": 2,
      "step_name": "Navigate to the Purchase Order",
      "action": "Navigate to the Purchase Orders work area and search for the target purchase order.",
      "test_data": "${PO_NUMBER}",
      "expected_result": "The correct purchase order is located and its current status is confirmed as eligible for cancellation.",
      "validation_type": "action",
      "note": "This single business step replaces multiple technical actions such as opening search, entering the PO number, clicking Search and selecting the result."
    },
    {
      "step_number": 3,
      "step_name": "Select Cancel (Full PO or Specific Line)",
      "action": "Select the Cancel action for the full purchase order, or for a specific line where only a line-level cancellation is required.",
      "test_data": "${LINE_NUMBER}",
      "expected_result": "The Cancel Purchase Order (or Cancel Line) page or dialog opens for the selected scope.",
      "validation_type": "action"
    },
    {
      "step_number": 4,
      "step_name": "Enter Cancellation Reason",
      "action": "Enter the reason for cancelling the purchase order or line.",
      "test_data": "${CANCELLATION_REASON}",
      "expected_result": "The cancellation reason is accepted without unexpected validation errors.",
      "validation_type": "action"
    },
    {
      "step_number": 5,
      "step_name": "Confirm Cancellation",
      "action": "Confirm and submit the cancellation.",
      "test_data": "",
      "expected_result": "Oracle Fusion successfully processes the cancellation request without unexpected errors.",
      "validation_type": "action"
    },
    {
      "step_number": 6,
      "step_name": "Verify Status Updated",
      "action": "Confirm the purchase order's or line's status following the cancellation.",
      "test_data": "",
      "expected_result": "Purchase order or line status updates to Cancelled, with the cancellation reason correctly recorded.",
      "validation_type": "business_assertion"
    },
    {
      "step_number": 7,
      "step_name": "Verify Open Quantity Adjusted",
      "action": "Confirm the open (unfulfilled) quantity on the purchase order or line after cancellation.",
      "test_data": "${OPEN_QUANTITY}",
      "expected_result": "The open quantity is correctly reduced to reflect the cancellation, while any already-received quantity remains unaffected.",
      "validation_type": "business_assertion"
    },
    {
      "step_number": 8,
      "step_name": "Verify Downstream Fulfillment Blocked Appropriately",
      "action": "Confirm that the cancelled purchase order or line can no longer be actioned for downstream fulfillment, such as further receiving, while remaining visible in purchase order history.",
      "test_data": "${PO_NUMBER}",
      "expected_result": "The cancelled purchase order or line is correctly excluded from further downstream fulfillment and remains traceable in history rather than being removed.",
      "validation_type": "business_assertion",
      "note": "This is the main business assertion for the scenario — a PO cancellation must be enforced downstream and must not silently remove purchase order history."
    }
  ],
  "expected_results": [
    "An eligible purchase order or PO line cancels successfully.",
    "Purchase order or line status updates correctly to Cancelled.",
    "Cancellation reason is correctly recorded.",
    "A cancelled full purchase order and a cancelled single line both behave correctly and independently of other lines.",
    "Open (unfulfilled) quantity is correctly adjusted, while already-received quantity is unaffected.",
    "The cancelled purchase order or line is unavailable for further downstream fulfillment such as additional receiving.",
    "The cancellation remains traceable in purchase order history.",
    "No unexpected save errors occur."
  ],
  "validation_checkpoints": [
    "Purchase order or line status becomes Cancelled.",
    "Downstream fulfillment is blocked appropriately for the cancelled scope.",
    "Cancellation is retained in purchase order history.",
    "Open quantity is correctly adjusted."
  ]
}
