04-18-2007 4:03 PM
Hi Friends,
Actually i am writing the INTERACTIVE ALV.In this ALV i need to USE HIDE STATEMENT.
This is an urgent requirement.
Please anybody help me.
Thanks&Regards
Thummala Krishna Reddy.
04-18-2007 4:44 PM
HI Priyanka
Refer the demo program: for sample code:
<b>demo_list_hide</b>
Check sample code of using HIDE statemetn
http://www.erpgenie.com/abap/code/chap1704.txt
below is a sample example
&----
*& Chapter 17: Working with the hide command
&----
REPORT CHAP1704.
work area
TABLES CUSTOMERS.
Internal table
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.
Processing data
START-OF-SELECTION.
SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.
LOOP AT ALL_CUSTOMERS.
WRITE / ALL_CUSTOMERS-NAME HOTSPOT ON.
HIDE ALL_CUSTOMERS-ID.
ENDLOOP.
Detail information
AT LINE-SELECTION.
WRITE: / 'Customer detail information:',
ALL_CUSTOMERS-NAME,
ALL_CUSTOMERS-CITY,
ALL_CUSTOMERS-TELEPHONE.
below link gives more information i hope
http://www.csuchico.edu/acms/gcorbitt/abap13_f98.ppt
Regards Rk
Message was edited by:
Rk Pasupuleti
04-18-2007 4:46 PM
04-18-2007 6:14 PM
Hi Priyanka,
you can't use hide statement in ALV.Try to do it in USER_COMMAND Subroutine for getting the clicked Value in ALV.
04-18-2007 6:18 PM
Hi,
Look at the below link ..
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba42335c111d1829f0000e829fbfe/content.htm
Regards
Sudheer
04-18-2007 7:03 PM
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.
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.
<b>sample code</b>
WRITE: / spfli-carrid, spfli-connid,
spfli-cityfrom, spfli-cityto.
HIDE: spfli-carrid, spfli-connid, num.
04-18-2007 8:07 PM
Hi,
use the below code for Hide in ALV interactive report.
use hotspot in fieldcatalog
gwa_fieldcat-tabname = gc_bsik.
gwa_fieldcat-fieldname = gc_bukrs.
gwa_fieldcat-outputlen = gc_12.
gwa_fieldcat-hotspot = gc_x.
gwa_fieldcat-seltext_l = text-016.
APPEND gwa_fieldcat TO git_fieldcat.
CLEAR gwa_fieldcat.
and create dynamic subroutine like:
FORM sub_user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
*Fi Documents-3rd level
CASE r_ucomm.
WHEN '&IC1'.
CLEAR gwa_bsik3.
READ TABLE git_bsik3 INTO gwa_bsik3 INDEX rs_selfield-tabindex.
MOVE rs_selfield-value TO gwa_bsik3-lifnr.
IF rs_selfield-fieldname EQ 'LIFNR'.
PERFORM sub_build_fieldcatlog2.
PERFORM sub_data_retrieval2.
PERFORM sub_display_alv2.
ENDIF.
ENDCASE.
ENDFORM. "sub_user_command1
call the above user command in alv display like below code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gv_repid
i_callback_user_command = 'SUB_USER_COMMAND1'
i_callback_top_of_page = 'SUB_F_TOP_OF_PAGE'
it_fieldcat = git_fieldcat1[]
i_save = gc_a
it_events = git_events
TABLES
t_outtab = git_bsik3
EXCEPTIONS
OTHERS = 0.
CLEAR : git_bsik3.
pl let me know if you need any more info.
Regards,
Mahesh
04-18-2007 9:40 PM
Hello Priyanka
If you want to have additional information for each row that should not be visible to the user simply set <b>ls_fcat-TECH = 'X' </b>for these columns. These columns are neither displayed on the list nor in the layout options.
Setting this parameter in the fieldcatalog for OO-based ALV corresponds to the old-fashioned HIDE statement of write lists.
Regards
Uwe