Show TOC

Extended Support of Long Texts in the MetadataLocate this document in the navigation structure

Use

SAP Gateway provides different UI texts per property, contained in the annotations sap:label, sap:heading and sap:quickinfo. If the property is bound against an ABAP Dictionary data element, then these UI texts are read (if existing) from the underlying data element.

  • sap:label

    Intended for field labels in UIs. Its default source is the Medium (green) field label of the underlying data element.

  • sap:heading

    Usually a shorter text than the label text. This text can be used for column headings. Its source is the Heading (orange) of the underlying data element.

  • sap:quickinfo

    Usually a longer text that can be used for tooltips or as a secondary help text. Its source is the Short Description (red) of the underlying data element

Figure 1: Example

The annotations sap:heading and sap:quickinfo are only included if their text differs from the always present sap:label. Note that the annotation sap:label can be also overwritten in Service Builder by redefining services. For more information, see Redefining OData Service (GW).

Furthermore, the metadata document can include classical F1 documentation for ABAP Dictionary data elements (DE) – if this documentation exists. For this, <Documentation> elements are included in the metadata document.

By default the $metadata request retrieves only the sap:label for the property. To show additional text elements a query option needs to be added to the metadata request:

  • sap-documentation=heading,quickinfo

    Additional display of heading and quickinfo.

  • sap-documentation=all

    Additional display of heading, quickinfo and F1 documentation.

Prerequisites

The properties has to be bound against an ABAP Dictionary data element and the data element has to contain the texts.

Example

Standard $metadata:

<Property Name="PostingDate" Type="Edm.DateTime" Precision="7" 
   sap:label="Posting Date" /> 

Extended $metadata?sap-documentation=heading,quickinfo:

<Property Name="PostingDate" Type="Edm.DateTime" Precision="7" 
   sap:label="Posting Date" sap:heading="Pstng Date" sap:quickinfo="Posting Date in the Document" /> 

Extended $metadata?sap-documentation=all:

<Property Name="PostingDate" Type="Edm.DateTime" Precision="7"          sap:label="Posting Date" sap:heading="Pstng Date" sap:quickinfo="Posting Date in the Document" >
<Documentation>
<Summary>Date which is used when entering the document in Financial Accounting or Controlling.</Summary>
<LongDescription>The fiscal year and the period for which an update of the accounts specified in the document or cost elements is made, are derived from the posting date.When entering documents, the system checks whether the posting date entered is allowed by means of the posting period permitted.The posting date can differ from both the entry date (day of entry into the system) and the document date (day of creation of the original document).</LongDescription>
</Documentation>
</Property>