Start a query with the answer you actually need

An operations report needs each shipment’s identifier and status—not every address, note, or audit field. An explicit projection tells the database and the next developer which columns the task depends on.

Statement 1: choose the source

SELECT FROM zi_dispatch_order

FROM names the project-owned CDS read entity used by this fictional example. In a real system, confirm the source is accessible in your ABAP language version; ABAP Cloud requires released SAP APIs or your own eligible objects.

Statement 2: name fields

FIELDS dispatchorder, status

Select only needed fields. SELECT * is sometimes convenient for exploration, but it couples a program to the full source shape and can transfer unnecessary data. Prefer an explicit list for application queries.

Statement 3: choose the target

INTO TABLE @DATA(orders).

The @ escape marks an ABAP host object in modern ABAP SQL. INTO TABLE collects the matching rows into an internal table.

Practice, statement by statement

Complete the three pieces in order: source, field list, then table target. Add a row count in result. The structural checker checks these fragments; it does not submit a query to SAP.

Sources

Version note: Modern SELECT FROM ... FIELDS ... style and inline declarations are not available in every older ABAP release. Check your syntax version.

Developer practice · ABAP

Practice: write SELECT FROM and FIELDS

Fetch only DispatchOrder and Status from the project-owned read entity into an internal table.

Choose your ABAP environment

This choice changes the output pattern checked here: WRITE belongs in a classic executable report, while out->write( ) uses the supplied output reference in an ABAP Cloud class-run method. It does not switch the language version of the other code; check release and API availability in your target system.

Complete the task and include the output statement shown for your selected environment. Variable names can differ if you use them consistently. This browser checker checks structure only; it does not compile or run ABAP.

0 required structures detected · 0 checks