fidley / falv Goto Github PK
View Code? Open in Web Editor NEWFALV - Fast ALV Grid
Home Page: https://abapblog.com
License: GNU General Public License v3.0
FALV - Fast ALV Grid
Home Page: https://abapblog.com
License: GNU General Public License v3.0
Adaptation latest source for ABAP 702/710.
Currently i install ZFALV_V731.1.0.3.nugg from https://abapblog.com/falv
But want to use latest version from github.
It's possible ?
Hello,
When I run, the program ZDEMO_FALV01 or other demo, I have this dump:
Error in the ABAP application program.
The current ABAP program "ZCL_FALV======================CP" had to be
terminated because it found a
statement that could not be executed.
In include "ZCL_FALV_COLUMN===============CM03U ", in line 15 of program
"ZCL_FALV_COLUMN===============CP ", the following syntax errors
have occurred:
Le type 'FIXVALUES' est inconnu.
In ZCL_FALV_COLUMN, method SET_DRDN_HNDL: lt_fixed_values TYPE cl_abap_elemdescr=>fixvalues
But fixvalues is not exist in class cl_abap_elemdescr.
I'm in SAP SAP_ABA 750 SP 0023.
Misha
Hi,
I am unable to set any ALV variant in my inherited FALV display. Also, there seems to be no option for disabling default layout.
Can you please suggest any workaround or what I may be doing wrong here?
Code for setting layout variant
O_FALV->SET_VARIANT( EXPORTING IS_VARIANT = VALUE #( REPORT = SY-REPID USERNAME = SY-UNAME VARIANT = 'ZUSER1' ) ).
If you create the FALV using a locally defined structure (TYPES: BEGIN OF ...) and use a data element which has a search help assignment, the cell displays the icon that F4 help is available but when pressing it, nothing happens. The reason for this is that fields REF_TABLE and REF_FIELD of the field catalog are empty.
There are (at least) two options to fix this:
First of all thanks again for this greatly class.
I´ve found a bug in the Mass replace functionality.
If we have a numeric column, and we try to replace it with a non numeric character a dump is thrown.
The dump is originated in function Z_FALV_MASS_REPLACE, in the assigment of the Mass Replace field screen to the ALV tab:
= -low.
I think this line can be commented as there is a few lines later a call to an ALV method to do the assigment again.
io_grid->set_delta_cells
What do you think?
Hi FALV-Team,
our company is now convert the ECC System to the S4/Hana System and now on a converted Sandbox.
Release: SAP_BASIS 756 0001 SAPK-75601INSAPBASIS SAP-Basiskomponente
The class ZCL_FALV has a syntax error in line 1694
Error Message:
Method CREATE_EX_RESULT_FALV
Casts between two incompatible references (to the types "CL_SALV_TABLE"
and "CL_SALV_MODEL") do not work. This kind of cast always produces a
runtime error.
Can you please help me
Best regards
Hi Łukasz,
Great job on making this development and by making it available for the community!
I have a question, after we use the editable ALV, how can we save changes made by an user?
Best Regards,
Luís
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.
Hi,
I missed this at method exclude_function :-)
r_falv = me.
Hi,
When setting the Long Text from Data Element as Fixed Header text via code:
O_FALV->COLUMN( DFIES-FIELDNAME )->SET_COLDDICTXT( 'L' ).
It does not work.
Whereas doing the same in SALV works
O_ALV->GET_COLUMNS( )->GET_COLUMN( DFIES-FIELDNAME )->SET_FIXED_HEADER_TEXT( 'L' ).
Update:
Came up with this workaround for now:
DATA(O_COLUMN) = O_FALV->COLUMN( DFIES-FIELDNAME ).
O_COLUMN->SET_OUTPUTLEN( CONV #( STRLEN( O_COLUMN->GET_SCRTEXT_L( ) ) ) ).
Hello! It needs to correct method create_by_type.
When calling a method create passing i_applog_embedded = abap_false
and
i_applog_embedded = abap_false
.
I think it sholud be like this:
rv_falv = zcl_falv=>create(
exporting
i_parent = i_parent
i_applogparent = i_applogparent
i_popup = i_popup
i_applog_embedded = i_applog_embedded
i_subclass = i_subclass
changing
ct_table = <table>
).
It's impossible to create object using necessary popup and applog_embedded parameters different from abap_false now.
Originally posted by RTagliento September 1, 2023
Hi Łukasz,
I tried to understand and do myself, but sorry without result.
I used FALV for a fast ALV popup, just for showing some data result..... the question is about the GREEN OK button....
If the user click on it.... nothing happens.
Maybe I miss something....... there is a way to hide it, and keep only the second "X" button that just close the popup?
Hello Łukasz,
Which saplink plugin for function group do you suggest to use? It seems that a plugin from saplink plugins daily nugget ( https://www.assembla.com/spaces/saplink-plugins/wiki ) has an issue with importing of CUA of the ZFALV function group.
Hello,
I'm just starting to use your FALV classes and it's an incredible work. Congratulations and thanks for share.
I'm strugling to set columns position on my editable alv on 740 system.
This is the fieldcatalog before setting up the order:
my set_col_pos call:
METHOD set_columns_order.
DATA lo_column TYPE REF TO zcl_falv_column.
DATA ld_index TYPE i.
lo_column = go_alv->column( 'STAT' )->set_col_pos( 1 ).
lo_column = go_alv->column( 'MATNR' )->set_col_pos( 2 ).
lo_column = go_alv->column( 'MAKTX' )->set_col_pos( 3 ).
ENDMETHOD. "set_columns_order.
And this is the resultant fieldcatalog:
It's that an issue? Or my mistake with the call?
Thanks a lot.
When you redefine "Display" method and inside of this method access "super->Display" FALV will jump into "endless loop execution".
Example below:
CLASS ZCL_TEST_FALV definition
public
inheriting from ZCL_FALV
final.
public section.
methods: DISPLAY redefinition.
ENDCLASS.
"Implementation:
CLASS ZCL_TEST_FALV IMPLEMENTATION.
METHOD DISPLAY.
raise event event_handler_set.
super->DISPLAY( ).
ENDMETHOD.
ENDCLASS.
Hi @fidley ,
currently i'm using falv for creating some report
i'm using IDR currency... but the amount still not reflected like using currency already referenced.. it should be times by 100 like JPY
please kindly assist.. is there something i missed?
it's also not working for quantity field
When using hotspot in salv or normal alv there is no need for the double click.
When using hotspot with falv a double click on the column is needed.
Why there's a different behavior? is it fixable?
Hello Team,
Greetings for the day..!
I am started using FLAV classes and it's amazing. Congratulation.
While using falv we come across below case, could you kindly check and let me know if we have already solution for this..!
Problem description:
There is an issue with ALVs default layout:
In case the screen is divided into more than one container, and each container hold separate ALV Grid.
Both grids with separate set of columns
If the user will define a default layout in one of them, then upon entering the screen the second one will disappear.
The cause of the problem is that there is a flaw in default layout functionality - it basically checks the report name and the screen number where it kicks in.
In mentioned case - we have 2 different ALVs with the same report name and screen number.
My guess is problem is while setting "VARIANT" parameters. Here we would need a differentiator to identify each ALV in same screen.
Hey,
thanks for this libary. It would be nice, to chain methods like this:
Instead of:
falv->column('NAME')->set_reptext('Name' ).
falv->column('NAME')->set_color('C110').
you could do:
falv->column('NAME')->set_reptext('Name' )->set_color('C110').
What do you think?
Regards,
Timo
I have following scenario. Main FALV grid with button that is creating popup with another FALV. On that popup there is button 'SAVE' allowing to save data from popup into DB. I've registered event handler to handle aforementioned SAVE button as follow:
SET HANDLER me->on_user_command FOR me->mo_license_list->mo_falv.
As you can see event handler is outside FALV.
The issue is that FALV, when is displaying popup, is copying his instance but then all such registered event handlers are lost. Only those implemented as FALV methods are kept.
The only way to overcome that limitation is to register event as follow:
SET HANDLER me->on_user_command FOR ALL INSTANCES.
Maybe there is better way to do it?
Hi,
on
S4CORE 105 0000
SAP_ABA 75F 0000 -
I get this error on all the example programs whenever "add_button" is used.
Program errors
Message no. 0K534
Diagnosis
A common cause is that the output table passed to the ALV is not defined globally but locally. Thus, the reference to the table is lost. The ALV no longer has an output table.
Procedure
Define the output table globally.
Due to system patch level I had to use for one customer version 7.3x of your awesome class and just realised that ported version is not in sync with main one. Would it be possible, in near future, to upgrade version 7.3x to be in sync with 7.4? I see there is a lot of cool features missing like missing top of page event handling, missing export to Excel, etc.
Method SET_READONLY instead of setting grid to display mode it makes it editable. Correction will be soon.
Hi Łukasz,
i was wondering why the search button is excludet in zcl_falv_dynamic_status.
If i delete the excludet entries the buttons are available but no action gets triggert.
Couldn`t i use the standard ALV Search function with your FALV?
P.S.: Great Work! I really like the whole FALV implementation 👍
When calling FALV in full screen or popup mode for the second time in the same program, correct grid is not always shown after leaving second (and later ) FALV. Simple call stack with guid check is need.
Hi.
I installed FALV manually (abapgit nor working properly), and after some tries i managed to activate all objects.
The strange fact is i have an empty screen when i go display.
I created a 0100 screen into fgroup where ZFALV_DISPLAY fm is and i supposed a standard container would be constructed dinamically.
It's like a container hasn't been set...
I'm doing this as the easiest test i could:
Am I doing something wrong?
Tnx in advance!
Program SAPLZFALV
Include LZFALVU03
Row 110
Module Type (FUNCTION)
Module Name Z_FALV_MASS_REPLACE
Field symbol has not been assigned yet.
Explanation: is not assigned, because falv is called with a parent container.
Hello @fidley!
On zcl_falv inherition I add new methods and attributes.
Before calling lo_alv->display( ).
I use lo_alv->set_autosave( abap_true ).
.
On redefinition method evf_user_command I try to get attribute autosave, but it is empty. It happends if class instance is created as popup screen. If i_popup = abap_false
evertything is OK.
For example:
CLASS lcl_alv DEFINITION INHERITING FROM zcl_falv.
PUBLIC SECTION.
METHODS set_autosave
IMPORTING
iv_autosave TYPE abap_bool.
METHODS get_autosave
RETURNING
VALUE(rv_autosave) TYPE abap_bool.
PROTECTED SECTION.
METHODS evf_user_command REDEFINITION.
PRIVATE SECTION.
DATA mv_autosave TYPE abap_bool.
ENDCLASS.
CLASS lcl_alv IMPLEMENTATION.
METHOD set_autosave.
mv_autosave = iv_autosave.
ENDMETHOD.
METHOD get_autosave.
rv_autosave = mv_autosave.
ENDMETHOD.
METHOD evf_user_command.
...
IF get_autosave( ) = abap_true.
...
ENDIF.
ENDMETHOD.
ENDCLASS.
I figured out that in metod create_by_copy creating new object.
Can you fix it?
Hello,
How can I set the layout variant (type like slis_vari) before calling display( )?
Best regards,
Misha
Hello There,
Recently i did installed FALV into system that does not support any 'import objects' software (and it is not possible to install any).
That was hard but doable. But i did not create proper GUI statuses for dynamic buttons feature.
So my question - is it possible to create some instruction/describing pictures how to manually create ALL the objects for FALV.
There is an issue that FM RM_FREE_SESSION_CHECK, which is used in FM Z_FALV_MASS_REPLACE, might not exist in the system (NW 740 SP13, CRM 7.0 Ehp3 SP11). As a result 'mass replace' functionality end with a dump. It's better to use FM SPBT_INITIALIZE / SPBT_GET_CURR_RESOURCE_INFO to find free resources as per help documentation: https://help.sap.com/saphelp_nw70/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm
Not sure if this is a bug or not, so please close this in case I am wrong. please consider this more a question.
When sorting EKPO entries in SE16N by EBELN, only one document number is showing and the remaining entries for that document are blank.
I tried the same with FALV but it is not working, whichever way I do it.
I tried everything I could find on the web by adding sorts as:
...but no success.
Could you say whether this is possible or not with FALV?
Thanks in advance for your reply. I really like FALV and use it a lot. Sorry, in case this is not a bug but my mistake or an SAP Standard issue. ;)
Hi,
I attempted to make a table maintenance program using FALV which works similar to T-code SM30. But I was not successful in doing so.
If possible, can you provide a simple demo program for the same?
Hi,
Just an idea, you can add the nugg and zip files under https://github.com/fidley/falv/releases
That way only 1 set of source files is stored in the git repository
Hi @fidley,
In demo ZDEMO_FALV11, set_editable ABAP_FALSE still can editable.
Here the code:
"! This is demo for FALV with edit settings
"! done by Lukasz Pegiel for http://abapblog.com
REPORT ydemo_falv11_b.
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 ).
falv->set_editable( iv_modify = abap_false ).
"Display full screen grid
falv->display( ).
The ALV still can editable, can you explain it?
Thank you
Put all logic of evf_user_command_internal into evf_user_command so it can be redefined correctly.
Hello,
On ALV display:
If I click the button Change Layout... (CTRL+F8), I have only the tab "Column Selection" and "Display".
When I change directly in list, for exemple sorting a column, and after that I click on the button Change Layout, I have the tab "Column Selection", "Sort Order", "Filter", "View" and "Display".
It is an issue or I need to add a parameter when calling falv?
Best regards,
Misha
Hi, I'm using 731 and tried to run the v731.1.0.3, with the result:
class zcl_falv -> Method CREATE may not have a RETURNING parameter and an EXPORTING or CHANGING parameter at the same time.
Are you still maintaining the 731 releases?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.