Give a tracking update a human-readable shape
A log entry such as PK-204 READY is compact, but a warehouse teammate may understand “Parcel PK-204 is ready” more quickly. ABAP string templates let you combine literal text and values in one expression.
Use a string template
DATA(tracking_code) = 'PK-204'.
DATA(result) = |Parcel { tracking_code } is ready|.
The vertical bars mark a template. Text outside braces is copied into the result; the expression inside { ... } is evaluated and inserted. Formatting options can control values such as dates and numbers, but use them deliberately and verify the exact option in the keyword documentation for your release.
Alternatives
String templates are compact and readable for mixed text and values. Older code may use concatenation statements or operators. Those approaches remain useful when maintaining legacy code, but a chain of concatenations can become harder to scan. Prefer the form that fits the supported language version and is easiest for the team to maintain.
Practice
Create result with the exact general shape Parcel <tracking code> is ready using the provided variable, then add the selected environment output. The checker confirms template structure only.
Version note: String-template support and formatting options depend on ABAP release/language version.
Sources
- SAP Samples, ABAP Cheat Sheets overview
- SAP Help Portal, ABAP Keyword Documentation
Developer practice · ABAP
Practice: build a readable dispatch line
Use a string template to create the requested message. Keep the tracking code variable inside braces.
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(tracking_code) = 'PK-204'.
DATA(result) = |Parcel { tracking_code } is ready|.
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.