Show TOC

Background documentationNaming Conventions for BRFplus

 

The names of the objects that you create and work with in BRFplus are used in the sense of technical names. As opposed to the Text and Short Text properties of an object, the Name property is always language-independent. Referring to an object by its name is therefore a good practice for global companies where employees with different mother languages have to communicate. Here, the language-independent name can help to overcome misunderstandings.

The following naming conventions apply for BRFplus objects:

  • The name of an application must be unique within the scope of a system.

    Note Note

    If the system in question is set up as a customer system, it is sufficient for an application name to be unique within the scope of the system client.

    End of the note.
  • The name of a function must be unique within the scope of an application.

  • A valid name can contain any character from the following set of characters: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_/"

  • BRFplus does not differentiate between lower and upper case. All object names are automatically converted to upper case.

  • Blank characters or hyphens are not allowed in object names. BRFplus automatically replaces blanks and hyphens (“ “, “-”) with underscores (“_”).

  • The first character must be a letter or a slash (but not a number). Slashes are allowed only for the purpose of assigning an object to a namespace. For more information, see section Using Prefix Namespaces below.

  • BRFplus objects created by customers have to start with one of the reserved letters Y or Z as it is common practice for customer objects in the ABAP Dictionary.

  • The name TABLE_LINE is not permitted for all kinds of BRFplus objects as it is a reserved word.

Note Note

You can also create unnamed objects in BRFplus. However, this is possible only for objects that depend on another object (for example, a new data object that you create as an expression's result data object). Unnamed objects cannot be reused.

As an exception to the rules listed above, the name of a node in a catalog can be defined freely. For these non-technical elements, there is no check against the set of allowed characters mentioned above.

End of the note.
Using Prefix Namespaces

BRFplus supports an informal approach to use object names qualified by namespaces. Informal means that in BRFplus, a namespace is not a distinct element type of its own. Rather, it is just a prefix preceding the name of the object itself, thereby assigning that object to the given namespace. Although this is a very simple concept, you can still take advantage of it by using it for grouping objects semantically, thereby reducing complexity in case of large projects.

If an object name starts with a slash, the system interprets this as the beginning of a namespace designation. This leads to additional requirements for formal correctness of the object name:

  • The first character of the name must be a slash (indicating that a namespace is being used).

  • There must be at least one more slash as part of the name string (indicating the end either of the namespace or of a particular level in case of a multi-level namespace).

  • An empty string is not allowed as a namespace ("//").

  • The last slash in the object name must be followed by at least one more character (indicating the name of the object itself, without the namespace).

Note Note

Using prefix namespaces can be restricted depending on your system settings. If you encounter problems when trying to use prefix namespaces, see SAP note 150451.

End of the note.

Example Example

Here are some examples of valid and invalid object names:

Valid and Invalid Object Names

Name

Valid

Comment

MY_OBJECT

yes

ZMY_OBJECT_1

yes

Object name in customer namespace Z.

1_MY_OBJECT

no

Name must not start with a number.

/APP/MY_OBJECT

yes

APP/MY/OBJECT

no

If namespaces are used, the first character must be a slash.

/APP/MY/OBJECT

yes

/APP_MY_OBJECT

no

If namespaces are used, at least two slashes are required.

/APP/FINANCIALS/COSTING/MY_OBJECT

yes

A valid three-level namespace.

End of the example.
Renaming Objects

You define an object's name during the creation of that object. Due to the technical character of the Name property, it is good practice to keep this name. Adhering to this principle may save you many problems that may be hard to track. In the BRFplus workbench, keeping an object's name is supported by displaying the name always in read-only mode.

However, it is still possible to change a name because BRFplus identifies its objects by their ID, not by name. Changing the technical name of an object is therefore uncritical within the scope of BRFplus. However, it is possible that an object is directly referenced by name from an ABAP backend program calling the BRFplus framework. It is up to you to ensure that all external name-based references to BRFplus objects are kept in sync with the changes made inside BRFplus.

If you still decide that an object's name must be changed, the system offers the following ways to accomplish this:

  • Renaming an individual object

    To rename an individual BRFplus object, make sure the administrative data of that object is displayed in the workbench's General section. On the General tab, click Rename to open a dialog where you can redefine the object name.

  • Renaming multiple objects

    To rename multiple objects, start the Mass Change tool. Select the objects to be renamed and click Rename. In the dialog that appears, define the prefix or suffix to be added to the existing names.