Skip to Content
Author's profile photo Andreas Eissmann

Part 1: Programming Languages of SAP Business ByDesign Studio

This article provides some information about the programming languages of SAP Business ByDesign.

Let`s start…

There are three different programming languages for SAP Business ByDesign

  • ABSL (Advanced Business Script Language)
  • BODL (Business Object Description Language)
  • SAPRuby


BODL is used to describe/define business objects (BO, e.g. ServiceOrder, Employee, Customer etc.), which is typically the first step in the development process. The object-oriented language is syntactically similar to C# or other high-level programming languages. Here is a BODL code snippet:

The first two lines show two import statements, just like in any other programming language.

Below, the actual definition of the business object (“FirstBusinessObject”) starts. Within that definition, you have to declare a special element (attribute) denoted “AlternativeKey”. This key has to be unique for all instances of the business object.

Subsequently, you can define any attributes with different data types. BODL does not make available the popular data types known from other programming languages, such as string or integer. Instead SAP only permits so-called “Global Data Types” (GDT).

Below, I have listed  the most important GDTs:

  • UUID – SAP internal unique ID (all business objects are assigned an element of this type automatically)
  • Identifier – mostly used to define an AlternativeKey of a business object
  • LANGUAGEINDEPENDENT_SHORT_Name, LANGUAGEINDEPENDENT_MEDIUM_Name LANGUAGEINDEPENDENT_LONG_Name, LANGUAGEINDEPENDENT_EXTENDED_Name – the “string” data type of BODL (Short – 10 characters, medium – 40 characters, long – 80 characters, extended – 255 characters)

Attention: The length of data types is important when storing the BO to the database, because the maximum size of one BO node (Root or a sub node) must not exceed 4030. You have to make sure that no user can enter any string in an element of data type LANGUAGEINDEPENDENT_* which is longer than declared – otherwise you will run into trouble when saving the BO.

A full list of all available GDTs can be found in the in the SAP Business ByDesign Business Center Wiki. An exhaustive list of all GDTs would go beyond the scope of this article…The current GDT catalogue is 14352-page PDF document…but I can calm you down…you will not need all of these types, I promise J

More options for BO definition…

AS I had described in aSAP Business ByDesign Studio – Short Overview, BODL does not know the concept of inheritance, but it provides an alternative… so-called associations- With associations, you can embed existing business objects or simply pieces of business objects into your business objects. At design time you need to decide whether you want to create a 0:1, 1:1, or 1:n association. You can also decide which target element you want to use for the association (UUID, ID , …). By default, BODL uses the UUID of the target business object, so there is no need to define it. But it can be helpful for object value selectors (OVS) in the UI-Designer – more about those in a future article.

In BODL you can also define sub nodes of a BO. The sub nodes can be defined either as a data structure (0..1 or 1..1) or as a list (0..n, 1..n), similar to associations. Within a sub node, you have to define an AlternativeKey just like for a root node. This key must be unique for all instances of your business object (not only the sub node instances in the current business object instance). As a result, you should always set a complex ID for your sub node at runtime (e.g., BO_ID + Node_ID). At design time, there is no possibility to define a complex “AlternativeKey” as you might expect from database setup, e.g., primary + foreign key.

Last but not least you can define actions. Actions are methods of a business object. You can write ABSL code for all of these. Currently, actions cannot have parameters and there are no static methods are available. But, judging from my experiences with the progress of the SAP Business ByDesign development infrastructure, it won`t be long until SAP will implement this feature for the ByDesign Studio.

After you have saved your business object (business object will be compiled to ABAP), you can activate it. Business object tables will be created automatically in the database. Subsequently, you can create script files for your ABSL coding.

The script file creation dialog also provides an option to create scripts for events like “AfterModify” and “BeforeSave” of a BO node. The “AfterModify” event is thrown before and after an action is executed (including the Create method of a BO). The “BeforeSave” event is only thrown when saving the business object/node.


Stay tuned for part 2…

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.