Skip to Content

Formatting CDS Source Code to Improve Readability

You might know the formatter (a.k.a. pretty printer) in the core development scenario. It aligns the source code in accordance to predefined rules. Consequently, it adds/removes, for example, tab stops, line breaks, spaces and improves readability.

As of SAP NetWeaver AS for ABAP 7.51 innovation package SP00, you can also use the formatter for CDS entities. Open your CDS entity and choose Source Code > Format from the context menu.

Formatting is then performed directly in the editor.

Predefined Profiles

SAP provides you a predefined default configuration. But, you can also define your own formatting behavior for specific use cases. You can even share this profile with your team by exporting or importing it from them. Not bad!

You configure the DDL Formatter using a profile for each ABAP project in the Preferences. Open the ABAP Development > Editors > DDL Formatter Preferences page.

Here you find SAP’s standard profile. To create your own choose New or Edit to adapt the default profile.

The Profile dialog is then opened. From here you can open several tabs to define specific formatting behavior.

An integrated preview helps you to check the outcome of your configuration when typing.

For more information, look here Formatting DDL

You must be Logged on to comment or reply to a post.
  • Hello,

    Very good blog 🙂

    I try to do what you explained but I have an error :

    DDL formatter is not available in project ‘blablabla

    What do you think ?




    • Hi Joseph,

      I am sorry for my late response.

      On which SAP NetWeaver release is your S01 system based?

      Formatting is supported as of SAP NetWeaver AS for ABAP 7.51 innovation package SP00

      Kind regards,


  • Hello Wolfgang,

    DDL Formatting is a great feature for CDS Views. Thanks for this blog.

    We are on the NetWeaver ABAP release 7.50 SP07 (SAPK-75007INSAPABA) and it says DDL formatter is not supported. Do we require BW 7.51 for the formatting to work or is there an equivalent 7.50 Patch or note that we can apply to get this working? Any help is greatly appreciated.




  • Hi Sundeep,

    thank you for your kind feedback.

    Formatting is supported as of SAP NetWeaver AS for ABAP 7.51 innovation package SP00

    So, NW7.50 SP07 does not yet support CDS formatting. I think the issue does not relate with BW 7.51.

    Kind regards,