falv icon indicating copy to clipboard operation
falv copied to clipboard

Create simplified class for popup display, which inherits from ZCL_FALV

Open fidley opened this issue 2 years ago • 1 comments

Discussed in https://github.com/fidley/falv/discussions/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?

fidley avatar Sep 03 '23 18:09 fidley

Hi, me too use flav for some popup. Simple way is to use redefine method and local class. I use this also for get selected row.

  1. Add local variable mv_row in private section
  PRIVATE SECTION.
    data: mv_row type i.
  1. add get method in public section
  PUBLIC SECTION.
    METHODs get_selected_row RETURNING VALUE(result) TYPE string.
  1. Redefine evf_double_click
  METHOD evf_double_click .

    mv_row = E_ROW-INDEX.
    leave to SCREEN 0.
  ENDMETHOD.
  1. redefine evf_user_command.
  METHOD evf_user_command.
    CASE e_ucomm.
      WHEN 'CONTINUE'.
        me->get_current_cell_row( IMPORTING ROW = mv_row ).
        LEAVE to SCREEN 0.
      WHEN OTHERS.
        super->evf_user_command( e_ucomm ).
    ENDCASE.
  ENDMETHOD.
  1. After display get selected row, where 0 means no row selected

lc_mccode->get_selected_row( ).

wolfsolver avatar Sep 14 '24 17:09 wolfsolver