Application Development 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: 

HOW TO USE HIDE STATEMENT IN INTERACTIVE ALV.

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

Check demo program DEMO_LIST_HIDE

former_member491305
Active Contributor
0 Kudos

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.

Former Member

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

uwe_schieferstein
Active Contributor
0 Kudos

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