fidley / falv

FALV - Fast ALV Grid
https://abapblog.com
GNU General Public License v3.0
144 stars 53 forks source link

New Methods #29

Closed ferenci closed 7 years ago

ferenci commented 7 years ago

Hi, in my system i added some code into class ZCL_FALV_COLUMN you also may find it usefull, i am not very familiar with git methodology so i will write here : method get_setting : parameter rv_value has type type ref to data.

 FIELD-SYMBOLS: <fcat> LIKE LINE OF falv->fcat.

  falv->get_frontend_fieldcatalog( IMPORTING et_fieldcatalog = falv->fcat ).
  READ TABLE falv->fcat ASSIGNING <fcat> WITH KEY fieldname = fieldname.

  IF sy-subrc EQ 0.
    DATA: fcat_field TYPE string.
    FIELD-SYMBOLS: <field> TYPE any.
    fcat_field = |<fcat>-{ iv_setting }|.
    ASSIGN (fcat_field) TO <field>.
    get REFERENCE OF <field> INTO rv_value.
  ENDIF.

also method is_edit: to check if column is editable.

  data:dref type REF TO data.
  FIELD-SYMBOLS: <fs> type any.
  dref = get_setting( iv_setting = 'EDIT' ).
  ASSIGN dref->* to <fs>.
  CHECK sy-subrc eq 0.
  rv_value = <fs>.

Also i wrote on your FALV blog about method evf_ucomm_internal, with the function "select all" which selecting all lines even if some of the mark fields disabled via "styles" column. Methods above may be helpful.

fidley commented 7 years ago

Thanks a lot, I already started to prepare the coffee for getters as well and is_editable method some days ago ( seems we're on the same track 😀 ) I'll finish this when I'm back from Germany next week.

Cheers

fidley commented 7 years ago

Text correction :) I started to prepare code not coffee :)

fidley commented 7 years ago

Done with release v740.1.0.12. Nugget can be found in releases or you can use abapGit to download the changes.

The method for checking if cell is editable is called get_cell_enabled.

ferenci commented 7 years ago

Wow. you replaced SAPLINK nuggets with pure abap code. That's cool.

fidley commented 7 years ago

It's not me its abapGit :) So you can code inside your system and then push changes to github repository. This files are created/updated automatically :)