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: 

Hide

Former Member
0 Kudos

Hi All,

What are the prerequisite for hide command?

4 REPLIES 4

Former Member
0 Kudos

Check if this helps -

HIDE

Basic form

HIDE f.

Cannot Use Constants in the HIDE Area.

Effect

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:

1. AT LINE-SELECTION

2. AT PFx

3. AT USER-COMMAND

4. READ LINE

You do not have to output the field with WRITE in order to be able to store its value.

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

System fields that are particularly useful in interactive reporting are listed in the system fields for lists documentation.

Note

You cannot save lines or components of lines of an internal table that is addressed using a field symbol to the HIDE area. (Compare the ASSIGNING addition to the READ and LOOP statements). Assign the contents of the line or component to a global variable and save this instead.

Note

Non-Catchable Exceptions:

  • HIDE_FIELD_TOO_LARGE: The field is too long for HIDE.

  • HIDE_ON_EMPTY_PAGE: HIDE is not possible on an empty page.

  • HIDE_NO_LOCAL: HIDE is not possible in a local field.

  • HIDE_ILLEGAL_ITAB_SYMBOL: Cannot apply HIDE to a table line or component of a table line.

ashish

Former Member
0 Kudos

don't wirte any write statement after the hide command.

hide is used in interactive reports to store the old records for processing.

get cursor field it is also command used in interactive reports.

but performance wise get cursor is better than hide command.

Former Member
0 Kudos

HIDE TECHNIQUE

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

The following program is connected to the logical database F1S.

REPORT demo_list_hide NO STANDARD PAGE HEADING.

TABLES: spfli, sbook.

DATA: num TYPE i,

dat TYPE d.

START-OF-SELECTION.

num = 0.

SET PF-STATUS 'FLIGHT'.

GET spfli.

num = num + 1.

WRITE: / spfli-carrid, spfli-connid,

spfli-cityfrom, spfli-cityto.HIDE: spfli-carrid, spfli-connid, num.

END-OF-SELECTION.

CLEAR num.

TOP-OF-PAGE. WRITE 'List of Flights'.ULINE. WRITE 'CA CONN FROM TO'. ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

CASE sy-pfkey.

WHEN 'BOOKING'.

WRITE sy-lisel.

ULINE.

WHEN 'WIND'.

WRITE: / 'Booking', sbook-bookid,'Date ', sbook-fldate.ULINE. ENDCASE.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'SELE'.

IF num NE 0. SET PF-STATUS 'BOOKING'. CLEAR dat. SELECT * FROM sbook WHERE carrid = spfli-carridAND

IF sbook-fldate NE dat.connid = spfli-connid. dat = sbook-fldate. SKIP. WRITE / sbook-fldate.POSITION 16.

ELSE. NEW-LINE. POSITION 16.

ENDIF.

WRITE sbook-bookid.

HIDE: sbook-bookid, sbook-fldate, sbook-custtype,

sbook-smoker, sbook-luggweight, sbook-class.ENDSELECT. IF sy-subrc NE 0.

WRITE / 'No bookings for this flight'.

ENDIF.

num = 0.

CLEAR sbook-bookid.

ENDIF.

WHEN 'INFO'.

IF NOT sbook-bookid IS INITIAL.

SET PF-STATUS 'WIND'.

SET TITLEBAR 'BKI'.

WINDOW STARTING AT 30 5 ENDING AT 60 10.

WRITE: 'Customer type :', sbook-custtype,

/ 'Smoker :', sbook-smoker,

/ 'Luggage weight :', sbook-luggweight UNIT 'KG',

/ 'Class :', sbook-class.

ENDIF.

ENDCASE.

At the event START-OF-SELECTION, the system sets the status FLIGHT for the basic list. In status FLIGHT, function code SELE (text SELECT) is assigned to function key F2 and to a pushbutton. So the event AT USER-COMMAND is triggered if the user double-clicks, presses F2, or chooses the pushbutton SELECT.

The three fields SPFLI-CARRID, SPFLI-CONNID, and NUM are stored in the HIDE area while creating the basic list. After selecting a line, the system displays the detail list defined in the AT USER-COMMAND event for function code SELE. In the AT USER-COMMAND event, the system refills all fields of the selected line that were stored in the HIDE area. You use NUM to check whether the user selected a line from the actual list. The detail list has status BOOKING, where F2 is assigned to function code INFO (text: Booking Information). The detail list presents data that the program selected by means of the HIDE fields of the basic list. For each list line displayed, the system stores additional information in the HIDE area.

If the user selects a line of the detail list, the system displays the "hidden" information in a dialog box with the status WIND. The status has the type Dialog box, and contains the proposed functions for a list status. The program uses SBOOK­BOOKID to check whether the user selected a valid line.

The program itself sets all page headers and the title bar of the dialog box.

Kindly reward point if helpful....

Former Member
0 Kudos

hi my question is solved