The latest version of each part of FALV can be found on github repository https://github.com/fidley/falv which you can use in abapGit for easier up to date handling.
When we want to adapt fieldcatalog ...
... this case also set manually on a base of columns order in the FCAT table.
Figure 122 ZDEMO_AIN_CL46 FCAT of the first selection option after displaying ALV
Using the option “COL_ID ...
... 111 Layout change screen with Groups (columns sets)
After choosing one of them, you’ll notice that the fields visibility change accordingly to groups assigned in field catalog.
Figure ...
... in ZDEMO_AIN_CL40
As you can see, grid looks much better with the column headers, also proper naming of the columns will help the users to better understand the values of the column.
...
... that easily visible.
For example, if you use TIMS data type, you’ll noticed that the length of the columns CONNID, FLTIME and DEPTIME is set to 8, additionally justification is set to L (columns 2, 8,9) ...
... grid and you’re optimizing the width of the column by minimizing the description of the column itself. It is common behaviour for example for checkboxes or for icon columns. In this case the Tooltip is ...
SELTEXT is one of the fields that are linked to the texts of the grid columns. This particular one is responsible for displaying the name of the column in the change/display of layout popup. ...
... with the AUTHORITY-CHECK, just assume that you want to display one or two columns only to specific users that have the authorization for it ( like simple sales margin). After checking the authorization, ...
...
Figure 68 ZDEMO_AIN_CL29 hiding of columns
In this case I’ve also filled the REPTEXT column, in order to show you that it is possible to move the columns to display. If I wouldn’t do that, ...
... (‘1’) or not (‘0’)
z – is saying if the colours should be inverted (‘1’) or not (‘0’)
Figure 59 ZDEMO_AIN_CL25 Emphasize set for columns
Figure 60 ...
This field is responsible for setting up columns in proper order while displaying the grid without using of saved layout. It may be useful if you don’t allow your users to save their own or global grid ...
... you can see that I passed to the filed catalog CFIELDNAME as ‘CURRENCY’ which is one of the columns of table SFLIGHT, that keeps currency key for field PRICE.
Figure 19 ZDEMO_AIN_CL09 CFIELDNAME ...
...
Figure 42 ZDEMO_AIN_CL19 Fieldcatalog with alignment
As you can see the columns are using the settings from fieldcatalog correctly.
Figure 43 ZDEMO_AIN_CL19 Results
...
Field catalog is one of most important tables that is used in ALV Grid. In most cases you’ll create it manually or at least after automatic creation, you’ll update its content, as most of the columns settings ...
... needs a custom container as a parent in order to work. It is used to divide the screen area into several containers. To simplify, you decide how many rows and columns the splitter will have. So it’s like ...
... your grid editable, you can set whole grid editable in layout, some columns in field catalog and some cells in cells style table. This demo shows it all.
"! This is demo for FALV with edit settings ...
... set colors for cells, rows and columns using FALV
"! This is demo for FALV full screen with color settings
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv10.
types: begin of t_sflight. ...
... a program which selects 100 materials from MARA and displays them using CL_GUI_ALV_GRID. Then when it's done ask to change some columns to editable. Then to change some colors for the rows and columns. ...
... FG to be able to use such FM. I prefer to create own FG for ALV functions which you can reuse after.
The example shown bellow allows to show use maximum 10 columns from ALV grid in replace function ...
...
data: ft_excel type standard table of alsmex_tabline.
field-symbols: like line of ft_excel.
data: f_rows type i.
" Excel columns in proper order.
"MATNR WERKS PLNNR PLNFL PLNAL PLNTY VORNR STLNR STLAL STLAN POSNR IDNRK STLST ...
... because it gave me possibility to do pre-selection before calling MB51, I've received completly formated results from MB51 and I can add all possible events to grid for new and existing columns. ...
...
data: gt_alv type tt_alv.
data: gs_alv type t_alv.
data: gt_trdir type standard table of trdir.
data: gt_fcat type slis_t_fieldcat_alv.
data: gr_salv type ref to cl_salv_table.
data: gr_columns type ref to cl_salv_columns_table. ...
...
data: m_flavour type string.
data: m_version type string.
data: mo_result_data type ref to cl_salv_ex_result_data_table.
data: mo_columns type ref to cl_salv_columns_table.
data: mo_aggreg type ref to cl_salv_aggregations. ...
... Of course don't forget to set the event handler: set handler go_event_receiver->subtotal_text for go_grid. We have now our method implemented, so now it's time to add our 3 additional columns. ...