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

hide statement

Former Member
0 Likes
1,116

Hi,

Hide statement which is used for interactive lists, is said to be a table.

Need to know the process it does, the table where ot stores the table and the program related to that.

regards,

kb

11 REPLIES 11
Read only

Former Member
0 Likes
1,090

Hi kb,

1. to get a taste of hide statement, just copy paste

the below program.

2.

report abc.

DATA NUMBER LIKE SY-INDEX.

START-OF-SELECTION.

DO 9 TIMES.

WRITE: / 'Row', (2) SY-INDEX.

NUMBER = SY-INDEX.

HIDE NUMBER.

ENDDO.

AT PF5.

CHECK NOT NUMBER IS INITIAL.

WRITE: / 'Cursor was in row', (2) NUMBER.

CLEAR NUMBER.

regards,

amit m.

Read only

ak_upadhyay
Contributor
0 Likes
1,090

Hi,

1. Hide statement HIDES the data

on the current line and position.

2. When we use first HIDE statement, the current line and position

is not well defined.

(BCOS write statment is not issued, so the ssytem does not

calculate/know the current cursor location)

3. Hence, we need to always use WRITE statment,

and thereafter HIDE (so that the system HIDES the data,

on the current row only)

Sample:


                                                                                *&---------------------------------------------------------------------*
*& Report  ZINTRACTIVE_3                                               *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ZINTRACTIVE_3.                             .

TABLES : VBAP , LIPS , VBRP.

SELECT-OPTIONS : A_VBELN FOR VBAP-VBELN.

DATA : BEGIN OF IT OCCURS 0,

       VBELN LIKE VBAP-VBELN,
       L_VBELN LIKE LIPS-VBELN,
       B_VBELN LIKE VBRP-VBELN,

       END OF IT.


DATA : BEGIN OF IT1 OCCURS 0,

       S_VBELN LIKE VBAP-VBELN,
       POSNR LIKE VBAP-POSNR,
       KWMENG LIKE VBAP-KWMENG,

       END OF IT1.


SET PF-STATUS 'ANU'.

START-OF-SELECTION.

  SELECT VBAP~VBELN LIPS~VBELN VBRP~VBELN
  FROM LIPS INNER JOIN VBAP ON

  VBAP~VBELN = LIPS~VGBEL AND
  VBAP~POSNR = LIPS~VGPOS

  INNER JOIN VBRP ON

  VBRP~VGBEL = LIPS~VBELN AND
  VBRP~VGPOS = LIPS~POSNR INTO

  TABLE IT WHERE VBAP~VBELN IN A_VBELN.

END-OF-SELECTION.

  LOOP AT IT.

    WRITE :/ IT-VBELN, IT-L_VBELN, IT-B_VBELN.

    HIDE : IT-VBELN.

  ENDLOOP.

AT LINE-SELECTION.

*AT PF6.
*
*AT USER-COMMAND.

*  CASE SY-UCOMM.
*    WHEN 'IT-VBELN'.

      SELECT VBELN POSNR KWMENG FROM VBAP
      INTO TABLE IT1 WHERE VBELN = IT-VBELN.

      LOOP AT IT1.
        WRITE :/ IT1-S_VBELN, IT1-POSNR, IT1-KWMENG.
      ENDLOOP.

Reward points if useful....

Regards

AK

Read only

Former Member
0 Likes
1,090

HIDE statement stores the content of a variable dobj together with the current list line whose line number is contained in sy-linno in the hide area of the current list level. 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.

DATA: square TYPE i,

cube TYPE i.

START-OF-SELECTION.

FORMAT HOTSPOT.

DO 10 TIMES.

square = sy-index ** 2.

cube = sy-index ** 3.

WRITE / sy-index.

HIDE: square, cube.

ENDDO.

AT LINE-SELECTION.

WRITE: square, cube.

Read only

Former Member
0 Likes
1,090

Hi,

try this short example:

TABLES: MARA.

*

DATA: IMARA TYPE TABLE OF MARA WITH HEADER LINE.

DATA: CURSORFIELD(20).

*

START-OF-SELECTION.

*

SELECT * FROM MARA INTO TABLE IMARA UP TO 30 ROWS.

*

LOOP AT IMARA.

WRITE: / IMARA-MATNR, IMARA-MATKL.

HIDE: IMARA-MATNR, IMARA-MATKL.

ENDLOOP.

*

END-OF-SELECTION.

*

AT LINE-SELECTION.

GET CURSOR FIELD CURSORFIELD.

CASE CURSORFIELD.

WHEN: 'IMARA-MATNR'. WRITE: / CURSORFIELD, IMARA-MATNR.

WHEN: 'IMARA-MATKL'. WRITE: / CURSORFIELD, IMARA-MATKL.

ENDCASE.

Regards, Dieter

Read only

Former Member
0 Likes
1,090

Hi

Hide is the most easy topic to discuss.. HIDE statment is used like a String variable that can hold a Row content.

See my snippet

u can learn from that


LOOP AT it_ekko.

            FORMAT COLOR 3.
            FORMAT HOTSPOT ON.

            WRITE:/ w_check AS CHECKBOX,
              sy-vline,
              it_ekko-ebeln,
              23 sy-vline,
              it_ekko-bukrs,
              38 sy-vline,
              it_ekko-bsart,
              59 sy-vline,
              it_ekko-lifnr,
              76 sy-vline,
              it_ekko-zterm,
              96 sy-vline,
              it_ekko-llief,
              115 sy-vline.
        HIDE it_ekko-ebeln.  " hide Current it_ekko-ebeln

 

Do Reward if useful

Regards

Karthik.T

Read only

Former Member
0 Likes
1,090

Hi,

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

Thanks&Regards,

Sravani.

Read only

Former Member
0 Likes
1,090

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

Thanks&Regards,

Phani,

Points If Helpful.

Read only

manubhutani
Active Contributor
0 Likes
1,090

Hide statemet keeps the hided variable in a separate memory area

so u just use hide variable

then whenever use want to use this

access by its name only

please reward points

Read only

0 Likes
1,090

hi manu,

into which memory area does it stores?

regards,

kb

Read only

0 Likes
1,090

Hi

The HIDE keyword is used to store data objects and their values so they can be made available when the User selects a report line. When a line is selected, the fields that were hidden are filled with the values that you hid for that line.

The user selects a line for which

data has been stored in the HIDE

area. The runtime system evaluates

field SY-LILLI to determine the

selected line.

The runtime system jumps to the

point in the HIDE area where data

for this line is stored.

The runtime system then inserts all

values stored for the selected line in

the HIDE area into their

corresponding fields.

The runtime system processes the

event AT LINE-SELECTION and

its corresponding program

processing block.

A detail list is created.

Read only

Former Member
0 Likes
1,090

thanks