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

Former Member
0 Likes
943

Hi

if we write a hide statement when the value is hide and when the value is geting for the line selection event?

is it possible to hide whole internal table?

if we write a perform statement in start-of-selection event and form statement in at selection screen what will be the result?

8 REPLIES 8
Read only

Former Member
0 Likes
907

Hi,

Entire line contents can be captured using SY-LISEL variable, but to trap the contents of the field, you need to use offset to get the details,

Rgds,

Read only

Former Member
0 Likes
907

Hi,

Using HIDE stmt,

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

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

Regards,

Sowjanya

Read only

Former Member
0 Likes
907

Hi kiran,

HIDE AREA

is just like a list (used with write statement)

the difference is, its not writen on screen,

instead it is STORED in memoery. (Line by line)

Just as we use write, we use

HIDE variablename.

and the value of the variable is STORED in memory

on the particular line number.

(we can retrive its value , on that particular

line number, when we doubl-click on the line

which is displayed using write)

2. for getting the taste of it ,

use this program (just copy paste)

(it will show u hidden fileds)

(it will display 2 lines, then on double-clicking,

it will show the hidden values 1000,2000)

REPORT abc.

DATA : a(10) TYPE c.

DATA : b(10) TYPE c.

a = '1000'.

b = 'mittal'.

WRITE : b.

HIDE a.

a = '2000'.

b = 'hello'.

WRITE 😕 b.

HIDE a.

AT LINE-SELECTION.

WRITE 😕 'hidden field a is : ' , a.

*----


3. Now a days, HIDE concept

is not used much, bcos alv concept is there!

4. WHY HIDE IS Used :

BCOS To TRAP/DETECT USER-INTERACTION (DOUBL-CLICK)

a) Suppose a simple report displays

a basic list showing

vendor number, vendor name.

b) User-Double clicks a vendor

c) Then we want to show the details of this vendor

5. So , to DETECT, which VENDOR is CLICKED,

we can either use HIDE or

use system variable sy-lisel

which has the contents of the line

which is double clicked.

(in this case we have to PARSE/SUBSTRing

the whole line to split the vendor number)

regards,

amit m.

Read only

Former Member
0 Likes
907

You cannot do that.

The program will run as usual.

Regards,

Ravi

Read only

andreas_mann3
Active Contributor
0 Likes
907

hi,

you can hide the headerline / or wa of your internal table - but it's performant - you should only hide the necessary fields

Andreas

Read only

0 Likes
907

Hi,

Check this sample code on hhow to use HIDE.

http://www.sap-img.com/abap/a-sample-hide-get-cursor-in-interactive-programming.htm

Cheers

VJ

Read only

Former Member
0 Likes
907

Hi,

Logically, you don`t hide all fields in your list as you would generally hide some values so that based on the user reaction you display those values.

On start-of-selection, from the system encounters the perform statement it automatically finds the corresponding subroutine (form..endform). The control is passed on to the subroutine block and control returns after the completion of the endform.

Reward points if helpful.

Regards

Read only

hymavathi_oruganti
Active Contributor
0 Likes
907

1)with hide, u can hide single fields or a structure. but not a table.

and also note that u cannot use hide for structures containing internal tables.

2) nothing happens , it runs as usual because, where ever u write form statement, we cannot go inside the form unless invoked by a perform.

first it goes to at selection- scren event, there finds form but as it is not called, will not go inside. next comes to start-of-selection and there when it finds perform, then it immediately goes inside the form