‎2007 Aug 13 10:43 AM
Hi Experts,
Please tell me about HIDE keyword and is it neccessary to use Hide with At line-selection.
Thanks
‎2007 Aug 13 10:52 AM
Hi,
HIDE <f>
It 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
In AT LINE-SELECTION , Instead of HIDE u can use the keyword
GET. By using GET keyword we can identify field name and value where the cursor at that time.
see the sample code.
<b>AT LINE-SELECTION.
GET CURSOR FIELD CURSORFIELD.
WRITE: / CURSORFIELD, SY-SUBRC.</b>
Reward if helpful
Regards,
LIJO JOHN
‎2007 Aug 13 10:46 AM
Hi,
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.
WRITE: / spfli-carrid, spfli-connid,
spfli-cityfrom, spfli-cityto.
HIDE: spfli-carrid, spfli-connid, num.
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.
WRITE: / spfli-carrid, spfli-connid,
spfli-cityfrom, spfli-cityto.
HIDE: spfli-carrid, spfli-connid, num.
Hide is used in event AT-LINE SELECTION event.
It stores the value in memory & when user clicks on basic list the secondary list will be generated based on value hided.
Refer the Demo Program for Sample Code,
<b>DEMO_LIST_HIDE</b>.
Regards,
Padmam.
‎2007 Aug 13 10:52 AM
Hi,
HIDE <f>
It 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
In AT LINE-SELECTION , Instead of HIDE u can use the keyword
GET. By using GET keyword we can identify field name and value where the cursor at that time.
see the sample code.
<b>AT LINE-SELECTION.
GET CURSOR FIELD CURSORFIELD.
WRITE: / CURSORFIELD, SY-SUBRC.</b>
Reward if helpful
Regards,
LIJO JOHN
‎2007 Aug 13 10:54 AM
Hello Prakash,
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.
<u><b>And Remember that Hide statement will create an internal table with 3 columns : Line Number, Field Name and Field Value.</b></u>
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.
Message was edited by:
Sasidhar Reddy Matli
‎2007 Aug 13 10:55 AM
Hi
there is no need for use HIDE under AT line selection
HIDE dobj.
This statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno. 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.
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, constants and literals that cannot be read in list results and in the statement READ LINE can be specified for dobj outside of classes.
reward if usefull
‎2007 Aug 13 10:56 AM
in at line-selection.
we can use either hide command or get cursor field.
it is compulsary.
‎2007 Aug 13 11:06 AM
hi
good
Syntax
HIDE <f>.
While the list is being created, this statement stores the contents of the field <f> and the current line number in the internal HIDE area When the cursor is positioned on a line in an interactive list event, the stored value is returned to the field <f>.
thanks
mrutyun^