Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete Processing of Internal Data →  Obsolete Assignments 

CLEAR - WITH NULL

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Obsolete Syntax

CLEAR dobj WITH NULL.

Effect

This variant of the statement CLEAR, which is not allowed in ABAP Objects, replaces all bytes in dobj with the value hexadecimal 0. In this case, the data object dobj must be flat.


Note

The addition WITH NULL should only be used for byte-like data objects and should therefore be replaced by the addition CLEAR WITH val, which offers a higher degree of security in this context.

Bad example

CLEAR f WITH NULL.

Good example

CONSTANTS hex TYPE x LENGTH VALUE IS INITIAL.
CLEAR f with hex.