SAP ABAP Data Dictionary Interview Questions: Domains, Data Elements, Search Helps and Lock Objects

SAP ABAP INTERVIEW SERIES • PART 3

Data Dictionary Interview Questions

Domains, data elements, tables, structures, search helps, lock objects and real project scenarios.

Interview strategy: explain each object in this order: purpose, technical definition, where it is reused, and one practical example. This turns a memorized answer into a project-ready answer.

Quick visual: how DDIC objects connect

Domain
Technical type + value range
Data Element
Business meaning + labels
Table Field
Persistent column definition
Search Help
Reusable F4 value help

Core interview questions with answers

1. What is the ABAP Dictionary?

The ABAP Dictionary is the central repository for globally reusable data definitions. It manages DDIC types such as data elements, structures and table types, plus database-related objects such as transparent tables, views, search helps and lock objects. Runtime services and development tools consume this metadata consistently.

2. What is a domain?

A domain defines technical and semantic properties that can be inherited by data elements: built-in type, length, decimal places, conversion routine and optional fixed values or value table. A domain can be reused by many data elements. A domain itself is not used directly after TYPE in ABAP.

3. What is a data element?

A data element gives an elementary field its business meaning. It provides field labels, documentation and optional search-help assignment, and commonly refers to a domain for technical properties.

4. Domain versus data element?

Domain = technical value space. Data element = semantic meaning. For example, one customer-number domain can support different data elements that describe sold-to party, payer or ship-to party while retaining compatible technical properties.

5. What are domain fixed values and a value table?

Fixed values restrict or document allowed single values/ranges and can support input help. A value table proposes the table used when creating a foreign key; it is not automatically a runtime validation by itself.

6. What is a transparent table?

A transparent table has a database representation corresponding to its Dictionary definition. Its key, fields, technical settings and delivery behavior must match the business persistence requirement.

7. Structure versus transparent table?

A structure groups components for typing and interfaces but does not persist records. A transparent table represents persisted database data.

8. What is a table type?

A DDIC table type globally defines an internal table, including line type, table category and key. Use it when the same interface type is shared across programs, classes or function modules.

9. What is a foreign key in DDIC?

It defines a semantic relationship between a check table and foreign-key fields. The cardinality documents the relationship and the definition can support validation, input help and framework behavior.

10. What is a search help?

A search help provides reusable F4 input help. An elementary search help defines one selection method and parameters. A collective search help combines several elementary search paths.

11. How is a search help attached?

It can be assigned to a data element or field, or derived from related Dictionary metadata. For special cases, search-help exits can influence selection and display behavior, but standard declarative behavior should be preferred.

12. What is a lock object?

A lock object models a logical SAP lock across one primary table and optional related secondary tables. Activation generates enqueue/dequeue function modules used to request and release logical locks.

CODE SCREEN • LOGICAL LOCK
CALL FUNCTION 'ENQUEUE_EZORDER'
  EXPORTING
    order_id = lv_order_id
  EXCEPTIONS
    foreign_lock = 1
    system_failure = 2.

IF sy-subrc = 0.
  "Read, validate and update protected business data
  CALL FUNCTION 'DEQUEUE_EZORDER'
    EXPORTING order_id = lv_order_id.
ENDIF.

13. What lock modes should you know?

Interviewers commonly expect awareness of shared, exclusive and exclusive-but-not-cumulative modes. Explain that the correct mode depends on whether parallel readers or repeated locks from the same owner must be permitted.

14. Database lock versus SAP logical lock?

A database lock is tied to a database transaction and physical records. The SAP enqueue service coordinates logical business locks across application servers and can cover a business object spanning multiple tables.

15. What happens when a domain changes?

Dependent objects can be affected. Analyse the where-used list, activate in a controlled order, review conversion implications, transport dependencies and test consumers. A length or type change may require database adjustment and regression testing.

Scenario questions

Scenario A: One code field, different meanings

You need technically compatible fields for sales status and approval status, but each needs different labels and documentation. Reuse a suitable domain only if the value space is genuinely shared; create separate data elements for the different meanings.

Scenario B: F4 help needs active customers only

Use a search help with an appropriate selection method and parameters. Put stable filtering in the selection model where possible; use a search-help exit only when the requirement cannot be expressed declaratively.

Scenario C: Header and items must be edited together

Create a lock object with the header as primary table and related item table where the foreign-key relationship supports it. Lock using the business key before the update and handle FOREIGN_LOCK explicitly.

Common interview mistakes

  1. Saying a value table automatically validates every field.
  2. Calling a structure a database table.
  3. Confusing a domain's technical definition with a data element's business meaning.
  4. Using database locks and SAP lock objects as synonyms.
  5. Changing a reused domain without impact analysis.

Hands-on exercise

Design DDIC objects for a training booking application: booking ID, employee ID, course code, status and booking date. Define the domains and data elements, propose foreign keys, create an F4 help for courses and describe a lock object that protects one booking during update.

Rapid revision checklist

  • Domain: type, length, value range and conversion routine.
  • Data element: meaning, labels, documentation and search help.
  • Structure: reusable shape; no persistence.
  • Table type: globally reusable internal-table definition.
  • Search help: elementary or collective reusable F4 help.
  • Lock object: logical business lock with generated enqueue/dequeue modules.

Official SAP references

Previous: Part 2 — Internal Tables Interview Questions
Next: Part 4 — Open SQL and Performance Interview Questions

Post a Comment

0 Comments