How To Fix WS159 - You cannot cancel - accounting document contains settled items


SAP Error Message - Details

  • Message type: E = Error

  • Message class: WS - Supplier Billing Document

  • Message number: 159

  • Message text: You cannot cancel - accounting document contains settled items

  • Show details Hide details
  • What causes this issue?

    The accounting document for document &V1& contains cleared amounts.

    System Response

    The system does not allow document &V1& to be cancelled, as this would
    result in errors during the creation of the accounting document of the
    reversal document.

    How to fix this error?

    For document &V1&, enter a document with a contrasting settlement
    document category or change the
    <DS:DE.WFARTS>settlement document type for the reversal document</> of
    settlement document type &V2& so that an invoice/credit memo/valued
    credit memo is created for document &V1& (tmfk-lftyp = '01' or
    tmfk-lftyp = '03').

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message WS159 - You cannot cancel - accounting document contains settled items ?

    Certainly! Here's a detailed explanation for the SAP error message WS159: "You cannot cancel - accounting document contains settled items":


    Error Message: WS159

    Text:
    You cannot cancel - accounting document contains settled items.


    Cause:

    This error occurs when you try to cancel (reverse) an accounting document that includes line items which have already been settled. In SAP, "settled items" means that the line items have been cleared or offset against other documents (e.g., payments, clearing documents, or settlement documents). Once an item is settled, it is linked to another document, and direct cancellation of the original document is not allowed because it would break the integrity of the clearing or settlement process.


    Explanation:

    • The document you want to cancel has line items that are cleared/settled.
    • Clearing means the item has been matched and offset with another item (e.g., invoice cleared by payment).
    • SAP prevents cancellation to avoid inconsistencies in financial data.
    • You must first reverse the clearing/settlement before you can cancel the original document.

    Solution:

    1. Identify the settled items:

      • Use transaction FBL1N (Vendor Line Items), FBL3N (G/L Account Line Items), or FBL5N (Customer Line Items) to find the document and check which items are cleared.
      • Look for the clearing document number in the line item details.
    2. Reverse the clearing document:

      • Use transaction FBRA (Reset Cleared Items) or F.13 (Automatic Clearing) to reverse the clearing.
      • Alternatively, manually reverse the clearing document using FB08 (Cancel Document) on the clearing document.
    3. Cancel the original document:

      • After the clearing is reversed, you can now cancel the original accounting document using FB08 or the relevant cancellation transaction.
    4. Re-clear the items if necessary:

      • After cancellation and correction, you may need to clear the items again.

    Additional Notes:

    • Authorization: Ensure you have the necessary authorization to reverse clearing documents.
    • Impact: Reversing clearing documents can affect open items and financial reports, so proceed carefully.
    • Customizing: In some cases, system settings or user exits might restrict cancellation of certain documents.
    • Document Flow: Always check the document flow to understand dependencies before reversal.

    Summary:

    Aspect Details
    Cause Document contains line items that are already settled/cleared.
    Effect SAP blocks cancellation to maintain data integrity.
    Solution Reverse the clearing/settlement first, then cancel the original document.
    Transactions FBL1N, FBL3N, FBL5N (to identify), FBRA (reset clearing), FB08 (cancel document)

    If you need help with specific steps or transactions, feel free to ask!

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo simplifies finding the accurate answers to SAP message errors. I now use every week. A must have tool for anyone working with SAP! Highly recommended!
Rate 1
Kent Bettisworth
Executive SAP Consultant