A dispatch update is a useful first program
Imagine the warehouse team needs a short message after a parcel is packed. Start with one value and display it. This small example helps separate two ideas: the work your program does and the way your program displays the result.
1. Give the message a value
DATA(result) = 'Parcel packed and ready to dispatch'.
DATA(result) declares a variable and assigns its initial value in one statement. The text between single quotes is a character literal. The variable is called result here so we can talk about the result without tying the idea to a specific business field.
2. Choose output for the program context
In a classic executable report, WRITE produces list output:
WRITE result.
For an ABAP Cloud console example, the out reference supplied to if_oo_adt_classrun~main can write to the ADT console:
out->write( result ).
These are not interchangeable statements you can paste into every program. WRITE belongs to classic report-style output; the Cloud example depends on the class-run method and its provided output reference. Select your environment above to see the matching snippet.
3. Practice the small change
Change the message to describe a parcel that is packed. Add the selected environment’s output statement. The checker looks for the assignment and output pattern; it does not compile or run ABAP.
Remember
Keep program logic separate from display. If a value is calculated correctly but sent to the wrong output context, the program may not activate or show what you expect.
Version note: ABAP syntax and allowed APIs depend on the ABAP release and language version. This is an independently authored learning example, not official SAP training.
Sources
- SAP Samples, ABAP Cheat Sheets overview and language-version notes
- SAP Samples, ABAP for Cloud Development (
out->writeinif_oo_adt_classrun~main) - SAP Help Portal, ABAP Keyword Documentation
Developer practice · ABAP
Practice: change the dispatch message
A parcel is packed and ready to leave. Assign a short message to result, then add the output statement for the environment you selected.
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
DATA(result) = 'Parcel packed and ready to dispatch'.
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.