ABAP List Viewer(ALV) – 3

*ALV USING FM – REUSE_ALV_GRID_DISPLAY *

TYPE-POOLS : SLIS.

data : it_flight type table of sflight,

          wa_flight type sflight.

DATA : IT_FIELDCAT TYP SLIS_T_FIELDCAT_ALV,

           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

select-options : s_carrid for wa_flight-carrid.

start-of-selection.

  select * from sflight into table it_flight where carrid in s_carrid.

 call function ‘REUSE_ALV_FIELDCATALOG_MERGE’

     EXPORTING

       I_PROGRAM_NAME               = SY-CPROG

       I_STRUCTURE_NAME             = ‘SFLIGHT’

      changing

        ct_fieldcat                  = IT_FIELDCAT.

 

    call function ‘REUSE_ALV_GRID_DISPLAY’

     EXPORTING

       I_CALLBACK_PROGRAM                = SY-REPID

       IT_FIELDCAT                       = IT_FIELDCAT

      tables

        t_outtab                          = IT_FLIGHT.



Output-

 


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 )

w

Connecting to %s