Get Example source ABAP code based on a different SAP table

Standard SAP Help for HIDE


Short Reference

• HIDE ABAP Statement

ABAP SyntaxHIDE dobj.

What does it do? This statement stores the content of a variable dobj together with the current list line whose line number is contained in sy-linno in the hide area of the current list level. The data type of the variable dobj must be flat and no field symbols or components of Boxed Components can be specified that point to rows of internal tables, and no class attributes can be specified. The saved values can be read as followed: Any user action on a displayed screen list that causes a list event assigns all values saved using HIDE to the relevant variables.
If a list row of a list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row saved using HIDE are assigned to the relevant variables.

Latest notes:
The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored (that is, rows in which the list cursor was positioned using statements like SKIP ).
The HIDE statement should be executed directly in the statement that has set the list cursor in the row.
Using the HIDE statement on a field symbol can cause runtime errors. The syntax check displays a warning.

Example ABAP Coding
Saving square numbers and cubic numbers for a list of
numbers. The example shows that any variable can be stored independently of the row content. In the real world, one would more likely save only the number and execute the calculation, when required, in the the event block for AT LINE-SELECTION. REPORT ...

DATA: square TYPE i,
cube TYPE i.

square = sy-index ** 2.
cube = sy-index ** 3.
WRITE / sy-index.
HIDE: square, cube.

WRITE: square, cube.

Runtime Exceptions
Non-catchable Exceptions
Reason for error:
The field is too long for HIDE.
Runtime error:
Reason for error:
HIDE in a table row or a component in a table row is not possible.
Runtime error:
Reason for error:
HIDE in a local field is not possible.
Runtime error:
Reason for error:
HIDE is not possible on an empty page.
Runtime error:
Reason for error:
Ɯberlauf des internen Hide-Index
Runtime error:
Reason for error:
Illegal field
Runtime error:
Reason for error:
Permitted number of HIDE statements per list row exceeded
Runtime error:

Return to menu