How To Fix WS158 - You cannot cancel - accounting document does not exist for document &1


SAP Error Message - Details

  • Message type: E = Error

  • Message class: WS - Supplier Billing Document

  • Message number: 158

  • Message text: You cannot cancel - accounting document does not exist for document &1

  • Show details Hide details
  • What causes this issue?

    The accounting document for document &V1& does not exist in the system.

    System Response

    The system does not allow cancellation of document &V1&, as further
    errors would then arise when the accounting document is created for the
    cancellation document.

    How to fix this error?

    Create a credit memo for document &V1& or change the
    <DS:DE.WFARTS>settlement document type for the reversal document</> of
    settlement document document type &V2& so that a credit memo can be
    created for document &V1&.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message WS158 - You cannot cancel - accounting document does not exist for document &1 ?
    Certainly! Here's a detailed explanation for the SAP error message WS158:
    
    SAP Error Message WS158
    Message Text:
    You cannot cancel - accounting document does not exist for document &1
    
    Cause
    This error occurs when you attempt to cancel or reverse a document in SAP, but the system cannot find the corresponding accounting document linked to the original document number you provided.
    In SAP, many business documents (like invoices, goods movements, etc.) generate accounting documents that record the financial impact. When you try to cancel or reverse a document, SAP checks for the related accounting document to reverse the financial postings. If the accounting document is missing or was never created, the system throws this error.
    Common reasons include:
    
    The original document was created without generating an accounting document (e.g., a logistics document without financial impact).
    The accounting document was deleted or archived.
    You entered an incorrect document number or company code.
    The document belongs to a different fiscal year or company

    Already have an account? Login here!


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
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author