NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

tables: sflight.

type-pools: slis.

select-options: s_carrid for sflight-carrid.

data: begin of gs_sflight,
carrid type sflight-carrid,
connid type sflight-connid,
fldate type sflight-fldate,
planetype type sflight-planetype,
cellcolor type lvc_t_scol, "lvc_t_scol,
end of gs_sflight.

data: gt_sflight like STANDARD TABLE OF gs_sflight,
gt_fieldcat type slis_t_fieldcat_alv,
gs_sflight2 like gs_sflight,
gs_layout type slis_layout_alv,
gs_cellcolor type lvc_s_scol,
gv_index type sy-tabix.

start-of-selection.

select carrid
connid
fldate
planetype from sflight
into corresponding fields of table gt_sflight
where carrid in s_carrid.

loop at gt_sflight into gs_sflight2.
gv_index = sy-tabix.
if gs_sflight2-connid = '0017'.
gs_cellcolor-fname = 'CONNID'.
gs_cellcolor-color-col = 6.
gs_cellcolor-color-int = '1'.
gs_cellcolor-color-inv = '1'.
append gs_cellcolor to gs_sflight-cellcolor.
clear gs_cellcolor.
modify gt_sflight from gs_sflight index gv_index transporting cellcolor.
endif.
ENDLOOP.


*--- Field Catalog
PERFORM f_field_catalog.

*--- Layout
PERFORM f_build_layout.

END-OF-SELECTION.

* Perform to display ALV report
PERFORM f_alv_report_display.

FORM f_field_catalog.

DATA: gs_fcat type slis_fieldcat_alv.

gs_fcat-col_pos = 1.
gs_fcat-fieldname = 'CARRID'.
gs_fcat-tabname = 'GT_SFLIGHT'.
gs_fcat-seltext_l = 'Airline Code'.
APPEND gs_fcat TO gt_fieldcat.

gs_fcat-col_pos = 2.
gs_fcat-fieldname = 'CONNID'.
gs_fcat-tabname = 'GT_SFLIGHT'.
gs_fcat-seltext_l = 'Flight Connection Number'.
APPEND gs_fcat TO gt_fieldcat.
CLEAR:gs_fcat.

gs_fcat-col_pos = 3.
gs_fcat-fieldname = 'FLDATE'.
gs_fcat-tabname = 'GT_SFLIGHT'.
gs_fcat-seltext_l = 'Flight date'.
APPEND gs_fcat TO gt_fieldcat.
CLEAR:gs_fcat.


gs_fcat-col_pos = 4.
gs_fcat-fieldname = 'PLANETYPE'.
gs_fcat-tabname = 'GT_SFLIGHT'.
gs_fcat-seltext_l = 'Aircraft Type'.
APPEND gs_fcat TO gt_fieldcat.
CLEAR:gs_fcat.

ENDFORM.


FORM f_build_layout.

CLEAR gs_layout.
gs_layout-colwidth_optimize = 'X'. " Optimization of Col width
gs_layout-coltab_fieldname = 'CELLCOLOR'. " Cell color Column Name

ENDFORM.

FORM f_alv_report_display .

call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat
tables
t_outtab = gt_sflight
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.


ENDFORM.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.