‎2006 Dec 08 10:09 AM
can anyone tell me wat the <b>hide</b> statement does? and its purpose?
‎2006 Dec 08 10:12 AM
HIDE
Basic form
HIDE f.
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Constants not allowed in HIDE area.
Effect
Retains the contents of f related to the current output line. When the user selects the line from the list f is automatically filled with the retained value.
The selection can occur in:
AT LINE-SELECTION
AT PFx
AT USER-COMMAND
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.
Note
Runtime errors:
HIDE_FIELD_TOO_LARGE: The field is too long for HIDE.
HIDE_ON_EMPTY_PAGE: HIDE not possible on an empty page.
HIDE_NO_LOCAL: HIDE not possible for a local field.
HIDE_ILLEGAL_ITAB_SYMBOL: HIDE not possible for a table line or component of a table line.
and also a sample program.
report zrich_0003.
data: begin of itab occurs 0,
field type c,
end of itab.
itab-field = 'A'. append itab.
itab-field = 'B'. append itab.
itab-field = 'C'. append itab.
itab-field = 'D'. append itab.
itab-field = 'E'. append itab.
loop at itab.
format hotspot on.
write:/ itab-field.
hide itab-field.
format hotspot off.
endloop.
at line-selection.
write:/ 'You clicked', itab-field.
‎2006 Dec 08 10:11 AM
Read the Hide help .
HIDE f.
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Constants in the HIDE Area.
Effect
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.
Note
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.
Exceptions
Non-Catchable Exceptions
Cause: The field is too long for HIDE.
Runtime Error: HIDE_FIELD_TOO_LARGE
Cause: Cannot apply HIDE to a table line or component of a table line.
Runtime Error: HIDE_ILLEGAL_ITAB_SYMBOL
Cause: HIDE is not possible in a local field.
Runtime Error: HIDE_NO_LOCAL: HIDE
Cause: HIDE is not possible on an empty page.
Runtime Error: HIDE_ON_EMPTY_PAGE
Just select hide and click on F1. (it will give the help)
‎2006 Dec 08 10:12 AM
HIDE fThe 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
‎2006 Dec 08 10:12 AM
HIDE
Basic form
HIDE f.
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Constants not allowed in HIDE area.
Effect
Retains the contents of f related to the current output line. When the user selects the line from the list f is automatically filled with the retained value.
The selection can occur in:
AT LINE-SELECTION
AT PFx
AT USER-COMMAND
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.
Note
Runtime errors:
HIDE_FIELD_TOO_LARGE: The field is too long for HIDE.
HIDE_ON_EMPTY_PAGE: HIDE not possible on an empty page.
HIDE_NO_LOCAL: HIDE not possible for a local field.
HIDE_ILLEGAL_ITAB_SYMBOL: HIDE not possible for a table line or component of a table line.
and also a sample program.
report zrich_0003.
data: begin of itab occurs 0,
field type c,
end of itab.
itab-field = 'A'. append itab.
itab-field = 'B'. append itab.
itab-field = 'C'. append itab.
itab-field = 'D'. append itab.
itab-field = 'E'. append itab.
loop at itab.
format hotspot on.
write:/ itab-field.
hide itab-field.
format hotspot off.
endloop.
at line-selection.
write:/ 'You clicked', itab-field.
‎2006 Dec 08 10:12 AM
Hi Pavithara ,
The hide statement stores the value of the variable you want to hide in local memory and you can retreive it.
e.g.
loop at it_1.
write:/ it_1-mantr.
hide it_1-matnr.
endloop.on the output when you click and handle the event the at line selection ,youget the value of matnr in the field it_1-matnr.
Regards
Arun
‎2006 Dec 08 10:14 AM
Hi Pavithra,
Hide statement works like a buffer which stores the value that the user has selected in the basic list,which is then used to compare in the secondary list to list out the corresponding details.
Regards,
pankaj singh
‎2006 Dec 08 10:18 AM
Hi,
data : it type table of mara,
wa type mara.
at line-selection.
case wa-matnr.
when '000000000000000038'.
write 'FIRST Record'.
endcase.
select * from mara into it.
loop at it into wa.
write : wa-matnr.
hide wa-matnr.
endloop.
Note : Hide is work like an internal table , first it will take all matnr numbers and put into the hide internal table.
when you are pressing '00000000000000038' number in fisr report screen output.
it will check that no in hide internal table and it will process that.
i hope that you will understand this.
‎2006 Dec 08 10:22 AM
Hi pavithra,
1. Just like write statements,
displays the contents on the screen,
2. similary, there is another screen,
IN THE MEMORY, which does not get displayed.
3. Just like WRITE,
HIDE writes the value in this memory screen,
so that we can retrive it later on.
regards,
amit m.