Application Development and Automation 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: 
Read only

Hide Statement in Reports

Former Member
0 Likes
2,173

Hello all,

How many records does a Hide statement can store

Thanks & Regards

Raja Gopal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,598

Hi raja,

1. How many records does a Hide statement can store

Same as much as we can WRITE on the screen.

2. HIDE area is nothing but the screen (similar to WRITE )

but its hidden. Its not displayed anywhere.

3. So HIDE will store virtually everything whatever we can WRITE on screen.

regards,

amit m.

5 REPLIES 5
Read only

Former Member
0 Likes
1,598

Hi,

HIDE

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.

The HIDE Technique

You use the HIDE technique while creating a list level to store line-specific information for later use. To do so, use the HIDE statement as follows:

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.

Regards,

Priyanka.

Read only

Former Member
0 Likes
1,598

Hi,

HIDE statment is used to pass the value from one list to the other list.

for exapmle if you are writing value of X inside a DO loop and after each write statment you are incrementing it by one.

ex.

DATA X TYPE I VALUE 1.

Do 10 times.

WRITE:/ X.

X = X + 1.

ENDDO.

This statment will write values of X from 1 to 10 which will be printed on 1st list. Now suppose i ask you to design one more level of list that is interactive list in such a way that if user double click on a any number on the first list, same number should apper on the next list. In this case You will use AT LINE-SELECTION event but in AT LINE-SELECTION event if you will simply write WRITE X. it will print the last value of X which is 10 in this case(Because DO loop will be iterated for 10 times first and then it will come out seting value of X as 10) there fore to write the same value of X where user has double clicked SAP has given HIDE statment. It is specifically used in interactove list where HIDE statment makes it possible that the same value of variable will be available on the next list what was clicked on the the first list even if the variable's value has been changed.

So in our case to write the same value we will write in this way.

DATA X TYPE I VALUE 1.

Do 10 times.

WRITE:/ X.

HIDE X.

X = X + 1.

ENDDO.

AT LINE-SELECTION.

WRITE X.

You can hide more than one value so in your case HIDE matnr werks means these values will be same on the next level of list even if they have been changed.

<b>Reward points for helpful answers.</b>

Regards

Tanweer

Message was edited by:

Tanweer Zaki

Read only

Former Member
0 Likes
1,598

hi,

We can use HIDE technique while creating LIST level to store line -specific information for later use.

syntax: HIDE <variable>.

this statement place the contents of the variable <variable> for the current output line(SY-LINNO) into the HIDE area.

you can think of the HIDE area as a table, in which the system stores the field name, field contents and line number in which field exisisting. as soon as they are needed the system reads the values from the table(HIDE) using READ LINE statement.

Keep in mind while working with HIDE.

1) Allways keep HIDE <variable> statement after WRITE statement for more readable format.

2) All way keep HIDE <variable> statement inside the LOOP statement, because syatem stores all the hide variable in system genarated table space, we can process table data throug it's work area only.

Sample Program.

Report Zreport_hide.

*table work area

tables: lfa1,ekko,ekpo.

*selection-screen logic

select-options: s_lifnr for lfa1-lifnr obligatory.

*logic for creating internal table

data: begin of it _lfa1 occurs 0,

it_lifnr like lfa1-lifnr,

name1 like lfa1-name1,

end of it_lfa1.

data: begin of it _ekko occurs 0,

it_ebeln like ekko-ebeln,

aedat like ekko-aedat,

end of it_ekko.

  • logic for genarating basic list

start-of-selection.

select lifnr name1 from lfa1 into table it_lfa1 where lifnr in s_lifnr.

*processing the data.

loop at it_lfa1.

write:/ it_lfa1-lifnr,

it_lfa1-name1,'

HIDE it_lfa1-lifnr. "here hide the varible lifnr

endloop.

*logic for genarating secondary list

at line-selection.

case sy-lsind.

when 1.

select ebeln aedat from ekko into table it_ekko where lifnr = it_lfa1-lifnr.

*processing seconadry list data.

loop at it_ekko.

write:/ it_ekko-ebeln,

it_ekko-aedat,

endloop.

Read only

Former Member
0 Likes
1,599

Hi raja,

1. How many records does a Hide statement can store

Same as much as we can WRITE on the screen.

2. HIDE area is nothing but the screen (similar to WRITE )

but its hidden. Its not displayed anywhere.

3. So HIDE will store virtually everything whatever we can WRITE on screen.

regards,

amit m.

Read only

Former Member
0 Likes
1,598

Hi,

<u><b>The HIDE Technique</b></u>

You use the HIDE technique while creating a list level to store line-specific information for later use. To do so, use the HIDE statement as follows:

HIDE <f>.

This statement places the contents of the variable <f> for the current output line (system field SYLINNO) 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.

Regards,

Bhaskar