Code Monkey home page Code Monkey logo

falv's Introduction

My Github stats

falv's People

Contributors

ferenci avatar fidley avatar hemeyeraov avatar larshp avatar mamuduruvenkatesh avatar reuteraov avatar rino53 avatar rtagliento avatar simplify-and-focus avatar timostahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falv's Issues

Sorting Problem

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

Here is what I expect:
image

I tried everything I could find on the web by adding sorts as:

  • group = 'UL'/'*'
  • UP='X'
  • etc.

image

...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. ;)

Syntax error in program "ZCL_FALV_COLUMN===============CP ".

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

Issue in built-in screen callstack

In report ZDEMO_FALV15 the first FALV won't show after displaying second FALV.

I added the method set_dummy_function_code( ) before calling pbo at the end of function module z_falv_display. It works for me.

solution

Call stack for built-in screen

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.

Hotspots needs double click?

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?

Installing FALV into systems w/o SAPlink or abapGIT

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.

Event handlers are lost when displaying popup

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?

Missing options in pop-up "Change Layout"

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

Column position

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:
image

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:
image

It's that an issue? Or my mistake with the call?

Thanks a lot.

Search Button in toolbar

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 👍

Empty screen with simple FALV creation

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

It's like a container hasn't been set...
I'm doing this as the easiest test i could:
image

Am I doing something wrong?

Tnx in advance!

New Methods

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.

chain methods (in column class)

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

Set Fixed Header Text is not working

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( ) ) ) ).

Attributes problem (inheritance)

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?

program errors in S/4 Hana 2020

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.

How to use layout variant?

Hello,

How can I set the layout variant (type like slis_vari) before calling display( )?

Best regards,
Misha

Mass Replace Dump when inside splitter container

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.

Layout Variant issue

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' ) ).

Multiple ALVs Default Layout hiding all columns

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

FALV for 7.3x and 7.4x are not in sync

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.

ZDEMO_FALV11 set_editable ABAP_FALSE still can editable

Hi @fidley,

In demo ZDEMO_FALV11, set_editable ABAP_FALSE still can editable.

image

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

Save data from Editable ALV

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

Endless loop while redefining "display"

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.

Create simplified class for popup display, which inherits from ZCL_FALV

Discussed in #81

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

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?

F4 help not working for tables defined using local structures (TYPES: BEGIN OF ..)

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:

  1. Look for a database table where this data element is used and manually set the values (REF_TABLE and REF_FIELD) of the field catalog. A simple way to achieve this is to call the GET_BACKEND_FIELDCATALOG and SET_FRONTEND_FIELDCATALOG methods.
  2. (Proposed by Lukasz himself): If REF_TABLE and REF_FIELD are empty, but the ROLLNAME is not initial and F4AVAILABLE = X, then check which search help is assigned to the data element and call the F4IF_GET_SHLP_DESCR and F4IF_START_VALUE_REQUEST function modules.

Falv Mass Replace bug: dump entering non-numeric chars to a numeric field

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?

Syntax error in class zcl_falv in S4 2021 Feature Pack 1

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

Cfieldname fieldcat not working [Question]

Hi @fidley ,

currently i'm using falv for creating some report
image

i'm using IDR currency... but the amount still not reflected like using currency already referenced.. it should be times by 100 like JPY

image

please kindly assist.. is there something i missed?
it's also not working for quantity field

Not passing parameter

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.