Skip to Content
Author's profile photo Snezhina Velcheva

Source Code-Based Class Builder

What does this tool do?

The source code-based Class Builder is used to edit the complete source of global classes without navigating to different forms and section editors. The new editor is integrated in the ABAP Workbench and is available as an additional mode of the Class Builder as of SAP NetWeaver 7.0 Enhancement Package 2.

What features does if offer?

The main features offered by the source code-based mode of the Class Builder are:

  • Possibility to display, edit and save the complete code of a global class including its public, protected and private section as well as its method implementations in a single editor.
  • On demand locking – you can edit only specific sections or methods of the complete source code.
  • Internal navigation – the keyboard combination Ctrl+F5 helps you navigate to the components of a class or an interface. In the dialog window you can see a list of all public, private and protected components.
    F5
  • Filtering components – Inside the Class/Interface Navigator, you can use filters. For each component, there is information whether it is redefined or inherited.
    Filtering Components
  • Navigation via the Object Navigator tree – you can navigate to a component in the source code by selecting it from the Object Navigator tree.
    SE80
  • Editing of interfaces – the new editor displays the complete source of the interface.
  • Workbench settings – you can explicitly switch on or off the new editor and you can always revert to the classic editor by means of the toggle button.

How to set it up?

In the Object Navigator choose, Utilities -> Settings -> Class Builder -> Source Code-Based Class Builder.

CB Settings

Are there any constraints?

The source-code based Class Builder does not support the Modification Assistant and can be used only with regular ABAP classes and interfaces but not with exception classes, global test classes or persistence classes. Classes that have been enhanced by means of the Enhancement Framework are also not supported by the source code-based Class Builder.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Peter Inotai
      Peter Inotai
      Hi Snezhina,
      Can you provide some info when it is recommended to use?
      As being an ABAP developer I'm totally addicted to the class builder, so I don't really see the situation I would use the source code based editor. 🙁
      The only situation I can imagine is for (mainly) Java developers addicted to Eclipse have to jump into ABAP.
      Thanks,
      Peter
      Author's profile photo Snezhina Velcheva
      Snezhina Velcheva
      Blog Post Author
      Hi Peter,

      In most cases it is a matter of personal preference which editor to use.

      As you already mentioned, people coming from other development environments might find it more user friendly. Apart from that, here you have the source code in one place and you can actually copy and paste the source code of a whole class. You can also cut and paste source code between methods or look at two methods at the same time, or navigate from one method implementation to another (Ctrl+F5 is a nice feature here).

      As I said, it is a matter of preference.

      Hope it helps!

      Kind regards,

      Snezhina

      Author's profile photo Peter Inotai
      Peter Inotai
      Hi Snezhina,
      Thanks for the info.
      I guess I have to try it out, experiment with it a little bit and I'll see in which situation it's worth to use it.
      Peter
      Author's profile photo Peter Inotai
      Peter Inotai
      Hi,
      Finally I got an access to a NetWeaver 7.02 system (SP level SAPKB70202) and tried out this feature.
      I was surprised that this feature is not available for SAP standard classes in a customer system, only for customer classes.
      When I activated it in my settings, I got the message "Modification Assistant can not be used by the source-based Class Builder.
      Message no. OO_SOURCE_BASED103".
      I do understand, that Modification assistant is not supported, but I do NOT understand why it's not supported in DISPLAY mode.
      Do you have any info about this?
      Thanks,
      Peter