How To Fix DDLS173 - CASE without WHEN or THEN keyword


SAP Error Message - Details

  • Message type: E = Error

  • Message class: DDLS - For DDL source handling

  • Message number: 173

  • Message text: CASE without WHEN or THEN keyword

  • Show details Hide details


  • Self-Explanatory Message

    Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.

    To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.

    Unfortunately, there isn't any extra information in this error notice.



    What else can you do?

    First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).

    Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.

    You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.


Smart SAP Assistant

  • What is the cause and solution for SAP error message DDLS173 - CASE without WHEN or THEN keyword ?

    The SAP error message DDLS173 indicates that there is a syntax issue in a CASE statement within an ABAP program or SQL query. Specifically, the error message "CASE without WHEN or THEN keyword" suggests that the CASE statement is not properly structured, as it lacks the necessary WHEN and THEN clauses that define the conditions and corresponding results.

    Cause:

    The error typically arises from one of the following issues:

    1. Incomplete CASE Statement: The CASE statement is missing the required WHEN and THEN clauses.
    2. Syntax Error: There may be a syntax error in the way the CASE statement is written, such as missing keywords or incorrect formatting.
    3. Improper Nesting: If the CASE statement is nested within another statement, it may not be properly closed or formatted.

    Solution:

    To resolve the DDLS173 error, you should:

    1. Check the Syntax: Review the CASE statement to ensure it follows the correct syntax. A typical CASE statement should look like this:

      CASE <expression>
          WHEN <value1> THEN <result1>
          WHEN <value2> THEN <result2>
          ...
          ELSE <default_result>
      ENDCASE.

      Or, for a simple CASE statement:

      CASE
          WHEN <condition1> THEN <result1>
          WHEN <condition2> THEN <result2>
          ...
          ELSE <default_result>
      ENDCASE.
    2. Add Missing Keywords: If you find that the WHEN or THEN keywords are missing, add them to the statement as needed.

    3. Test the Query: After making the necessary corrections, test the query or program to ensure that it executes without errors.

    4. Review Documentation: If you are unsure about the syntax, refer to the SAP documentation or ABAP programming guidelines for more information on using CASE statements.

    Related Information:

    • ABAP Documentation: The official SAP documentation provides detailed information on the syntax and usage of CASE statements in ABAP.
    • Debugging Tools: Use the ABAP debugger to step through the code and identify where the error occurs.
    • Community Forums: SAP Community and other forums can be helpful for finding similar issues and solutions shared by other developers.

    By following these steps, you should be able to resolve the DDLS173 error and ensure that your CASE statement is correctly implemented.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


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