Procedure documentationAdding Custom Fields

 

You can use the Application Enhancement Tool to add custom fields to an object. You can choose the expert mode to adapt some of the technical settings, for example package, data element, and technical field names.

Prerequisites

You have enabled the configuration mode in the general settings on the central personalization page of SAP CRM.

Procedure

Creating a New Field
  1. Start SAP CRM and select the application that you want to enhance.

  2. Start the view configuration in the application.

  3. Click Show Enhancements to display or create a new field.

    Note Note

    You can click Create New Field if you want to directly create a new field. In this case, you do not need to click New in the Custom Fields block. However, you cannot enable or disable the expert mode.

    End of the note.
  4. Select an enhanced object, if several enhanced objects are available.

  5. Enable or disable the expert mode.

  6. Click New in the Custom Fields block to add a new field.

Selecting an Object Part
  1. Select a valid package. The namespace is automatically derived from the package name.

    Note Note

    You can select a package only if you have enabled the expert mode beforehand.

    End of the note.
  2. Select an object part in which the new field will be available, for example, header, item, and so on.

Entering the Details of the New Field

You enter the details of the new field in the Field Details dialog box. Once you have created a new field in the Custom Fields block, the enhancement ID is automatically generated.

  1. Enter the new field name in the Field Label field.

  2. In the Search-Relevant field, specify whether the new field is to be used in the search.

    If the field is relevant for the search, it is available in the search criteria and the result list.

  3. In the Data Type field, select one of the following data types: decimal number, numerical, date, time, indicator, currency, quantity, text with capital letters, text with small and capital letters, or hyperlink.

    • If you have selected Currency or Quantity as the data type, an additional reference field for the currency or quantity unit is created, to which the related check table is assigned.

    • If you have selected Hyperlink as the data type, a hyperlink is added to the field enhancement. This hyperlink can contain a maximum of 60 characters. A field enhancement of this data type is displayed as a hyperlink in display mode, and as normal text in edit mode.

    • If the user defines a custom field with his or her own data element, the data type is derived from the data element. The Application Enhancement Tool tries to match the derived data type with the data types provided by the tool. If the tool does not find any match, the data type Manual is selected.

  4. Enter the field length in characters.

    Field type

    Field length (characters)

    Uppercase / lowercase text

    Maximum: 60

    Currency

    Maximum: 31

    Fixed number of decimals: 2

    Quantity

    Decimal number

    Maximum: 31

    Maximum number of decimals: 10

    Numerical

    Maximum: 32

    Date

    Fixed length: 8

    Time

    Fixed length: 6

    Indicator

    Fixed length: 1

  5. Enter the decimals, if you have selected decimal number as the data type.

Note Note

If you have enabled the expert mode beforehand, you can change the field ID and the reference field ID. You can enter your own data element. The field data type depends on the selected data element.

End of the note.
Assigning Input Help to New Fields

You can assign input help to a new field. This input help is automatically available at runtime. You can assign dropdown list boxes to the new field. Click Create to create a new dropdown list box and maintain the values. You can create dropdown list boxes for the following data types: Numerical, text with capital letters, and text with small and capital letters.

Alternatively, you can assign check tables or search helps to new fields. Enter the technical name of the check table or search help.

Recommendation Recommendation

The specified field length only affects the length of the value code for a dropdown list box, not the length of the value description — this is displayed on the UI, and has a maximum length of 60 characters. It is recommended to keep the length of the field as short as possible, to prevent an overload of the database tables. This is also recommended for check tables.

End of the recommendation.

Note Note

A combination of dropdown list box, check table, and search help is not allowed in the same field.

End of the note.
Making the New Field Available for Other Systems

For some applications, it might be necessary to make the new field available for other systems. You can make the new field available for the following systems or applications:

  • Business Intelligence (BI) reporting

  • CRM interactive reporting (as characteristic or key figure)

  • R/3 Adapter

  • CRM Mobile (Synchronized BDocs)

    For CRM Mobile, the enhancement has to use the Z namespace.

Using the Generation Indicator

The Generate checkbox indicates that you want to generate a custom field. The checkbox is available in the detailed view, and can be personalized in the Custom Fields block. This checkbox is selected by default for new and changed custom fields. If you want to exclude a field from generation, you need to deselect the checkbox.

Saving and Generating the Field

After you have entered the details of your new field, return to the view configuration by clicking Back. In the view configuration, you can save and generate your data by clicking Save and Generate.

You need to choose a transport request, if you have defined a transport package in Customizing for Customer Relationship Management under Start of the navigation path UI Framework Next navigation step UI Framework Definition Next navigation step Application Enhancement Tool Next navigation step Define System Settings End of the navigation path. If you are working with a local package, a transport request is not necessary.

After every generation, a system message informs you that you need to restart SAP CRM by clicking Restart. The restart is automatically performed in the following situations if you have started the Application Enhancement Tool from the UI Configuration Tool:

  • When you close the view configuration dialog box

  • When you navigate to another application via the navigation bar, before you have restarted SAP CRM

Note Note

If SAP CRM is not automatically restarted, you need to log off and log on again before you start the application and the UI configuration, to make the new field available on the user interface.

End of the note.
Making the New Field Available on the User Interface

After SAP CRM has been restarted, select the application and start the view configuration of the application to make the new field available on the user interface.

Note Note

Custom fields that you have added to a business object might also appear in the Available Fields list of a view configuration that is associated with another enhanced business object, if these business objects have the same enhancement place. However, at runtime only the fields created for the rendered enhancement object will be displayed. If you want to display these fields at runtime, you can add them as reusable fields.

End of the note.

Example

You are logged on to the system as a sales professional and you want to enhance the sales order. You are in the overview page of the sales order and you have started the view configuration of the sales order details. You have started the Application Enhancement Tool in the view configuration of the sales order.