Adding Documentation to ABAP Code Flashcards

1
Q

What is ABAP Doc?

A

ABAP Doc is a documentation tool in ABAP programming that allows developers to add documentation comments directly into their code. These comments provide additional information about classes, interfaces, types, data elements, constants, methods, and functions, improving the readability and maintainability of the codebase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of elements can be documented using ABAP Doc?

A

ABAP Doc can be used to document various declarative statements and elements in ABAP code, including:

CLASS
INTERFACE
TYPES
DATA
CONSTANTS
METHODS
FUNCTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you add documentation using ABAP Doc?

A

ABAP Doc comments precede the elements they document and start with the characters “!. These comments provide documentation for various elements in ABAP code. Additionally, if ABAP Doc comments are placed in positions where they are not allowed, the system displays a syntax warning, and the documentation is ignored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is translation of ABAP Doc comments supported?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which subset of HTML tags does ABAP Doc support for formatting documentation?

A

These include tags such as <strong> for emphasis, <br></br> for line breaks, <h1> to <h3> for headers, <p> for paragraphs, <em> for italic text, <ul> and <ol> for unordered and ordered lists respectively.</em></strong>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does ABAP Doc handle line breaks?

A

In ABAP Doc, line breaks can be achieved using the <br></br> tag. If two lines of ABAP Doc are intended to be displayed next to each other, omitting the <br></br> tag will cause them to appear consecutively.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you quickly add ABAP Doc for a method and its signature?

A

You can add ABAP Doc for a method and its signature using a quick fix. After declaring the method, press Ctrl + 1 to open the possible quick fixes, and select “Add ABAP Doc”. ADT will then generate the corresponding documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can you document individual parameters with ABAP Doc?

A

Yes, with ABAP Doc, you can document both a method and its individual parameters. To document the method, use the regular “! comments. To document a parameter, use the notation “! @parameter <name> |" and add your comment after the pipe character.</name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can you update ABAP Doc comments when the signature of a method changes?

A

You can use quick fixes to delete ABAP Doc comments or delete parameters, and to add ABAP Doc comments for new parameters when the signature of a method changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you ensure that an ABAP Doc description is replicated in the object properties and the object list?

A

To ensure that an ABAP Doc description of an object is replicated in the object properties and the object list, use a paragraph tag <p> with the addition class=”shorttext synchronized”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you add links to other objects in ABAP Doc comments?

A

Yes, you can add links to other objects in ABAP Doc comments. Use the notation {@link <object_name>} to link to the ABAP Doc of another object.</object_name>

You can link to individual elements as follows:

DATA for constants, variables, and procedure parameters in the appropriate context
DOMA for DDIC domains
FUNC for function modules in function pools
FUGR for function pools
INTF for interfaces implemented in a class to access its components.
METH for methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What seqence of characters introduces an ABAP Doc comment?

A
“@

B
“$

C
“!

A

C
“!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly