1 1 1 1 1 Rating 0% (0 Votes)
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

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.

    constantsb_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)

    methodsadd_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_allowedtype 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).

    methodshide_button importing value(iv_buttontype 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).

    methodsshow_button importing value(iv_buttontype 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.

    methodsadd_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.

    datafully_dynamic type abap_bool.

 

1 1 1 1 1 Rating 0% (0 Votes)
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.
 
 

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

 
 

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

 
 
 

5 1 1 1 1 1 Rating 100% (1 Vote)
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: 

Read more ...

1 1 1 1 1 Rating 0% (0 Votes)
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.

datasflight type standard table of sflight.


parametersp_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(falvzcl_falv=>createexporting 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.

Read more ...

1 1 1 1 1 Rating 0% (0 Votes)
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.

typesbegin of t_sflight.
       include type sflight.
typesstyle type lvc_t_styl,
       end of t_sflight.

datasflight 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.

datafalv_screen type ref to lcl_test.
dataok_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=>createexporting i_applog_embedded abap_false  i_popup abap_true
                              i_subclass cl_abap_classdescr=>describe_by_namep_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_buttonzcl_falv=>mc_fc_detail ).
  falv_redef->display).
  "creation of standard falv
  data(falv_standzcl_falv=>createexporting 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_copyfalv_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_zebraabap_true  ).
  falv_stand_copy->display).

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

  falv_stand->display).

  falv_stand_copy->display).

  falv_redef_copy->column'SEATSMAX' )->set_editabap_true ).
  falv_redef_copy->layout->set_editabap_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=>createexporting
      i_parent new cl_gui_custom_containercontainer_name 'CC_MAIN' )
      i_subclass cl_abap_classdescr=>describe_by_namep_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.

Read more ...

1 1 1 1 1 Rating 0% (0 Votes)
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.

datasflight type standard table of sflight.


parametersp_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(falvzcl_falv=>createexporting i_applog_embedded abap_true  changing ct_table sflight ).
  else.
   falv zcl_falv=>createchanging ct_table sflight ).
  endif.
  "Add title variable
  falv->title_v1 'ZDEMO_FALV12'.

    "set whole grid editable
   falv->layout->set_editabap_true ).
    "Change grid to edit mode
  falv->set_editableiv_modify abap_true ).

  "Display full screen grid
  falv->display).

Read more ...

1 1 1 1 1 Rating 0% (0 Votes)
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.

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

datasflight type standard table of t_sflight.


parametersp_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(falvzcl_falv=>createchanging ct_table sflight ).

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

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

  "Change grid to edit mode
  falv->set_editableiv_modify abap_true ).

  "Display full screen grid
  falv->display).

Read more ...
Page 1 of 3