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

what hide command will do

Former Member
0 Likes
1,091

what hide command will do

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,046

hi,

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

remember to reward points and close if your question is solved

regards,

venu.

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,046

Here is the F1 help.....

<i>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.</i>

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.

It kind of "remembers" what is written, so that when you click on it, it knows what the value is.

Please remember to award points and mark as solved if your question has been answered. Thanks.

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
1,046

Hi,

i have seen this command in the PBO event .there after i havn't seen this field anywhere in the below listed events

at line selection

at pfx

at user-command

even though the program is working

Message was edited by: Narasimha

Read only

0 Likes
1,046

I've never then this used anywhere but in list processing.

Please make sure that you award points for helpful answers. If you question has been answered, pleae mark as solved. Thanks.

Regards,

Rich Heilman

Read only

0 Likes
1,046

hi,

you are correct, suppose in the user command (PAI) we are going to process some of the fields as per user selection , the fields are hide in PBO events

for example in PBO event hide matnr. and later we no need to use hide, if user click the matnr , the program retrieves the matnr value automatically.

Cheers,

Sasi

Read only

0 Likes
1,046

hi sasi,

i didnt get you,can you explain me more clearly

Read only

0 Likes
1,046

Hi,

suppose if user select the material number we need to navigate the material master screen.

in the report we displayed material number and etc...

In PBO write like hide itab-matnr.

and in the user command if any action perfomed

set paremater ....... itab-matnr. ( it has the value )

I thing you're clear now.

Cheers,

Sasi

Read only

Former Member
0 Likes
1,047

hi,

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

remember to reward points and close if your question is solved

regards,

venu.

Read only

Former Member
0 Likes
1,046

Hi

Suppose you use: HIDE f.

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.

Normally, this command is useful when we need to catch a value for drill-down purpose

Regards

Ashish

Read only

Former Member
0 Likes
1,046

Hi,

Hide command will hold the defined field values which can be used in At line selection or User command events.

Cheers,

Sasi