!--a11y-->
Purpose
Generates a message when an HTML field value is in error.
Syntax
assert(<field name>.name)
Description
You use the
assert function to generate field-specific error messages in an HTML page.If the field contents in an R/3 transaction are invalid, the screen field generates an error. R/3 uses the cursor position to determine the field responsible for the error. On the ITS side, a standard error message is placed in the system field
~ MessageLine .If you use the
assert function for a field in an HTML template and that field generates an error in R/3, the ITS replaces your assert statement with the standard error message. With the assert function, you can display a message (or graphic) next to a field whenever it contains invalid data.Normally, the ITS replaces the
assert with the value of the ~ErrorMarker parameter from the global service file global.srvc .Example
<form …>
…
Material no <input type="text" name="matnr">`assert(matnr.name)`
Quantity <input type="text"
name="quantity">`assert(quantity.name)`
<p>`~MessageLine`</p>
</form>

Since only a simple replacement occurs, HTMLBusiness statements in this parameter are not analyzed.
