• Home
  • About me
  • FALV
  • ALV Grid in the nutshell
    • Basic Information
    • Field catalog
  • Articles
    • Tricks
    • FALV (Fast ALV Grid)
    • ALV Grid in the nutshell
    • Tips
    • How to...
    • For beginners
    • Thoughts
  • By Topic
    • ALV
    • ALV OO
    • SALV
    • GOS
    • Selection screen
    • Purchase Requisitions
    • Purchase Orders
    • Attachments
    • Others
    • Characteristics
    • Sample Programs
    • ZIP
    • OLE
    • Mails
    • Routings
    • EWB
    • Excel
  • Keywords
  • RSS
  • Download
  • Home
  • Articles
  • FALV (Fast ALV Grid)

ZCL_FALV_DYNAMIC_STATUS - for full screen or popup

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
10 January 2016
Hits: 8666
Tags: FALV
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. 
 
This class is based on article about Dynamic GUI Status & Tittle but was included directly into FALV and updated to keep the logic of it. in ZDEMO_FALV03 and ZDEMO_FALV04 you can find example of usage of fully and partly dynamic GUI. Bellow short description of some attributes and methods.
 
  • Constants
  • ADD_BUTTON
  • HIDE_BUTTON
  • SHOW_BUTTON
  • ADD_SEPARATOR
  • FULLY_DYNAMIC
 

Constants

Please use this constants while adding, hiding, showing buttons in GUI Status. For fully dynamic GUI you can use all 35 slots, for partially dynamic version you can use up to 19 slots.

    constants: b_01            type sy-ucomm value 'F01',
               b_02            type sy-ucomm value 'F02',
               b_03            type sy-ucomm value 'F03',
               b_04            type sy-ucomm value 'F04',
               b_05            type sy-ucomm value 'F05',
               b_06            type sy-ucomm value 'F06',
               b_07            type sy-ucomm value 'F07',
               b_08            type sy-ucomm value 'F08',
               b_09            type sy-ucomm value 'F09',
               b_10            type sy-ucomm value 'F10',
               b_11            type sy-ucomm value 'F11',
               b_12            type sy-ucomm value 'F12',
               b_13            type sy-ucomm value 'F13',
               b_14            type sy-ucomm value 'F14',
               b_15            type sy-ucomm value 'F15',
               b_16            type sy-ucomm value 'F16',
               b_17            type sy-ucomm value 'F17',
               b_18            type sy-ucomm value 'F18',
               b_19            type sy-ucomm value 'F19',
               b_20            type sy-ucomm value 'F20',
               b_21            type sy-ucomm value 'F21',
               b_22            type sy-ucomm value 'F22',
               b_23            type sy-ucomm value 'F23',
               b_24            type sy-ucomm value 'F24',
               b_25            type sy-ucomm value 'F25',
               b_26            type sy-ucomm value 'F26',
               b_27            type sy-ucomm value 'F27',
               b_28            type sy-ucomm value 'F28',
               b_29            type sy-ucomm value 'F29',
               b_30            type sy-ucomm value 'F30',
               b_31            type sy-ucomm value 'F31',
               b_32            type sy-ucomm value 'F32',
               b_33            type sy-ucomm value 'F33',
               b_34            type sy-ucomm value 'F34',
               b_35            type sy-ucomm value 'F35'.

ADD_BUTTON

Use this method to add buttons to GUI STATUS in any place of the code. Changes are visible after next PBO event.
 
IV_BUTTON Button function code, please use one of constants B_xx.
IV_TEXT Optional - button text
IV_ICON Optional - button icon
IV_QINFO Optional - tooltip for button
IV_ALLOWED Optional - Button is enabled (in default abap_true)

    methods: add_button importing  value(iv_button)  type sy-ucomm
                                   value(iv_text)    type smp_dyntxt-text optional
                                   value(iv_icon)    type smp_dyntxt-icon_id optional
                                   value(iv_qinfo)   type smp_dyntxt-quickinfo optional
                                   value(iv_allowed) type abap_bool default abap_true
                        exceptions
                                   button_already_filled
                                   button_does_not_exists
                                   icon_and_text_empty.

HIDE_BUTTON

This method hides the button on GUI STATUS. Pass only button slot (constant B_xx to it).

    methods: hide_button importing value(iv_button) type sy-ucomm.

SHOW_BUTTON

If button was hidden using HIDE_BUTTON method or it was not allowed when adding to toolbar, then you can use SHOW_BUTTON method to make it visible. Pass only button slot (constant B_xx to it).

    methods: show_button importing value(iv_button) type sy-ucomm.

ADD_SEPARATOR

This method adds separator kind button to GUI status. In fact there is no possibility to add separator dynamically but we can pass button with empty text and icon, and this is what this method is doing.

    methods: add_separator importing  value(iv_button)  type sy-ucomm.

FULLY_DYNAMIC

This global variable determines if GUI Status is fully dynamic or not. On a base of it different GUI STATUSES are used in PBO of full screen FALV. Example of usage are in demo programs.

    data: fully_dynamic type abap_bool.

 
Add a comment

ZCL_FALV_LAYOUT - layout settings

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
10 January 2016
Hits: 9879
Tags: FALV
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. 
 
Layout class is based on the same principals like Column class. You will find here set methods for each layout field. Directly after calling layout methods, set_frontend Layout is called. Additionally layout class contains name of "mark field" if it was set. Like in Column class, you can use it before or after using display method.
 
 
Demo of the usage you can find in ZDEMO_FALV06.
 
 

    data: mark_field type lvc_fname read-only.
  
    methods set_zebra importing value(iv_value) type lvc_zebra .
    methods set_edit importing value(iv_value) type lvc_edit .
    methods set_edit_mode importing value(iv_value) type lvc_edmo .
    methods set_no_keyfix importing value(iv_value) type lvc_nokfix .
    methods set_frontend importing value(iv_value) type lvc_front .
    methods set_object_key importing value(iv_value) type bds_typeid .
    methods set_doc_id importing value(iv_value) type bds_docid .
    methods set_template importing value(iv_value) type bds_filena .
    methods set_language importing value(iv_value) type lang .
    methods set_graphics importing value(iv_value) type guid_32 .
    methods set_smalltitle importing value(iv_value) type lvc_titsz .
    methods set_no_hgridln importing value(iv_value) type lvc_hgrid .
    methods set_no_vgridln importing value(iv_value) type lvc_vgrid .
    methods set_no_headers importing value(iv_value) type lvc_heads .
    methods set_no_merging importing value(iv_value) type lvc_merge .
    methods set_cwidth_opt importing value(iv_value) type lvc_cwo .
    methods set_totals_bef importing value(iv_value) type lvc_totbef .
    methods set_no_totarr importing value(iv_value) type char01 .
    methods set_no_totexp importing value(iv_value) type char01 .
    methods set_no_rowmove importing value(iv_value) type char01 .
    methods set_no_rowins importing value(iv_value) type char01 .
    methods set_no_colexpd importing value(iv_value) type char01 .
    methods set_no_f4 importing value(iv_value) type char01 .
    methods set_countfname importing value(iv_value) type lvc_fname .
    methods set_col_opt importing value(iv_value) type char01 .
    methods set_val_data importing value(iv_value) type char01 .
    methods set_blob_scope importing value(iv_value) type salv_bs_blob_scope .
    methods set_blob_flavour importing value(iv_value) type salv_bs_blob_flavour .
    methods set_blob_name importing value(iv_value) type salv_bs_blob_name .
    methods set_blob_key importing value(iv_value) type slis_blob_key .
    methods set_blob_type importing value(iv_value) type slis_blob_type .
    methods set_stylefname importing value(iv_value) type lvc_fname .
    methods set_no_rowmark importing value(iv_value) type lvc_rowmk .
    methods set_no_toolbar importing value(iv_value) type lvc_toolb .
    methods set_grid_title importing value(iv_value) type lvc_title .
    methods set_sel_mode importing value(iv_value) type lvc_libox .
    methods set_box_fname importing value(iv_value) type lvc_fname .
    methods set_sgl_clk_hd importing value(iv_value) type lvc_sglclh .
    methods set_no_totline importing value(iv_value) type lvc_nototl .
    methods set_numc_total importing value(iv_value) type lvc_numcto .
    methods set_no_utsplit importing value(iv_value) type lvc_unitsp .
    methods set_excp_fname importing value(iv_value) type lvc_exfnm .
    methods set_excp_rolln importing value(iv_value) type lvc_exrol .
    methods set_excp_conds importing value(iv_value) type lvc_excon .
    methods set_excp_led importing value(iv_value) type lvc_exled .
    methods set_excp_group importing value(iv_value) type lvc_exgrp .
    methods set_detailinit importing value(iv_value) type lvc_detini .
    methods set_detailtitl importing value(iv_value) type lvc_dettit .
    methods set_keyhot importing value(iv_value) type lvc_keyhot .
    methods set_no_author importing value(iv_value) type lvc_noauth .
    methods set_xifunckey importing value(iv_value) type aqs_xikey .
    methods set_xidirect importing value(iv_value) type flag .
    methods set_s_dragdrop importing value(iv_value) type lvc_s_dd01 .
    methods set_info_fname importing value(iv_value) type lvc_cifnm .
    methods set_ctab_fname importing value(iv_value) type lvc_ctfnm .
    methods set_weblook importing value(iv_value) type lvc_look .
    methods set_webstyle importing value(iv_value) type lvc_style .
    methods set_webrows importing value(iv_value) type lvc_webrow .
    methods set_webxwidth importing value(iv_value) type int4 .
    methods set_webxheight importing value(iv_value) type int4 .
 

 
 
Add a comment

ZCL_FALV_COLUMN - column (fcat) settings

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
10 January 2016
Hits: 11821
Tags: FALV
Column class was created to be able modify faster the settings of field catalog at any place and time. Each field of field catalog has it set method with only one parameter IV_VALUE which type is equal to the field type. Additionally there are two methods set_editable and set_readonly which calls set_edit function with proper value. Example of usage you can find in ZDEMO_FALV07.
 
If you'll look into ZCL_FALV class then you'll see that you have direct access fcat table where all field catalog settings are store.  When you'll update this table before using display method then it would work as you expected but once you've displayed results and you modify fcat table then you need to use method set_frontend_fieldcatalog to affect grid object. That's why if you'll use Column object then this method is called directly. 
 
 

    methods set_editable .
    methods set_readonly .
    methods set_row_pos
      importing
        value(iv_value) type lvc_rowpos .
    methods set_col_pos
      importing
        value(iv_value) type lvc_colpos .
    methods set_fieldname
      importing
        value(iv_value) type lvc_fname .
    methods set_tabname
      importing
        value(iv_value) type lvc_tname .
    methods set_currency
      importing
        value(iv_value) type lvc_curr .
    methods set_cfieldname
      importing
        value(iv_value) type lvc_cfname .
    methods set_quantity
      importing
        value(iv_value) type lvc_quan .
    methods set_qfieldname
      importing
        value(iv_value) type lvc_qfname .
    methods set_ifieldname
      importing
        value(iv_value) type lvc_fname .
    methods set_round
      importing
        value(iv_value) type lvc_round .
    methods set_exponent
      importing
        value(iv_value) type lvc_expont .
    methods set_key
      importing
        value(iv_value) type lvc_key .
    methods set_key_sel
      importing
        value(iv_value) type lvc_keysel .
    methods set_icon
      importing
        value(iv_value) type lvc_icon .
    methods set_symbol
      importing
        value(iv_value) type lvc_symbol .
    methods set_checkbox
      importing
        value(iv_value) type lvc_checkb .
    methods set_just
      importing
        value(iv_value) type lvc_just .
    methods set_lzero
      importing
        value(iv_value) type lvc_lzero .
    methods set_no_sign
      importing
        value(iv_value) type lvc_nosign .
    methods set_no_zero
      importing
        value(iv_value) type lvc_nozero .
    methods set_no_convext
      importing
        value(iv_value) type lvc_noconv .
    methods set_edit_mask
      importing
        value(iv_value) type lvc_edtmsk .
    methods set_emphasize
      importing
        value(iv_value) type lvc_emphsz .
    methods set_color
      importing
        value(iv_value) type lvc_emphsz .
    methods set_fix_column
      importing
        value(iv_value) type lvc_fixcol .
    methods set_do_sum
      importing
        value(iv_value) type lvc_dosum .
    methods set_no_sum
      importing
        value(iv_value) type lvc_nosum .
    methods set_no_out
      importing
        value(iv_value) type lvc_noout .
    methods set_tech
      importing
        value(iv_value) type lvc_tech .
    methods set_outputlen
      importing
        value(iv_value) type lvc_outlen .
    methods set_convexit
      importing
        value(iv_value) type convexit .
    methods set_seltext
      importing
        value(iv_value) type lvc_txt .
    methods set_tooltip
      importing
        value(iv_value) type lvc_tip .
    methods set_rollname
      importing
        value(iv_value) type lvc_roll .
    methods set_datatype
      importing
        value(iv_value) type datatype_d .
    methods set_inttype
      importing
        value(iv_value) type inttype .
    methods set_intlen
      importing
        value(iv_value) type intlen .
    methods set_lowercase
      importing
        value(iv_value) type lowercase .
    methods set_reptext
      importing
        value(iv_value) type reptext .
    methods set_hier_level
      importing
        value(iv_value) type lvc_hierl .
    methods set_reprep
      importing
        value(iv_value) type lvc_crprp .
    methods set_domname
      importing
        value(iv_value) type domname .
    methods set_sp_group
      importing
        value(iv_value) type lvc_spgrp .
    methods set_hotspot
      importing
        value(iv_value) type lvc_hotspt .
    methods set_dfieldname
      importing
        value(iv_value) type lvcdbgfn .
    methods set_col_id
      importing
        value(iv_value) type lvc_colid .
    methods set_f4availabl
      importing
        value(iv_value) type ddf4avail .
    methods set_auto_value
      importing
        value(iv_value) type lvc_auto .
    methods set_checktable
      importing
        value(iv_value) type tabname .
    methods set_valexi
      importing
        value(iv_value) type valexi .
    methods set_web_field
      importing
        value(iv_value) type lvc_fname .
    methods set_href_hndl
      importing
        value(iv_value) type int4 .
    methods set_style
      importing
        value(iv_value) type lvc_style .
    methods set_style2
      importing
        value(iv_value) type lvc_style .
    methods set_style3
      importing
        value(iv_value) type lvc_style .
    methods set_style4
      importing
        value(iv_value) type lvc_style .
    methods set_drdn_hndl
      importing
        value(iv_value) type int4 .
    methods set_drdn_field
      importing
        value(iv_value) type lvc_fname .
    methods set_no_merging
      importing
        value(iv_value) type char01 .
    methods set_h_ftype
      importing
        value(iv_value) type lvc_ftype .
    methods set_col_opt
      importing
        value(iv_value) type lvc_colopt .
    methods set_no_init_ch
      importing
        value(iv_value) type char01 .
    methods set_drdn_alias
      importing
        value(iv_value) type char01 .
    methods set_decfloat_style
      importing
        value(iv_value) type outputstyle .
    methods set_parameter0
      importing
        value(iv_value) type char30 .
    methods set_parameter1
      importing
        value(iv_value) type char30 .
    methods set_parameter2
      importing
        value(iv_value) type char30 .
    methods set_parameter3
      importing
        value(iv_value) type char30 .
    methods set_parameter4
      importing
        value(iv_value) type char30 .
    methods set_parameter5
      importing
        value(iv_value) type int4 .
    methods set_parameter6
      importing
        value(iv_value) type int4 .
    methods set_parameter7
      importing
        value(iv_value) type int4 .
    methods set_parameter8
      importing
        value(iv_value) type int4 .
    methods set_parameter9
      importing
        value(iv_value) type int4 .
    methods set_ref_field
      importing
        value(iv_value) type lvc_rfname .
    methods set_ref_table
      importing
        value(iv_value) type lvc_rtname .
    methods set_txt_field
      importing
        value(iv_value) type lvc_fname .
    methods set_roundfield
      importing
        value(iv_value) type lvc_rndfn .
    methods set_decimals_o
      importing
        value(iv_value) type lvc_decmls .
    methods set_decmlfield
      importing
        value(iv_value) type lvc_dfname .
    methods set_dd_outlen
      importing
        value(iv_value) type lvc_ddlen .
    methods set_decimals
      importing
        value(iv_value) type decimals .
    methods set_coltext
      importing
        value(iv_value) type lvc_txtcol .
    methods set_scrtext_l
      importing
        value(iv_value) type scrtext_l .
    methods set_scrtext_m
      importing
        value(iv_value) type scrtext_m .
    methods set_scrtext_s
      importing
        value(iv_value) type scrtext_s .
    methods set_colddictxt
      importing
        value(iv_value) type lvc_ddict .
    methods set_selddictxt
      importing
        value(iv_value) type lvc_ddict .
    methods set_tipddictxt
      importing
        value(iv_value) type lvc_ddict .
    methods set_edit
      importing
        value(iv_value) type lvc_edit .
    methods set_tech_col
      importing
        value(iv_value) type lvc_tcol .
    methods set_tech_form
      importing
        value(iv_value) type lvc_tform .
    methods set_tech_comp
      importing
        value(iv_value) type lvc_tcomp .
    methods set_hier_cpos
      importing
        value(iv_value) type lvchcolpos .
    methods set_h_col_key
      importing
        value(iv_value) type tv_itmname .
    methods set_h_select
      importing
        value(iv_value) type lvc_select .
    methods set_dd_roll
      importing
        value(iv_value) type rollname .
    methods set_dragdropid
      importing
        value(iv_value) type lvc_ddid .
    methods set_mac
      importing
        value(iv_value) type char01 .
    methods set_indx_field
      importing
        value(iv_value) type int4 .
    methods set_indx_cfiel
      importing
        value(iv_value) type int4 .
    methods set_indx_qfiel
      importing
        value(iv_value) type int4 .
    methods set_indx_ifiel
      importing
        value(iv_value) type int4 .
    methods set_indx_round
      importing
        value(iv_value) type int4 .
    methods set_indx_decml
      importing
        value(iv_value) type int4 .
    methods set_get_style
      importing
        value(iv_value) type char01 .
    methods set_mark
      importing
        value(iv_value) type char01 .

 
 
 
Add a comment

ZCL_FALV - explanation of main methods and attributes

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
09 January 2016
Hits: 19394
Tags: FALV

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. 

ZCL_FALV is the main class of whole FALV. Everything starts here. Bellow you can find some description of main methods and attributes which are made in this class.

Methods: 

  • CREATE
  • CREATE_BY_COPY
  • LVC_FCAT_FROM_ITAB
  • DISPLAY
  • EXCLUDE_FUNCTION
  • COLUMN
  • SOFT_REFRESH
  • SET_MARK_FIELD
  • SET_EDITABLE
  • SET_READONLY
  • ADD_BUTTON
  • DISABLE_BUTTON
  • ENABLE_BUTTON
  • DELETE_BUTTON
  • SET_CELL_DISABLED
  • SET_CELL_ENABLED
  • SET_CELL_BUTTON
  • SET_CELL_HOTSPOT
  • SET_ROW_COLOR
  • SET_CELL_COLOR
  • MASS_REPLACE
  • EVT_BUTTON_CLICK_FALV
  • EVT_USER_COMMAND
  • EVT_HOTSPOT_CLICK
  • EVT_DATA_CHANGED
  • EVT_DATA_CHANGED_FINISHED
  • EVT_DOUBLE_CLICK
  • EVT_ONF1
  • EVT_ONF4
  • EVT_SUBTOTAL_TEXT
  • EVT_BEFORE_USER_COMMAND
  • EVT_AFTER_USER_COMMAND
  • EVT_MENU_BUTTON
  • EVT_TOOLBAR
  • EVT_AFTER_REFRESH
  • EVT_AT_SET_PF_STATUS
  • EVT_AT_SET_TITLE
Add a comment
Read more ...

ZDEMO_FALV14 - Popup calls

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
06 January 2016
Hits: 8714
Tags: FALV
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. 
 
You can call FALV also as popup. When you mark FALV as popup version then you can use default size or you can customize size. This demo shows how.

"! This is demo for FALV standard fast call of pppup
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv14.

data: sflight type standard table of sflight.


parameters: p_defau  radiobutton group gr1 default 'X',
            p_set    radiobutton group gr1,
            p_rowst  type i,
            p_rowend type i,
            p_colst  type i,
            p_colend type i.

start-of-selection.


  select * up to 100 rows
  into corresponding fields of table @sflight
  from sflight.

  "FALV creation with only table passed
  data(falv) = zcl_falv=>create( exporting i_popup = abap_true changing ct_table = sflight ).

  "Add title variable
  falv->title_v1 = 'ZDEMO_FALV14'.

  if p_defau eq abap_true.
    "Display popup with default size
    falv->display( ).
  else.
    "display popup with customized size
    falv->display(
        iv_start_row    = p_rowst
        iv_start_column = p_colst
        iv_end_row      = p_rowend
        iv_end_column   = p_colend
    ).
  endif.

Add a comment
Read more ...

ZDEMO_FALV13 - Mix demo + own screen and container

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
06 January 2016
Hits: 8133
Tags: FALV
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. 
 
This demo uses few of previous demo examples + at the end it calls screen 0100 which has container CC_MAIN and they are used to create last FALV. So you have choice, you can use full screen FALV or you can place it in any container you want.

"! This is demo for FALV Mix Demo. It contains many features, many FALVs in one program
"! and a usage of a own screen with own container and FALV
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv13.

types: begin of t_sflight.
       include type sflight.
types: style type lvc_t_styl,
       end of t_sflight.

data: sflight type standard table of t_sflight.
select * up to 100 rows into corresponding fields of table @sflight
  from sflight.

class lcl_test definition inheriting from zcl_falv.
  public section.

  protected section.
    methods evt_at_set_title redefinition.
  private section.

endclass.

class lcl_test implementation.

  method evt_at_set_title.

  endmethod.

endclass.

data: falv_screen type ref to lcl_test.
data: ok_code type sy-ucomm.


start-of-selection.
  "creation of falv with local redefinition
  data falv_redef type ref to lcl_test.
  falv_redef ?= lcl_test=>create( exporting i_applog_embedded = abap_false  i_popup = abap_true
                              i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' )
                              changing ct_table = sflight    ) .

  falv_redef->add_button(
    exporting
      iv_function  = 'F111'
      iv_icon      = icon_refresh
      iv_butn_type = zcl_falv=>button_normal
  ).
  falv_redef->delete_button( zcl_falv=>mc_fc_detail ).
  falv_redef->display( ).
  "creation of standard falv
  data(falv_stand) = zcl_falv=>create( exporting i_applog_embedded = abap_true changing ct_table = sflight   ).

  falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_15
      iv_text                = 'F15'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
    falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_16
      iv_text                = 'F16'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

    falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_17
      iv_text                = 'F17'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

      falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_18
      iv_text                = 'F18'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

      falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_19
      iv_text                = 'F19'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

      falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_13
      iv_text                = 'F13'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

    falv_stand->gui_status->add_button(
    exporting
      iv_button              = falv_stand->gui_status->b_14
      iv_text                = 'F14'
      iv_icon                = icon_refresh
      iv_qinfo               = 'Test d'
      iv_allowed             = abap_true
    exceptions
      button_already_filled  = 1
      button_does_not_exists = 2
      icon_and_text_empty    = 3
      others                 = 4
  ).
  if sy-subrc <> 0.
*   message id sy-msgid type sy-msgty number sy-msgno
*              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.


  falv_stand->display( ).

 "copy of standard falv + some changes of descriptions
  data(falv_stand_copy) = falv_stand->create_by_copy(  ).
  falv_stand_copy->column( 'CARRID' )->set_scrtext_l( 'test' ).
  falv_stand_copy->column( 'CARRID' )->set_scrtext_m( 'test' ).
  falv_stand_copy->column( 'CARRID' )->set_scrtext_s( 'test' ).
  falv_stand_copy->column( 'CARRID' )->set_reptext( 'test' ).
  falv_stand_copy->variant-report = sy-repid.
  falv_stand_copy->layout_save = 'X'.
  falv_stand_copy->layout->set_zebra( abap_true  ).
  falv_stand_copy->display( ).

  "copy of falv with own local redefinitions
  data(falv_redef_copy) = falv_redef->create_by_copy(  ).
  falv_redef_copy->display( ).

  falv_stand->display( ).

  falv_stand_copy->display( ).

  falv_redef_copy->column( 'SEATSMAX' )->set_edit( abap_true ).
  falv_redef_copy->layout->set_edit( abap_true ).
  falv_redef_copy->set_editable( ).
  falv_redef_copy->layout->set_stylefname( 'STYLE' ).
  falv_redef_copy->set_cell_disabled(
    exporting
      iv_fieldname = 'SEATSMAX'
      iv_row       = 1
  ).
  falv_redef_copy->add_button(
    exporting
      iv_function  = zcl_falv=>fc_mass_replace
      iv_icon      = icon_replace
  ).
  falv_redef_copy->refresh_table_display( ).
  falv_redef_copy->display( ).

  falv_stand->display( ).

  falv_redef_copy->display( ).

  call screen 100.
*&---------------------------------------------------------------------*
*&      Module  PBO  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module pbo output.
  set pf-status 'DYNAMIC_STATUS_PART' of program 'SAPLZFALV'.
  if falv_screen is initial.
    falv_screen ?= lcl_test=>create( exporting
      i_parent = new cl_gui_custom_container( container_name = 'CC_MAIN' )
      i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' )
      changing ct_table = sflight    ) .
    falv_screen->column( 'CARRID' )->set_reptext( 'test' ).
    falv_screen->display( ).
  endif.
endmodule.

module pai input.
  falv_screen->pai(
    exporting
      iv_dynnr = sy-dynnr
    changing
      c_ucomm  = ok_code
  ).

endmodule.

Add a comment
Read more ...

ZDEMO_FALV12 - Error log

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
06 January 2016
Hits: 18088
Tags: FALV
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. 
 
In standard ALV when you don't pass a container for a log then a popup with errors appears when you enter wrong data to cell. FALV allows you to use built-in split container which will show errors only when they appear and directly when the errors are gone, also container of errors is hidden. Check out the video.

"! This is demo for FALV with error log
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv12.

data: sflight type standard table of sflight.


parameters: p_embeed radiobutton group gr1 default 'X',
            p_notemb radiobutton group gr1.


start-of-selection.


  select * up to 100 rows
  into corresponding fields of table @sflight
  from sflight.

  "FALV creation with only table passed

  if p_embeed eq abap_true.
   data(falv) = zcl_falv=>create( exporting i_applog_embedded = abap_true  changing ct_table = sflight ).
  else.
   falv = zcl_falv=>create( changing ct_table = sflight ).
  endif.
  "Add title variable
  falv->title_v1 = 'ZDEMO_FALV12'.

    "set whole grid editable
   falv->layout->set_edit( abap_true ).
    "Change grid to edit mode
  falv->set_editable( iv_modify = abap_true ).

  "Display full screen grid
  falv->display( ).

Add a comment
Read more ...

ZDEMO_FALV11 - Editable Grid settings

Details
Łukasz Pęgiel
FALV (Fast ALV Grid)
06 January 2016
Hits: 17081
Tags: FALV
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. 
 
There are 3 ways to make 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
"! done by Lukasz Pegiel for http://abapblog.com
report zdemo_falv11.

types: begin of t_sflight.
        include type sflight.
types:  styles type lvc_t_styl,
        end of t_sflight.

data: sflight type standard table of t_sflight.


parameters: p_whole  radiobutton group gr1 default 'X',
            p_column radiobutton group gr1,
            p_cell   radiobutton group gr1.


start-of-selection.


  select * up to 100 rows
  into corresponding fields of table @sflight
  from sflight.

  "FALV creation with only table passed
  data(falv) = zcl_falv=>create( changing ct_table = sflight ).

  "Add title variable
  falv->title_v1 = 'ZDEMO_FALV11'.

  if p_whole eq abap_true.
    "set whole grid editable
    falv->layout->set_edit( abap_true ).
  elseif p_column eq abap_true.
    falv->column( 'SEATSMAX' )->set_edit( abap_true ).
    falv->column( 'PLANETYPE' )->set_edit( abap_true ).
  else.
    "Set style column name
    falv->layout->set_stylefname( 'STYLES' ).
    do 20 times.
      falv->set_cell_enabled(
        exporting
          iv_fieldname = 'FLDATE'
          iv_row       = 2 * sy-index
          ).
    enddo.
  endif.

  "Change grid to edit mode
  falv->set_editable( iv_modify = abap_true ).

  "Display full screen grid
  falv->display( ).

Add a comment
Read more ...

More Articles ...

  1. ZDEMO_FALV10 - Color Settings
  2. ZDEMO_FALV09 - Cell settings
  3. ZDEMO_FALV08 - Mass replace function
  4. ZDEMO_FALV07 - Columns (field catalog) settings
Page 1 of 3
  • Start
  • Prev
  • 1
  • 2
  • 3
  • Next
  • End


Łukasz Pęgiel
GUI ALV GRID RSFUNC TXT ABAP Code Retreat Tychy 2019 - Organizer Recap READ TEXT LVC FCAT ALV GRID SAP TechEd Developer Hero 2016 ABAP IXML ENCODING DELETE MTK EXTEND PROGRAM RUNTIME ESDUS Creating editor for dynamic code SE38 like ALV Grid in the nutshell Field catalog - col id - ALV control Column ID FALV USER SETTINGS Field catalog - round COMPONENTS MAINTAIN ALV GRID IN THE NUTSHELL FIELDCATALOG QFIELDNAME MB51 ATC Pseudo Comments list SCMS XSTRING BINARY SALV UTIL LOAD COMPLEX BOM TABLE PLUGIN TOTEXP UPDATE PREPARE SET SELSCREEN STATUS Field catalog - fix column CVIC MAP CONTACT OBJECTS MESSAGE HANDLER EXPORT TO MEMORY ID COC1 FEATURE CHECK Mass replace popup for ALV grid UI2 JSON DFIELDNANE Field catalog - qfieldname ZDEMO FALV07 - Columns field catalog settings GROUP SELECT INTLEN FALV Fast ALV Grid - First blood TOTLINE Field catalog - domname - Domain name GET GLOBALS FROM SLVC FULLSCR MB51 ENHANCEMENT SYNTAX-CHECK FALV01 - Standard full screen FALV ADT QM ATTACHMENTS COMMIT WORK VL473 ZIP PROGRESS INDICATOR SAVE Classifications - Part 4 - example of use CFIELDNAME MEREQS
  • Laserowe usuwanie blizn Tychy
  • Laserowe usuwanie zmarszczek Tychy
  • Salon Kosmetyczny Tychy
  • Trycholog Tychy
  • Wypadanie włosów Tychy
Tweets by abapblog

Eclipse Plugins for ABAP

ABAP Favorites

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP ADT Extensions

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP Quick Fixes

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

 

Latest Articles

  • ABAP in Eclipse - Install, Configure, Use, and Enhance Your ADT
  • ALV Grid in the nutshell: Field catalog - col_id - ALV control: Column ID
  • ALV Grid in the nutshell: Field catalog - dfieldname – Fieldname for column group
  • ALV Grid in the nutshell: Field catalog - Hotspot - ALV control: SingleClick-sensitive
  • ALV Grid in the nutshell: Field catalog - sp_group - Group key
  • ALV Grid in the nutshell: Field catalog - domname - Domain name
  • ALV Grid in the nutshell: Field catalog - reprep - ALV control: Value is selection criterion for rep./rep.intf.
  • ALV Grid in the nutshell: Field catalog - reptext – Heading
  • ALV Grid in the nutshell: Field catalog - lowercase - Lowercase letters allowed/not allowed
  • ALV Grid in the nutshell: Field catalog - intlen - Internal Length in Bytes
  • Downloading Exchange Rates from NBP (National Bank of Poland)
  • Downloading Exchange Rates from Central Bank of Turkey
  • ABAP Extensions - Automatic Logon
  • ALV Grid in the nutshell: Field catalog - inttype - ABAP data type (C,D,N,...)
  • ALV Grid in the nutshell: Field catalog - datatype

Most Read

  • Create XLSX/MHTML file from internal table in background
  • Refresh ALV GRID and keep position and current cell
  • Create XLSX file from internal table in background v2
  • FALV (Fast ALV Grid)
  • Call standard F4 search help with customized parameters
  • ATC Pseudo Comments list
  • Dynamic GUI STATUS & TITLE with ABAP code
  • Create fieldcatalog from internal table
  • Link Attachments of Purchase Requisition to Purchase Order
  • GOS - How to add business documents at creation of object
  • Endless loop in BADI ME_PROCESS_PO_CUST
  • Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  • How to access private or protected data and methods of CL_GUI_ALV_GRID
  • Subtotal lines of ALV GRID OO as content separator
  • Popup with multi-select ALV

Latest Comments

ABAP code and articles provided on http://abapblog.com, if it is not statet otherwise, were created by Łukasz Pęgiel. You can use the code in your SAP instance for commercial and non-commercial use without any warranty from side of the author. You cannot sell the code as a full program or a part of it.
Replicating of the articles and code is prohibited unless the agreement of the author is given to you. 

Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.