Decide whether the loop should copy or change the row
LOOP AT ... INTO gives a work area for processing the current row. When the goal is to update the row in the table itself, ASSIGNING binds a field symbol to the current line so assignments affect that line.
Mutate only the intended rows
LOOP AT dispatches ASSIGNING FIELD-SYMBOL(<dispatch>).
IF <dispatch>-status = 'LATE'.
<dispatch>-status = 'REVIEW'.
ENDIF.
ENDLOOP.
Use ASSIGNING only when in-place mutation is intentional. A LOOP AT ... INTO copy can be clearer for read-only processing; INTO followed by MODIFY can make the update point explicit. Avoid changing fields that are part of a sorted or hashed key, because key integrity constrains how those rows can be updated.
Be cautious when deleting or inserting rows during a loop; use syntax designed for that operation and understand its iteration behavior. The browser exercise checks for code structure but cannot validate the resulting table.
Sources
Developer practice · ABAP
Practice: mark overdue dispatches for review
Loop over dispatches with ASSIGNING, change each LATE status to REVIEW, and store the row count in result.
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
Write your solution, then check its structure.
One possible solution
TYPES: BEGIN OF ty_dispatch,
dispatch_id TYPE string,
status TYPE string,
END OF ty_dispatch.
TYPES ty_dispatches TYPE STANDARD TABLE OF ty_dispatch WITH EMPTY KEY.
DATA(dispatches) = VALUE ty_dispatches( ( dispatch_id = 'D-1301' status = 'LATE' ) ( dispatch_id = 'D-1302' status = 'READY' ) ).
LOOP AT dispatches ASSIGNING FIELD-SYMBOL(<dispatch>).
IF <dispatch>-status = 'LATE'.
<dispatch>-status = 'REVIEW'.
ENDIF.
ENDLOOP.
DATA(result) = lines( dispatches ).
WRITE result.out->write( result ).These are context-specific output examples. In your own program, use the result variable from your solution and the output mechanism available in that program.