Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide statement in Interactive ALV

Former Member
0 Kudos

Hi ,

Can you please tell me whether we can use 'HIDE' statement in interactive ALV other than 'selfield'. And if we can use , please tell me how to use it.

5 REPLIES 5

abdulazeez12
Active Contributor
0 Kudos

HIDE dobj.

Effect

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 variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:

For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.

If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.

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 immediately at the statement that has set the list cursor in the row.

Outside of classes, prior to release 7.0, for dobj constants and literals could still be specified. However, it was not possible to read them at list events and in the READ LINE statement.

Example

Storing square numbers and cubic numbers for a list of numbers. The example shows that arbitrary variables can be stored independently of row content. In the real situation, one would more likely store 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.

START-OF-SELECTION.

FORMAT HOTSPOT.

DO 10 TIMES.

square = sy-index ** 2.

cube = sy-index ** 3.

WRITE / sy-index.

HIDE: square, cube.

ENDDO.

AT LINE-SELECTION.

WRITE: square, cube.

HIDE f.

The contents of f related to the current output line are stored. If this line is selected, f is filled automatically with the stored value.

The selection can be made using:

AT LINE-SELECTION

AT PFx

AT USER-COMMAND

READ LINE

You do not have to output the field with WRITE in order to be able to store its value.

The HIDE statement does not support structures that contain tables (deep structures).

System fields that are particularly useful in interactive reporting are listed in the system fields for lists documentation.

You cannot save lines or components of lines of an internal table that is addressed using a field symbol to the HIDE area. (Compare the ASSIGNING addition to the READ and LOOP statements). Assign the contents of the line or component to a global variable and save this instead.

You can only write variables to the HIDEarea.

In ABAP Objects, the following statements acause an error message:

CONSTANTS f.

HIDE: '...', f.

Correct syntax:

DATA: f1, f2.

HIDE: f1, f2.

Cause:

Interactive list events cause the fields hidden by the HIDE command to be overwritten with values in the HIDE area, which means that they must be changeable.n.

Reward points

Shakir

Former Member
0 Kudos

hi,

no u cant... but why u want HIDE functionality in ALV...

Former Member
0 Kudos

Hi,

No it is not possible.

Are you looking for interactive reports.

Please refer to the link below :

http://www.sapdev.co.uk/reporting/alv/alvgrid_ucomm.htm

Thanks,

Sriram Ponna.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Ahmed

The HIDE statement on old-fashioned WRITE lists simply means to have data available that are not visible to the user.

The corresponding concept on ALV lists are hidden columns.

Simply set for "hidden" columns in the fieldcatalog: LVC_S_FCAT-TECH = 'X' ( a corresponding field should be available in SLIS-based fieldcatalog).

A "technical" column is neither displayed nor visible in the layout of the ALV list.

Regards,

Uwe

Former Member
0 Kudos

This message was moderated.