Interactive Report – 3

*Interactive Report with HIDE Technique*

report  zinteractive_rep2 no standard page heading line-count 15(2).

data : it_spfli type table of spfli,

         wa_spfli type spfli.

data : it_sflight type table of sflight,

         wa_sflight type sflight.

select-options : p_carrid for wa_spfli-carrid.

start-of-selection.

  select * from spfli into table it_spfli where carrid in p_carrid.

end-of-selection.

  loop at it_spfli into wa_spfli.

    write :/ wa_spfli-carrid,

             wa_spfli-connid,

             wa_spfli-countryfr,

             wa_spfli-countryto,

             wa_spfli-cityfrom,

             wa_spfli-cityto,

             wa_spfli-airpfrom,

             wa_spfli-airpto.

    hide : wa_spfli-carrid. ” hiding value of carrid in the hide Area

  endloop.

top-of-page.

  write :/ ‘details from spfli table’.

  uline.

end-of-page.

  write :/ ‘thanks visit again’.

  uline.

at line-selection. ” event triggers when the user double clicks on the basic list

  case sy-lsind.

    when ‘1’.

  select * from sflight into table it_sflight where carrid = wa_spfli-carrid.

   if it_sflight is not initial.

     loop at it_sflight into wa_sflight.

       write :/ wa_sflight-carrid,

                wa_sflight-connid,

                wa_sflight-fldate,

                wa_sflight-price,

                wa_sflight-seatsmax,

                wa_sflight-seatsocc.

       endloop.

     endif.

  endcase.

top-of-page during line-selection.

  case sy-lsind.

    when ‘1’.

      write :/ ‘details from sflight table’.

  endcase.

  uline.


 

 Output –

c12

c13

c14

c15

c16


 

*Interactive report using HIDE Technique *

 

report  zinteractive_rep3 no standard page heading line-count 15(2).

 

data : it_spfli type table of spfli,

         wa_spfli type spfli.

 

data : it_sflight type table of sflight,

         wa_sflight type sflight.

 

data : it_sbook type table of sbook,

        wa_sbook type sbook.

 

select-options : p_carrid for wa_spfli-carrid.

 

start-of-selection.

  select * from spfli into table it_spfli where carrid in p_carrid.

 

end-of-selection.

  loop at it_spfli into wa_spfli.

    write :/ wa_spfli-carrid,

             wa_spfli-connid,

             wa_spfli-countryfr,

             wa_spfli-countryto,

             wa_spfli-cityfrom,

             wa_spfli-cityto,

             wa_spfli-airpfrom,

             wa_spfli-airpto.

    hide : wa_spfli-carrid. ” Hiding CARRID Value From SPFLI table

  endloop.

 

top-of-page.

  write :/ ‘details from spfli table’.

  uline.

 

end-of-page.

  write :/ ‘thanks visit again’.

  uline.

 

at line-selection.

  case sy-lsind.

    when ‘1’.

  select * from sflight into table it_sflight where carrid = wa_spfli-carrid.

   if it_sflight is not initial.

     loop at it_sflight into wa_sflight.

       write :/ wa_sflight-carrid,

                wa_sflight-connid,

                wa_sflight-fldate,

                wa_sflight-price,

                wa_sflight-seatsmax,

                wa_sflight-seatsocc.

       hide : wa_sflight-carrid. ” Hiding CARRID value from                                        “SFLIGHT table

       endloop.

     endif.

 

when ‘2’.

  select * from sbook into table it_sbook

    where carrid =  wa_sflight-carrid.

    if it_sbook is not initial.

      loop at it_sbook into wa_sbook.

        write :/ wa_sbook-carrid,

                 wa_sbook-connid,

                 wa_sbook-fldate,

                 wa_sbook-bookid,

                 wa_sbook-customid,

                 wa_sbook-custtype.

        endloop.

      endif.

  endcase.

 

top-of-page during line-selection.

  case sy-lsind.

    when ‘1’.

      write :/ ‘details from sflight table’.

when ‘2’.

      write :/ ‘details from sbook table’.

  endcase.

  uline.

Output-

c20

c21

c22

c223


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s