ABAP CDS - Syntax
The syntax of the DDL and of the DCL of the ABAP CDS comprises elements of the general DDL and DCL of SQL. In addition, the syntax allows you to define annotations and associations. The syntax and semantics basically match the general CDS concept.
- General Syntax Rules
- Language Elements
- Annotations
ABAP CDS - General Syntax Rules
The general syntax rules for the DDL and the DCL in ABAP CDS are:
The general syntax rules for the DDL and the DCL in ABAP CDS are:
- Keywords
- Keywords must be all uppercase, all lowercase, or in lowercase with an uppercase initial letter. Mixed uppercase and lowercase is not allowed.
- Names
- Names are not case-sensitive.
- A name can have a maximum of 30 characters.
- A name can consist of letters, numbers, underscores (_), and slashes (/).
- A name must start with a letter or a forward slash character.
- The separator for names with multiple parts is a period (.). Names with multiple parts can be paths, columns with a prefixed data source, and annotations.
- The following CDS keywords cannot be used in names: ALL, AND, AS, ASSOCIATION, AVG, CASE, CAST, COUNT, DISTINCT, EXISTS, EXTEND, FROM, FULL, GROUP, HAVING, INNER, JOIN, KEY, LEFT, MAX, MIN, NOT, NULL, ON, OR, ORDER, RIGHT, SELECT, SUM, UNION, VIEW, WHEN, WHERE
- Literals
- Numeric literals must always be specified in full and a decimal point (.) used as a decimal separator if necessary.
- Character literals are enclosed in single quotation marks (').
- Comments
- Two forward slashes (//) introduce a comment, which continues until the end of the line.
- Comments within lines or that span multiple lines are enclosed by the characters /* and */.
- Separators
- Statements can be closed using a semicolon (;). This is optional.
- Protected Words
- Certain keywords are protected and cannot be used as self-defined names.
- SELECT, select, and Select are valid ways are specifying a keyword. seLect and SeLect, on On the other hand, produce syntax errors.
- MY VIEW, my view, and myView all identify the same operand.
- 0.5 is a valid numeric literal, but .5 is not.
********************************ROHINI KUMAR*********************************
Please support my work : sap.rohini988@gmail.com LinkedIn Link : https://www.linkedin.com/in/rohini-kumar-14647a13a/
********************************************************************************
Comments
Post a Comment