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: 

example of hide with work area

Former Member
0 Kudos

hi,

please help me with giving example of hide statement with work area. i.e. the hide is used to store values of internal table without header line

thanks

S K

3 REPLIES 3

Former Member
0 Kudos


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-carrid
                            AND   connid = spfli-connid.
          IF sbook-fldate NE dat.
            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 weigtht :', sbook-luggweight UNIT 'KG',
             / 'Class           :', sbook-class.
      ENDIF.
  ENDCASE.

Former Member
0 Kudos

Hope this will help you.

Former Member
0 Kudos

Hi,

hope the following code will help you.

REPORT  ZYH_ITERACTIVE_REP.
tables lfa1.
data wa_lfa1 type lfa1.
start-of-SELECTION.
  select * from lfa1 into wa_lfa1.
    write:/ wa_lfa1-lifnr, wa_lfa1-name1, wa_lfa1-ort01.
    hide: wa_lfa1-lifnr, wa_lfa1-name1.
  ENDSELECT.
end-of-SELECTION.

set pf-status 'ZYH_ST1'.
set TITLEBAR 'ZYH_TB1'.

at LINE-SELECTION.
  check sy-lsind = 1.
  window starting at 10 4 ending at 77 12.
  write:/ 'The user double-clicked on a line in the report'.
  write / sy-lisel.
  write:/ wa_lfa1-lifnr, wa_lfa1-name1.
  write:/ sy-linsz, sy-linct.

TOP-OF-PAGE.
  write:/ 'This is the self-defined header'.
  uline.