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: 

why we are using Hide statment in the loop ?

Former Member
3 REPLIES 3

Former Member
0 Kudos

Hi

Hide

To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement. At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there. After processing the secondary list, clear the work area again. This prevents the user from trying to create further secondary lists from the secondary list displayed.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

Hi,

Hide stores the click value and display the related record in the secondary list.

Say HIDE f

Stores the contents of f in relation to the current output line in the HIDE area not necessary for f to appear on current line

place the HIDE statement immediately after the output statement for f

User selection of a line for which HIDE fields are available fills the variables in the program with the values stored.

The selection can occur in:

1.AT LINE-SELECTION

2.AT PFx

3.AT USER-COMMAND

4.READ LINE

The contents of the field do not have to have been displayed using WRITE in order for you to retain them.

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

Useful system fields for interactive reporting are listed in the System Fields for Lists documentation.

Note

Lines or components of lines of an internal table that you address using a field symbol (see ASSIGNING addition to the READ and LOOP statements), cannot be retained using HIDE. You can store them using a global variable instead.

Reward points if useful.

Thanks,

Sandeep.

Former Member
0 Kudos

hi,

<b>HIDE</b>

The HIDE statement is one of the fundamental statements for interactive reporting. You use the HIDE technique when creating a basic list. It defines the information that can be passed to subsequent detail lists.

HIDE <f>.

This statement places the contents of the variable <f> for the current output line (system field SY-LINNO) into the HIDE area. The variable <f> must not necessarily appear on the current line.

To make your program more readable, always place the HIDE statement directly after the output statement for the variable <f> or after the last output statement for the current line.

As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored. A line can be selected

by an interactive event.

For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.

by the READ LINE statement.

You can think of the HIDE area as a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table.

The example below presents some of the essential features of interactive reporting. The basic list contains summarized information. By means of the HIDE technique, each detail list contains more details.

if you are not keeping  hide statement inside the LOOP it is not working properly, because it stores the data inside in the system genarated table. we can process the table data by using LOOP.......ENDLOOP statement only.

regards,

Ashok reddy