├── CODE ├── zfalv.fugr.screen_0100.abap ├── zfalv.fugr.screen_0200.abap ├── zdemo_falv13.prog.screen_0100.abap ├── zdemo_falv16.prog.screen_0100.abap ├── package.devc.xml ├── zfalv.fugr.lzfalvd01.xml ├── zfalv.fugr.lzfalvoim.xml ├── zfalv.fugr.lzfalvp01.xml ├── zfalv.fugr.z_falv_add_falv_to_stack.abap ├── zfalv.fugr.lzfalvtop.xml ├── zcl_falv.clas.xml ├── zcl_falv_layout.clas.xml ├── zfalv.fugr.z_falv_create_main_container.abap ├── zcl_falv_inheritance_demo.clas.xml ├── zcl_falv_dynamic_status.clas.xml ├── zcl_falv_onf4_internal.clas.xml ├── zdemo_falv01.prog.abap ├── zdemo_falv18.prog.abap ├── zdemo_falv22.prog.xml ├── zdemo_falv23.prog.xml ├── zdemo_falv26.prog.xml ├── zdemo_falv10.prog.xml ├── zdemo_falv21.prog.xml ├── zdemo_falv02.prog.xml ├── zdemo_falv09.prog.xml ├── zdemo_falv25.prog.xml ├── zdemo_falv07.prog.xml ├── zdemo_falv18.prog.xml ├── zdemo_falv27.prog.xml ├── zdemo_falv05.prog.xml ├── zdemo_falv08.prog.xml ├── zdemo_falv17.prog.xml ├── zdemo_falv19.prog.xml ├── zdemo_falv15.prog.xml ├── zdemo_falv06.prog.xml ├── zdemo_falv24.prog.xml ├── zdemo_falv03.prog.xml ├── zdemo_falv04.prog.xml ├── zdemo_falv20.prog.xml ├── zdemo_falv01.prog.xml ├── zfalv.fugr.saplzfalv.abap ├── zdemo_falv21.prog.abap ├── zcl_falv_column.clas.xml ├── zfalv.fugr.z_falv_inheritance_demo.abap ├── zfalv.fugr.lzfalvd01.abap ├── zfalv.fugr.lzfalvoim.abap ├── zdemo_falv12.prog.xml ├── zdemo_falv24.prog.abap ├── zdemo_falv23.prog.abap ├── zdemo_falv11.prog.xml ├── zdemo_falv12.prog.abap ├── zdemo_falv14.prog.abap ├── zdemo_falv08.prog.abap ├── zdemo_falv07.prog.abap ├── zdemo_falv17.prog.abap ├── zdemo_falv14.prog.xml ├── zdemo_falv20.prog.abap ├── zdemo_falv26.prog.abap ├── zdemo_falv11.prog.abap ├── zdemo_falv06.prog.abap ├── zfalv.fugr.z_falv_call_mass_ss.abap ├── zdemo_falv10.prog.abap ├── zdemo_falv22.prog.abap ├── zcl_falv_inheritance_demo.clas.abap ├── zfalv.fugr.saplzfalv.xml ├── zdemo_falv19.prog.abap ├── zdemo_falv13.prog.xml ├── zdemo_falv16.prog.xml ├── zfalv.fugr.z_falv_display.abap ├── zdemo_falv02.prog.abap ├── zdemo_falv03.prog.abap ├── zdemo_falv15.prog.abap ├── zdemo_falv09.prog.abap ├── zdemo_falv25.prog.abap ├── zdemo_falv16.prog.abap ├── zfalv.fugr.lzfalvp01.abap ├── zdemo_falv04.prog.abap ├── zdemo_falv05.prog.abap ├── zfalv.fugr.lzfalvtop.abap ├── zdemo_falv13.prog.abap ├── zfalv.fugr.z_falv_mass_replace.abap ├── zcl_falv_dynamic_status.clas.abap ├── zdemo_falv27.prog.abap ├── zcl_falv_onf4_internal.clas.abap └── zcl_falv_layout.clas.abap ├── README.md ├── abaplint.json ├── .github └── FUNDING.YML ├── .abapgit.xml └── LICENSE /CODE/zfalv.fugr.screen_0100.abap: -------------------------------------------------------------------------------- 1 | process before output. 2 | module pbo. 3 | * 4 | process after input. 5 | module pai. 6 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.screen_0200.abap: -------------------------------------------------------------------------------- 1 | process before output. 2 | module pbo. 3 | * 4 | process after input. 5 | module pai. 6 | -------------------------------------------------------------------------------- /CODE/zdemo_falv13.prog.screen_0100.abap: -------------------------------------------------------------------------------- 1 | PROCESS BEFORE OUTPUT. 2 | module pbo. 3 | 4 | PROCESS AFTER INPUT. 5 | module pai. 6 | -------------------------------------------------------------------------------- /CODE/zdemo_falv16.prog.screen_0100.abap: -------------------------------------------------------------------------------- 1 | process before output. 2 | module pbo. 3 | * 4 | process after input. 5 | module pai. 6 | -------------------------------------------------------------------------------- /CODE/package.devc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Fast ALV 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fast ALV Grid 2 | Basic information can be found here - http://abapblog.com/falv 3 | 4 | 5 | 6 | 7 | --- 8 | ![Are you enjoying all the work I do? You can buy me a beer :-)](https://github.com/fidley/falv/assets/7912195/8450c50f-2bfc-4a3b-86cc-c4d8b42ba191) [Are you enjoying all the work I do? You can buy me a beer :-)](https://www.buymeacoffee.com/AbapBlog) 9 | 10 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvd01.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | LZFALVD01 7 | I 8 | E 9 | X 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvoim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | LZFALVOIM 7 | I 8 | E 9 | X 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvp01.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | LZFALVP01 7 | I 8 | E 9 | X 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_add_falv_to_stack.abap: -------------------------------------------------------------------------------- 1 | FUNCTION Z_FALV_ADD_FALV_TO_STACK. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" REFERENCE(IO_FALV) TYPE REF TO ZCL_FALV 6 | *"---------------------------------------------------------------------- 7 | insert new lcl_output( io_falv ) into table outputs. 8 | 9 | 10 | endfunction. 11 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvtop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | LZFALVTOP 7 | S 8 | D$ 9 | I 10 | S 11 | E 12 | X 13 | D$S 14 | X 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /CODE/zcl_falv.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV 7 | E 8 | Fast ALV 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CODE/zcl_falv_layout.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV_LAYOUT 7 | E 8 | FALV layout 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_create_main_container.abap: -------------------------------------------------------------------------------- 1 | FUNCTION Z_FALV_CREATE_MAIN_CONTAINER. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" EXPORTING 5 | *" REFERENCE(MAIN_CONTAINER) TYPE REF TO CL_GUI_CONTAINER 6 | *"---------------------------------------------------------------------- 7 | create_dummy_container = abap_true. 8 | call screen zcl_falv=>c_screen_popup STARTING AT 1 1. 9 | main_container = dummy_container. 10 | create_dummy_container = abap_false. 11 | 12 | ENDFUNCTION. 13 | -------------------------------------------------------------------------------- /CODE/zcl_falv_inheritance_demo.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV_INHERITANCE_DEMO 7 | E 8 | Test 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CODE/zcl_falv_dynamic_status.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV_DYNAMIC_STATUS 7 | E 8 | FALV Dynamic Status 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CODE/zcl_falv_onf4_internal.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV_ONF4_INTERNAL 7 | E 8 | Internal handling of F4 help (automatic) 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /CODE/zdemo_falv01.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV standard fast call 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv01. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | 8 | start-of-selection. 9 | 10 | 11 | select * up to 100 rows 12 | into corresponding fields of table @sflight 13 | from sflight. 14 | 15 | "FALV creation with only table passed 16 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 17 | 18 | "Add title variable 19 | falv->title_v1 = 'ZDEMO_FALV01'. 20 | 21 | "Display full screen grid 22 | falv->display( ). 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv18.prog.abap: -------------------------------------------------------------------------------- 1 | "! done by Lukasz Pegiel for http://abapblog.com 2 | report zdemo_falv18. 3 | 4 | data: sflight type standard table of sflight. 5 | 6 | 7 | start-of-selection. 8 | 9 | select * up to 100 rows 10 | into corresponding fields of table @sflight 11 | from sflight. "#EC CI_NOWHERE 12 | 13 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 14 | 15 | 16 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true )->set_color( falv->color-light_blue_itensified ). 17 | falv->layout->set_cwidth_opt( abap_true )->set_no_toolbar( abap_true ). 18 | 19 | falv->display( ). 20 | -------------------------------------------------------------------------------- /CODE/zdemo_falv22.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV22 7 | 1 8 | D 9 | X 10 | X 11 | 12 | 13 | 14 | R 15 | Demo Create-by-Type 16 | 19 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CODE/zdemo_falv23.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV23 7 | 1 8 | D 9 | X 10 | X 11 | 12 | 13 | 14 | R 15 | FALV: Demo On F4 event handling 16 | 31 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CODE/zdemo_falv26.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV26 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | DropDown List 17 | 13 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv10.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV10 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Colors 17 | 17 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv21.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV21 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | Test falv sequence 17 | 18 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv02.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV02 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Redefinitions 17 | 24 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv09.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV09 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Cell Settings 17 | 24 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv25.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV25 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Drag&Drop 17 | 20 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv07.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV07 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Full Screen Columns 17 | 30 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv18.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV18 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | Chaining in columns and layout 17 | 30 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv27.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV27 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo for cell merging 17 | 27 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv05.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV05 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Full Screen ALV Toolbar 17 | 34 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv08.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV08 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Mass Replace Function 17 | 32 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv17.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV17 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | Demo Subclass check on global class 17 | 35 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv19.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV19 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | Demo Subclass check on local class 17 | 34 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv15.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV15 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo for built-in screen callstack 17 | 40 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv06.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV06 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | S 16 | P_USEMAR 17 | Use Mark Field? 18 | 23 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /CODE/zdemo_falv24.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV24 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo to check CFIELDNAME is working 17 | 41 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv03.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV03 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Full Screen GUI Status Dynamic Partly 17 | 48 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv04.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV04 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Full Screen GUI Status Dynamic Fully 17 | 47 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv20.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV20 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | FALV: Demo Full Screen GUI Status Dynamic Partly 17 | 48 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CODE/zdemo_falv01.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV01 7 | 1 8 | * 9 | K 10 | E 11 | X 12 | X 13 | 14 | 15 | 16 | R 17 | FALV: Demo Simple Full Screen Call 18 | 34 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.saplzfalv.abap: -------------------------------------------------------------------------------- 1 | ******************************************************************* 2 | * System-defined Include-files. * 3 | ******************************************************************* 4 | INCLUDE lzfalvtop. " Global Data 5 | INCLUDE lzfalvuxx. " Function Modules 6 | 7 | ******************************************************************* 8 | * User-defined Include-files (if necessary). * 9 | ******************************************************************* 10 | INCLUDE lzfalvp01. " Local class implement. 11 | INCLUDE lzfalvoim. " PBO / PAI - modules 12 | -------------------------------------------------------------------------------- /CODE/zdemo_falv21.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zdemo_falv21 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zdemo_falv21. 7 | 8 | 9 | select * up to 100 rows from spfli into table @data(spfli). 10 | 11 | 12 | data(first_falv) = zcl_falv=>create( changing ct_table = spfli ). 13 | data(second_falv) = zcl_falv=>create( "exporting i_applog_embedded = abap_true 14 | changing ct_table = spfli )->display( ). 15 | 16 | 17 | first_falv->set_editable( iv_modify = abap_true )->display( ). 18 | 19 | second_falv->display( ). 20 | -------------------------------------------------------------------------------- /CODE/zcl_falv_column.clas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZCL_FALV_COLUMN 7 | E 8 | FALV column 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | CONSTRUCTOR 17 | E 18 | T 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /abaplint.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "files": "/CODE/**/*.*" 4 | }, 5 | "dependencies": [ 6 | { 7 | "url": "https://github.com/abaplint/deps", 8 | "folder": "/deps", 9 | "files": "/src/**/*.*" 10 | } 11 | ], 12 | "syntax": { 13 | "version": "v754", 14 | "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)" 15 | }, 16 | "rules": { 17 | "begin_end_names": true, 18 | "cds_parser_error": true, 19 | "check_ddic": true, 20 | "check_include": true, 21 | "check_syntax": true, 22 | "global_class": true, 23 | "implement_methods": true, 24 | "method_implemented_twice": true, 25 | "parser_error": true, 26 | "superclass_final": true, 27 | "unknown_types": true, 28 | "xml_consistency": true 29 | } 30 | } -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_inheritance_demo.abap: -------------------------------------------------------------------------------- 1 | FUNCTION Z_FALV_INHERITANCE_DEMO. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" TABLES 5 | *" C_TAB STRUCTURE SFLIGHT 6 | *"---------------------------------------------------------------------- 7 | "creation of falv with global class redefinition and without passing subclass type 8 | data falv type ref to zcl_falv_inheritance_demo. 9 | 10 | falv ?= zcl_falv_inheritance_demo=>create( changing ct_table = c_tab[] ). 11 | 12 | 13 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 14 | falv->title_v1 = 'ZDEMO_FALV17'. 15 | 16 | falv->top_of_page_height = 100. "absolute size 17 | falv->show_top_of_page( ). 18 | 19 | falv->display( ). 20 | 21 | endfunction. 22 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvd01.abap: -------------------------------------------------------------------------------- 1 | class lcl_output definition. 2 | 3 | public section. 4 | data: okcode type sy-ucomm. 5 | data: guid type char22 read-only. 6 | methods: constructor importing io_falv type ref to zcl_falv. 7 | methods: pbo importing value(iv_dynnr) type sy-dynnr default sy-dynnr. 8 | methods: pai changing c_ucomm type sy-ucomm. 9 | class-methods: end_of_ss1001 importing !p_task type clike. 10 | class-methods: set_ss1001_status. 11 | data: falv type ref to zcl_falv. 12 | class-data: wait_for_mass_repl type abap_bool. 13 | class-data: mass_repl_params type rsparams_tt. 14 | protected section. 15 | data: first_output type abap_bool value abap_true. 16 | private section. 17 | methods: hide. 18 | methods: show. 19 | 20 | 21 | endclass. 22 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvoim.abap: -------------------------------------------------------------------------------- 1 | MODULE pbo OUTPUT. 2 | IF create_dummy_container EQ abap_true. 3 | dummy_container = CAST cl_gui_container( NEW cl_gui_custom_container( 4 | container_name = zcl_falv=>cc_name 5 | dynnr = zcl_falv=>c_screen_popup 6 | repid = zcl_falv=>c_fscr_repid 7 | no_autodef_progid_dynnr = abap_true ) ). 8 | LEAVE TO SCREEN 0. 9 | ELSE. 10 | ASSIGN outputs[ table_line->guid = current_guid ] TO . 11 | IF sy-subrc EQ 0. 12 | ->pbo( iv_dynnr = sy-dynnr ). 13 | ENDIF. 14 | ENDIF. 15 | ENDMODULE. 16 | 17 | 18 | MODULE pai INPUT. 19 | ASSIGN outputs[ table_line->guid = current_guid ] TO . 20 | IF sy-subrc EQ 0. 21 | ->pai( CHANGING c_ucomm = okcode ). 22 | ENDIF. 23 | ENDMODULE. 24 | -------------------------------------------------------------------------------- /.github/FUNDING.YML: -------------------------------------------------------------------------------- 1 | github: fidley 2 | patreon: # Replace with a single Patreon username 3 | open_collective: # Replace with a single Open Collective username 4 | ko_fi: # Replace with a single Ko-fi username 5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 7 | liberapay: # Replace with a single Liberapay username 8 | issuehunt: # Replace with a single IssueHunt username 9 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 10 | polar: # Replace with a single Polar username 11 | buy_me_a_coffee: abapblog 12 | thanks_dev: # Replace with a single thanks.dev username 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /CODE/zdemo_falv12.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV12 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | S 16 | P_EMBEED 17 | Embeeded Error Log 18 | 26 19 | 20 | 21 | S 22 | P_NOTEMB 23 | Popup Error Log 24 | 23 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /CODE/zdemo_falv24.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zdemo_falv24 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | REPORT zdemo_falv24. 7 | 8 | TYPES: BEGIN OF t_output, 9 | price TYPE sflight-price, 10 | currency TYPE sflight-currency, 11 | END OF t_output. 12 | 13 | DATA: output TYPE STANDARD TABLE OF t_output. 14 | 15 | SELECT price, currency UP TO 10000 ROWS 16 | INTO CORRESPONDING FIELDS OF TABLE @output 17 | FROM sflight. 18 | 19 | 20 | data(falv) = zcl_falv=>create( 21 | CHANGING 22 | ct_table = output 23 | ). 24 | 25 | falv->column( 'PRICE' )->set_cfieldname( 'CURRENCY' ). 26 | 27 | falv->display( ). 28 | -------------------------------------------------------------------------------- /.abapgit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E 6 | /CODE/ 7 | FULL 8 | 9 | /.gitignore 10 | /LICENSE 11 | /README.md 12 | /package.json 13 | /.travis.yml 14 | /changelog731.md 15 | /changelog740.md 16 | /BUILD/ZFALV_V731.1.0.3.nugg 17 | /BUILD/ZFALV_V731.1.0.3.zip 18 | /BUILD/ZFALV_V740.1.0.11.nugg 19 | /BUILD/ZFALV_V740.1.0.11.zip 20 | /code/abapgit/README.md 21 | /code/abapgit/readme 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /CODE/zdemo_falv23.prog.abap: -------------------------------------------------------------------------------- 1 | "!F4 event handling. 2 | REPORT zdemo_falv23. 3 | 4 | DATA: sflight TYPE STANDARD TABLE OF sflight. 5 | 6 | 7 | CLASS lcl_test DEFINITION INHERITING FROM zcl_falv. 8 | PUBLIC SECTION. 9 | 10 | PROTECTED SECTION. 11 | METHODS evf_onf4 REDEFINITION. 12 | PRIVATE SECTION. 13 | 14 | ENDCLASS. 15 | 16 | CLASS lcl_test IMPLEMENTATION. 17 | 18 | METHOD evf_onf4. 19 | BREAK-POINT. 20 | ENDMETHOD. 21 | 22 | ENDCLASS. 23 | 24 | START-OF-SELECTION. 25 | 26 | SELECT * UP TO 100 ROWS 27 | INTO CORRESPONDING FIELDS OF TABLE @sflight 28 | FROM sflight. "#EC CI_NOWHERE 29 | 30 | 31 | DATA falv TYPE REF TO lcl_test. 32 | 33 | falv ?= lcl_test=>create( CHANGING ct_table = sflight ). 34 | 35 | falv->register_f4_for_fields( VALUE #( ( fieldname = 'PLANETYPE' register = 'X' getbefore = 'X' ) ) ). 36 | falv->display( ). 37 | -------------------------------------------------------------------------------- /CODE/zdemo_falv11.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV11 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | S 16 | P_CELL 17 | Set cell editable 18 | 25 19 | 20 | 21 | S 22 | P_COLUMN 23 | Set column editable 24 | 27 25 | 26 | 27 | S 28 | P_WHOLE 29 | Set whole grid editable 30 | 31 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /CODE/zdemo_falv12.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV with error log 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv12. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | 8 | parameters: p_embeed radiobutton group gr1 default 'X', 9 | p_notemb radiobutton group gr1. 10 | 11 | 12 | start-of-selection. 13 | 14 | 15 | select * up to 100 rows 16 | into corresponding fields of table @sflight 17 | from sflight. 18 | 19 | "FALV creation with only table passed 20 | 21 | if p_embeed eq abap_true. 22 | data(falv) = zcl_falv=>create( exporting i_applog_embedded = abap_true changing ct_table = sflight ). 23 | else. 24 | falv = zcl_falv=>create( changing ct_table = sflight ). 25 | endif. 26 | "Add title variable 27 | falv->title_v1 = 'ZDEMO_FALV12'. 28 | 29 | "set whole grid editable 30 | falv->layout->set_edit( abap_true ). 31 | "Change grid to edit mode 32 | falv->set_editable( iv_modify = abap_true ). 33 | 34 | "Display full screen grid 35 | falv->display( ). 36 | -------------------------------------------------------------------------------- /CODE/zdemo_falv14.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV standard fast call of pppup 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv14. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | 8 | parameters: p_defau radiobutton group gr1 default 'X', 9 | p_set radiobutton group gr1, 10 | p_rowst type i, 11 | p_rowend type i, 12 | p_colst type i, 13 | p_colend type i. 14 | 15 | start-of-selection. 16 | 17 | 18 | select * up to 100 rows 19 | into corresponding fields of table @sflight 20 | from sflight. 21 | 22 | "FALV creation with only table passed 23 | data(falv) = zcl_falv=>create( exporting i_popup = abap_true changing ct_table = sflight ). 24 | 25 | "Add title variable 26 | falv->title_v1 = 'ZDEMO_FALV14'. 27 | 28 | if p_defau eq abap_true. 29 | "Display popup with default size 30 | falv->display( ). 31 | else. 32 | "display popup with customized size 33 | falv->display( 34 | iv_start_row = p_rowst 35 | iv_start_column = p_colst 36 | iv_end_row = p_rowend 37 | iv_end_column = p_colend 38 | ). 39 | endif. 40 | -------------------------------------------------------------------------------- /CODE/zdemo_falv08.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV with mass replace function 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv08. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | 8 | start-of-selection. 9 | 10 | 11 | select * up to 100 rows 12 | into corresponding fields of table @sflight 13 | from sflight. 14 | 15 | "FALV creation with only table passed 16 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 17 | 18 | "Add title variable 19 | falv->title_v1 = 'ZDEMO_FALV08'. 20 | 21 | "set whole grid editable 22 | falv->layout->set_edit( abap_true ). 23 | falv->set_editable( iv_modify = abap_true ). 24 | 25 | "show default grid toolbar 26 | falv->layout->set_no_toolbar( abap_false ). 27 | 28 | "Add mass replace function to grid toolbar (can be also added to GUI STATUS as well ) 29 | falv->add_button( 30 | exporting 31 | iv_function = falv->fc_mass_replace 32 | iv_icon = icon_replace 33 | * iv_quickinfo = 34 | * iv_butn_type = 35 | * iv_disabled = 36 | iv_text = 'Mass replace' 37 | * iv_checked = 38 | ). 39 | 40 | "Display full screen grid 41 | falv->display( ). 42 | -------------------------------------------------------------------------------- /CODE/zdemo_falv07.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with fieldcatalog update 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | 4 | report zdemo_falv07. 5 | 6 | data: sflight type standard table of sflight. 7 | 8 | 9 | start-of-selection. 10 | 11 | 12 | select * up to 10000 rows 13 | into corresponding fields of table @sflight 14 | from sflight. 15 | 16 | "FALV creation with only table passed 17 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 18 | 19 | "Add title variable 20 | falv->title_v1 = 'ZDEMO_FALV07'. 21 | 22 | 23 | "Changing some of field catalog settings 24 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 25 | falv->column( 'SEATSMAX' )->set_color( 'C700' ). 26 | 27 | falv->column( 'PLANETYPE' )->set_color( 'C300' ). 28 | falv->column( 'PLANETYPE' )->set_no_merging( abap_true ). 29 | 30 | falv->column( 'PAYMENTSUM' )->set_no_zero( abap_true ). 31 | "or 32 | 33 | data(price) = falv->column( 'PRICE' ). 34 | price->set_no_out( abap_true ). 35 | price->set_cfieldname( 'CURRENCY' ). 36 | data(occup) = falv->column( 'SEATSOCC' ). 37 | occup->set_no_zero( abap_true ). 38 | occup->set_no_merging( abap_true ). 39 | 40 | 41 | 42 | "Display full screen grid 43 | falv->display( ). 44 | -------------------------------------------------------------------------------- /CODE/zdemo_falv17.prog.abap: -------------------------------------------------------------------------------- 1 | "! done by Lukasz Pegiel for http://abapblog.com 2 | report zdemo_falv17. 3 | 4 | data: sflight type standard table of sflight. 5 | 6 | 7 | parameters: p_class radiobutton group gr1, 8 | p_fm radiobutton group gr1, 9 | p_prog radiobutton group gr1 default 'X'. 10 | 11 | start-of-selection. 12 | 13 | select * up to 100 rows 14 | into corresponding fields of table @sflight 15 | from sflight. 16 | 17 | 18 | if p_class eq abap_true. 19 | zcl_falv_inheritance_demo=>class_call_test( 20 | changing 21 | c_tab = sflight 22 | ). 23 | elseif p_fm eq abap_true. 24 | 25 | call function 'Z_FALV_INHERITANCE_DEMO' 26 | tables 27 | c_tab = sflight 28 | . 29 | 30 | else. 31 | "creation of falv with global class redefinition and without passing subclass type 32 | data falv type ref to zcl_falv_inheritance_demo. 33 | 34 | falv ?= zcl_falv_inheritance_demo=>create( changing ct_table = sflight ). 35 | 36 | 37 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 38 | falv->title_v1 = 'ZDEMO_FALV17'. 39 | 40 | falv->top_of_page_height = 100. "absolute size 41 | falv->show_top_of_page( ). 42 | 43 | falv->display( ). 44 | 45 | endif. 46 | -------------------------------------------------------------------------------- /CODE/zdemo_falv14.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV14 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | S 16 | P_COLEND 17 | End column 18 | 18 19 | 20 | 21 | S 22 | P_COLST 23 | Start column 24 | 20 25 | 26 | 27 | S 28 | P_DEFAU 29 | Default size 30 | 20 31 | 32 | 33 | S 34 | P_ROWEND 35 | End row 36 | 15 37 | 38 | 39 | S 40 | P_ROWST 41 | Start row 42 | 17 43 | 44 | 45 | S 46 | P_SET 47 | Customized size 48 | 23 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /CODE/zdemo_falv20.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with partly dynamic GUI STATUS 2 | "! and excel save button 3 | "! done by Lukasz Pegiel for http://abapblog.com 4 | report zdemo_falv20. 5 | 6 | data: sflight type standard table of sflight. 7 | 8 | class lcl_test definition inheriting from zcl_falv. 9 | public section. 10 | 11 | protected section. 12 | methods evf_user_command redefinition. 13 | private section. 14 | 15 | endclass. 16 | 17 | class lcl_test implementation. 18 | 19 | method evf_user_command. 20 | case e_ucomm. 21 | when zcl_falv_dynamic_status=>b_01. 22 | save_excel_localy( ). 23 | when others. 24 | super->evf_user_command( e_ucomm ). 25 | endcase. 26 | endmethod. 27 | endclass. 28 | 29 | start-of-selection. 30 | 31 | 32 | select * up to 100 rows 33 | into corresponding fields of table @sflight 34 | from sflight. "#EC CI_NOWHERE 35 | 36 | 37 | data falv type ref to lcl_test. 38 | falv ?= lcl_test=>create( changing ct_table = sflight ) . 39 | 40 | 41 | falv->title_v1 = 'ZDEMO_FALV20'. 42 | 43 | "Add button into GUI status at for function F01 (in partial dynamic GUI Status we can have up to 19 buttons) 44 | falv->gui_status->add_button( 45 | exporting 46 | iv_button = zcl_falv_dynamic_status=>b_01 47 | iv_text = 'Save localy' 48 | iv_icon = icon_xls 49 | ). 50 | 51 | falv->display( ). 52 | -------------------------------------------------------------------------------- /CODE/zdemo_falv26.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zdemo_falv26 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | REPORT zdemo_falv26. 7 | 8 | 9 | 10 | data: sflight type standard table of sflight. 11 | 12 | class lcl_falv DEFINITION INHERITING FROM zcl_falv. 13 | 14 | PROTECTED SECTION. 15 | methods: evf_data_changed_finished REDEFINITION. 16 | 17 | ENDCLASS. 18 | 19 | CLASs lcl_falv IMPLEMENTATION. 20 | 21 | METHOD evf_data_changed_finished. 22 | me->soft_refresh( ). 23 | ENDMETHOD. 24 | 25 | ENDCLASS. 26 | 27 | 28 | start-of-selection. 29 | 30 | 31 | select * up to 10000 rows 32 | into corresponding fields of table @sflight 33 | from sflight. 34 | 35 | "FALV creation with only table passed 36 | data(falv) = lcl_falv=>create( changing ct_table = sflight ). 37 | 38 | "Add title variable 39 | falv->title_v1 = 'ZDEMO_FALV26'. 40 | 41 | 42 | data(currency) = falv->column( 'CURRENCY' )->set_editable( )->set_drdn_hndl( '1' )->set_drdn_alias( 'X' ). 43 | 44 | falv->set_drop_down_table( 45 | it_drop_down_alias = value #( handle = '1' ( value = 'EUR Euro' int_value = 'EUR' ) 46 | ( value = 'PLN Zloty' int_value = 'PLN' ) 47 | ) ). 48 | 49 | falv->set_editable( 50 | iv_modify = abap_true 51 | ). 52 | "Display full screen grid 53 | falv->display( ). 54 | -------------------------------------------------------------------------------- /CODE/zdemo_falv11.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV with edit settings 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv11. 4 | 5 | types: begin of t_sflight. 6 | include type sflight. 7 | types: styles type lvc_t_styl, 8 | end of t_sflight. 9 | 10 | data: sflight type standard table of t_sflight. 11 | 12 | 13 | parameters: p_whole radiobutton group gr1 default 'X', 14 | p_column radiobutton group gr1, 15 | p_cell radiobutton group gr1. 16 | 17 | 18 | start-of-selection. 19 | 20 | 21 | select * up to 100 rows 22 | into corresponding fields of table @sflight 23 | from sflight. 24 | 25 | "FALV creation with only table passed 26 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 27 | 28 | "Add title variable 29 | falv->title_v1 = 'ZDEMO_FALV11'. 30 | 31 | if p_whole eq abap_true. 32 | "set whole grid editable 33 | falv->layout->set_edit( abap_true ). 34 | elseif p_column eq abap_true. 35 | falv->column( 'SEATSMAX' )->set_edit( abap_true ). 36 | falv->column( 'PLANETYPE' )->set_edit( abap_true ). 37 | else. 38 | "Set style column name 39 | falv->layout->set_stylefname( 'STYLES' ). 40 | do 20 times. 41 | falv->set_cell_enabled( 42 | exporting 43 | iv_fieldname = 'FLDATE' 44 | iv_row = 2 * sy-index 45 | ). 46 | enddo. 47 | endif. 48 | 49 | "Change grid to edit mode 50 | falv->set_editable( iv_modify = abap_true ). 51 | 52 | "Display full screen grid 53 | falv->display( ). 54 | -------------------------------------------------------------------------------- /CODE/zdemo_falv06.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with layout changes 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | REPORT zdemo_falv06. 4 | 5 | TYPES: BEGIN OF t_sflight, 6 | mark TYPE bcselect, 7 | flag TYPE flag. 8 | INCLUDE TYPE sflight. 9 | TYPES: END OF t_sflight. 10 | 11 | DATA sflight TYPE STANDARD TABLE OF t_sflight. 12 | 13 | 14 | PARAMETERS p_usemar AS CHECKBOX. 15 | 16 | START-OF-SELECTION. 17 | SELECT * 18 | UP TO 100 ROWS 19 | INTO CORRESPONDING FIELDS OF TABLE @sflight 20 | FROM sflight. 21 | 22 | " FALV creation with only table passed 23 | DATA(falv) = zcl_falv=>create( CHANGING ct_table = sflight ). 24 | 25 | " Add title variable 26 | falv->title_v1 = 'ZDEMO_FALV06'. 27 | 28 | " All layout settings have set method in layout object of FALV 29 | " it can be udated before output or during runtime of program 30 | falv->layout->set_zebra( abap_true ). 31 | falv->layout->set_no_merging( abap_true ). 32 | 33 | " additionally there is a attribute mark field which when is set 34 | " then fcat for it is changed so it's checkbox field and 35 | " when you'll use standard select all/deselect all functions then 36 | " it will check/uncheck checkbox instead of selecting/deselecting rows 37 | IF p_usemar = abap_true. 38 | falv->set_mark_field( 'MARK' ). 39 | ENDIF. 40 | 41 | " user Layout option save changed to user-specific only 42 | falv->layout_save = 'U'. 43 | falv->layout->set_edit( iv_value = abap_true ). 44 | " Display full screen grid 45 | falv->display( ). 46 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_call_mass_ss.abap: -------------------------------------------------------------------------------- 1 | FUNCTION Z_FALV_CALL_MASS_SS. 2 | *"-------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" VALUE(IT_MASS_SEL_COLUMNS) TYPE LVC_T_COL 6 | *" VALUE(IT_FCAT_MASS) TYPE LVC_T_FCAT 7 | *" EXPORTING 8 | *" VALUE(ET_RSPARAMS) TYPE RSPARAMS_TT 9 | *"-------------------------------------------------------------------- 10 | field-symbols: like line of it_mass_sel_columns. 11 | data: ft_mass_sel_columns like it_mass_sel_columns. 12 | data: f_num(2) type n. 13 | 14 | 15 | ft_mass_sel_columns = it_mass_sel_columns. 16 | loop at it_fcat_mass assigning . 17 | read table ft_mass_sel_columns[] with key fieldname = -fieldname transporting no fields. 18 | if sy-subrc eq 0. 19 | add 1 to f_num. 20 | add_param_descr: f_num -scrtext_s. 21 | change_parametr_type: f_num -ref_table -ref_field. 22 | endif. 23 | endloop. 24 | 25 | call selection-screen 1001 starting at 1 1. 26 | 27 | call function 'RS_REFRESH_FROM_SELECTOPTIONS' 28 | exporting 29 | curr_report = sy-repid 30 | * IMPORTING 31 | * SP = SP 32 | tables 33 | selection_table = et_rsparams 34 | exceptions 35 | not_found = 1 36 | no_report = 2 37 | others = 3 38 | . 39 | if sy-subrc <> 0. 40 | * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 41 | * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 42 | endif. 43 | 44 | 45 | 46 | 47 | 48 | ENDFUNCTION. 49 | -------------------------------------------------------------------------------- /CODE/zdemo_falv10.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with color settings 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | 4 | report zdemo_falv10. 5 | 6 | types: begin of t_sflight. 7 | include type sflight. 8 | types: cell_color type lvc_t_scol, 9 | row_color type char4, 10 | end of t_sflight. 11 | 12 | data: sflight type standard table of t_sflight. 13 | 14 | start-of-selection. 15 | 16 | 17 | select * up to 100 rows 18 | into corresponding fields of table @sflight 19 | from sflight. 20 | 21 | "FALV creation with only table passed 22 | data(falv) = zcl_falv=>create( changing ct_table = sflight ). 23 | 24 | "Add title variable 25 | falv->title_v1 = 'ZDEMO_FALV10'. 26 | 27 | 28 | "Changing some of field catalog settings for column colors 29 | falv->column( 'SEATSMAX' )->set_color( 'C700' ). 30 | 31 | "setting of color fields -> this must be done before calling 32 | "set_row_colors or set_cell_color 33 | falv->layout->set_ctab_fname( 'CELL_COLOR' ). 34 | falv->layout->set_info_fname( 'ROW_COLOR' ). 35 | 36 | "change some row colors 37 | do 10 times. 38 | falv->set_row_color( 39 | exporting 40 | iv_color = 'C300' 41 | iv_row = 2 * sy-index 42 | ). 43 | enddo. 44 | 45 | "change some cell colors. 46 | do 10 times. 47 | falv->set_cell_color( 48 | exporting 49 | iv_fieldname = 'PLANETYPE' 50 | iv_color = value #( col = 5 int = 0 inv = 0 ) 51 | iv_row = 3 * sy-index 52 | ). 53 | 54 | enddo. 55 | 56 | 57 | 58 | "Display full screen grid 59 | falv->display( ). 60 | -------------------------------------------------------------------------------- /CODE/zdemo_falv22.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zdemo_falv22 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zdemo_falv22. 7 | 8 | TYPES: 9 | ty_t_sflight TYPE STANDARD TABLE OF sflight. 10 | 11 | CLASS lcl_demo DEFINITION INHERITING FROM zcl_falv. 12 | 13 | PUBLIC SECTION. 14 | METHODS: 15 | get_data, 16 | display_data. 17 | 18 | PROTECTED SECTION. 19 | METHODS: 20 | evf_double_click REDEFINITION. 21 | 22 | PRIVATE SECTION. 23 | DATA: 24 | mt_flights TYPE ty_t_sflight. 25 | 26 | ENDCLASS. 27 | 28 | CLASS lcl_demo IMPLEMENTATION. 29 | 30 | METHOD get_data. 31 | 32 | SELECT * 33 | UP TO 100 ROWS 34 | INTO TABLE @me->mt_flights 35 | FROM sflight. 36 | 37 | ENDMETHOD. 38 | 39 | METHOD display_data. 40 | 41 | me->set_output_table( CHANGING ct_table = me->mt_flights ). 42 | me->title_v1 = 'Demo create_by_type'. 43 | me->display( ). 44 | 45 | ENDMETHOD. 46 | 47 | METHOD evf_double_click. 48 | 49 | CALL FUNCTION 'POPUP_TO_INFORM' 50 | EXPORTING 51 | titel = 'Popup' 52 | txt1 = 'Flight doubleclicked' 53 | txt2 = space. 54 | 55 | ENDMETHOD. 56 | 57 | ENDCLASS. 58 | 59 | 60 | START-OF-SELECTION. 61 | DATA: 62 | gr_class TYPE REF TO lcl_demo. 63 | 64 | gr_class ?= lcl_demo=>create_by_type( i_type = cl_abap_typedescr=>describe_by_name( 'TY_T_SFLIGHT' ) ). 65 | gr_class->get_data( ). 66 | gr_class->display_data( ). 67 | -------------------------------------------------------------------------------- /CODE/zcl_falv_inheritance_demo.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_falv_inheritance_demo definition 2 | public 3 | inheriting from zcl_falv. 4 | 5 | public section. 6 | class-methods: class_call_test changing c_tab type standard table. 7 | protected section. 8 | methods evf_hotspot_click redefinition. 9 | methods evf_top_of_page redefinition. 10 | private section. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_FALV_INHERITANCE_DEMO IMPLEMENTATION. 16 | 17 | 18 | method evf_hotspot_click. 19 | case e_column_id-fieldname. 20 | when 'SEATSMAX'. 21 | call function 'POPUP_DISPLAY_MESSAGE' 22 | exporting 23 | titel = 'Hotspot is working' " Title 24 | msgid = '00' 25 | msgty = 'I' 26 | msgno = '001' 27 | msgv1 = 'Yupi!'. 28 | endcase. 29 | endmethod. 30 | 31 | 32 | method evf_top_of_page. 33 | 34 | e_dyndoc_id->add_text( text = 'Top Of Page' sap_style = cl_dd_area=>heading ). 35 | 36 | e_dyndoc_id->new_line( repeat = 1 ). 37 | 38 | e_dyndoc_id->add_link( 39 | exporting 40 | name = 'ABAPBLOG.com' " Name (You Can Use Any Name You Choose) 41 | url = 'http://abapblog.com' " URL 42 | tooltip = 'ABAPBLOG.com' " Tool Tip 43 | text = 'ABAPBLOG.com' " Text 44 | ). 45 | 46 | 47 | endmethod. 48 | 49 | 50 | method class_call_test. 51 | "creation of falv with global class redefinition and without passing subclass type 52 | data falv type ref to zcl_falv_inheritance_demo. 53 | 54 | falv ?= zcl_falv_inheritance_demo=>create( changing ct_table = c_tab ). 55 | 56 | 57 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 58 | falv->title_v1 = 'ZDEMO_FALV17'. 59 | 60 | falv->top_of_page_height = 100. "absolute size 61 | falv->show_top_of_page( ). 62 | 63 | falv->display( ). 64 | endmethod. 65 | ENDCLASS. 66 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.saplzfalv.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SAPLZFALV 7 | S 8 | D$ 9 | F 10 | S 11 | E 12 | X 13 | D$S 14 | X 15 | 16 | 17 | 18 | I 19 | E01 20 | Grid should be in edit mode in order to use this! 21 | 120 22 | 23 | 24 | I 25 | E02 26 | No editable fields in the grid 27 | 120 28 | 29 | 30 | I 31 | E03 32 | Please select editable fields only 33 | 120 34 | 35 | 36 | I 37 | E04 38 | Please select at least one column! 39 | 120 40 | 41 | 42 | I 43 | E05 44 | Select max 10 columns! 45 | 120 46 | 47 | 48 | I 49 | E06 50 | No more free sessions. Close one window. 51 | 120 52 | 53 | 54 | I 55 | S01 56 | Mass replace function 57 | 50 58 | 59 | 60 | I 61 | S02 62 | with: 63 | 20 64 | 65 | 66 | I 67 | S03 68 | Fill 69 | 20 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /CODE/zdemo_falv19.prog.abap: -------------------------------------------------------------------------------- 1 | "! done by Lukasz Pegiel for http://abapblog.com 2 | report zdemo_falv19. 3 | 4 | data: sflight type standard table of sflight. 5 | 6 | class lcl_test definition inheriting from zcl_falv. 7 | public section. 8 | 9 | protected section. 10 | "redefinition of event handler 11 | methods evf_hotspot_click redefinition. 12 | methods evf_top_of_page redefinition. 13 | private section. 14 | 15 | endclass. 16 | 17 | 18 | 19 | start-of-selection. 20 | 21 | select * up to 100 rows 22 | into corresponding fields of table @sflight 23 | from sflight. 24 | 25 | 26 | "creation of falv with local class redefinition and without passing subclass type 27 | data falv type ref to lcl_test. 28 | 29 | falv ?= lcl_test=>create( changing ct_table = sflight ). 30 | 31 | 32 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 33 | falv->title_v1 = 'ZDEMO_FALV19'. 34 | 35 | falv->top_of_page_height = 100. "absolute size 36 | falv->show_top_of_page( ). 37 | 38 | falv->display( ). 39 | 40 | 41 | 42 | class lcl_test implementation. 43 | method evf_top_of_page. 44 | 45 | e_dyndoc_id->add_text( text = 'Top Of Page' sap_style = cl_dd_area=>heading ). 46 | 47 | e_dyndoc_id->new_line( repeat = 1 ). 48 | 49 | e_dyndoc_id->add_link( 50 | exporting 51 | name = 'ABAPBLOG.com' " Name (You Can Use Any Name You Choose) 52 | url = 'http://abapblog.com' " URL 53 | tooltip = 'ABAPBLOG.com' " Tool Tip 54 | text = 'ABAPBLOG.com' " Text 55 | ). 56 | 57 | 58 | endmethod. 59 | 60 | method evf_hotspot_click. 61 | case e_column_id-fieldname. 62 | when 'SEATSMAX'. 63 | call function 'POPUP_DISPLAY_MESSAGE' 64 | exporting 65 | titel = 'Hotspot is working' " Title 66 | msgid = '00' 67 | msgty = 'I' 68 | msgno = '001' 69 | msgv1 = 'Yupi!'. 70 | endcase. 71 | endmethod. 72 | endclass. 73 | -------------------------------------------------------------------------------- /CODE/zdemo_falv13.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV13 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 |
16 | ZDEMO_FALV13 17 | 0100 18 | E 19 | Demo FALV 20 | N 21 | 0100 22 | 200 23 | 255 24 |
25 | 26 | 27 | SCREEN 28 | SCREEN 29 | 30 | 31 | CUST_CTRL 32 | CC_MAIN 33 | SCREEN 34 | 001 35 | 001 36 | 255 37 | 200 38 | X 39 | X 40 | 010 41 | 010 42 | 43 | 44 | 45 | 46 | SCREEN 47 | SCREEN 48 | OKCODE 49 | OK_CODE 50 | ____________________ 51 | 020 52 | 020 53 | 001 54 | CHAR 55 | X 56 | 57 | 58 |
59 |
60 | 61 | 62 | R 63 | FALV: Mix Demo 64 | 14 65 | 66 | 67 |
68 |
69 |
70 | -------------------------------------------------------------------------------- /CODE/zdemo_falv16.prog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ZDEMO_FALV16 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 |
16 | ZDEMO_FALV16 17 | 0100 18 | E 19 | Demo scree 20 | N 21 | 0100 22 | 200 23 | 255 24 |
25 | 26 | 27 | SCREEN 28 | SCREEN 29 | 30 | 31 | CUST_CTRL 32 | MAIN 33 | SCREEN 34 | 001 35 | 001 36 | 255 37 | 200 38 | X 39 | X 40 | 010 41 | 010 42 | 43 | 44 | 45 | 46 | SCREEN 47 | SCREEN 48 | OKCODE 49 | OK_CODE 50 | ____________________ 51 | 020 52 | 020 53 | 001 54 | CHAR 55 | X 56 | 57 | 58 |
59 |
60 | 61 | 62 | R 63 | FALV: Split container on custom container screen 64 | 48 65 | 66 | 67 |
68 |
69 |
70 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_display.abap: -------------------------------------------------------------------------------- 1 | function z_falv_display. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" REFERENCE(IO_FALV) TYPE REF TO ZCL_FALV 6 | *" VALUE(IV_START_ROW) TYPE I OPTIONAL 7 | *" VALUE(IV_START_COLUMN) TYPE I OPTIONAL 8 | *" VALUE(IV_END_ROW) TYPE I OPTIONAL 9 | *" VALUE(IV_END_COLUMN) TYPE I OPTIONAL 10 | *"---------------------------------------------------------------------- 11 | if not line_exists( outputs[ table_line->falv = io_falv ] ). 12 | data(output) = new lcl_output( io_falv ). 13 | insert output into table outputs. 14 | current_guid = output->guid. 15 | assign output to . 16 | if sy-subrc eq 0. 17 | 18 | endif. 19 | 20 | else. 21 | assign outputs[ table_line->falv = io_falv ] to . 22 | if sy-subrc eq 0. 23 | current_guid = ->guid. 24 | * ->pbo( iv_dynnr = sy-dynnr ). 25 | if ->falv->built_in_screen is not initial. 26 | "! When you reuse FALV sometimes it needs to be refreshed 27 | "! in order to show on screen. Like with Error log 28 | ->falv->set_dummy_function_code( ). 29 | endif. 30 | endif. 31 | endif. 32 | 33 | insert current_guid into call_stack index 1. 34 | 35 | if io_falv->screen eq io_falv->c_screen_popup. 36 | call screen io_falv->screen starting at iv_start_column iv_start_row 37 | ending at iv_end_column iv_end_row 38 | . 39 | else. 40 | call screen io_falv->screen. 41 | endif. 42 | 43 | delete call_stack index 1. 44 | if lines( call_stack ) gt 0. 45 | current_guid = call_stack[ 1 ]. 46 | assign outputs[ table_line->guid = current_guid ] to . 47 | if sy-subrc eq 0. 48 | "! When you reuse FALV sometimes it needs to be refreshed 49 | "! in order to show on screen. Like with Error log 50 | ->falv->set_dummy_function_code( ). 51 | ->pbo( iv_dynnr = sy-dynnr ). 52 | endif. 53 | endif. 54 | 55 | endfunction. 56 | -------------------------------------------------------------------------------- /CODE/zdemo_falv02.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV with redefinition of hotspot event handler 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv02. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | 8 | class lcl_test definition inheriting from zcl_falv. 9 | public section. 10 | 11 | protected section. 12 | "redefinition of event handler 13 | methods evf_hotspot_click redefinition. 14 | methods evf_top_of_page redefinition. 15 | private section. 16 | 17 | endclass. 18 | 19 | class lcl_test implementation. 20 | 21 | method evf_hotspot_click. 22 | case e_column_id-fieldname. 23 | when 'SEATSMAX'. 24 | call function 'POPUP_DISPLAY_MESSAGE' 25 | exporting 26 | titel = 'Hotspot is working' " Title 27 | msgid = '00' 28 | msgty = 'I' 29 | msgno = '001' 30 | msgv1 = 'Yupi!'. 31 | endcase. 32 | endmethod. 33 | 34 | method evf_top_of_page. 35 | 36 | e_dyndoc_id->add_text( text = 'Top Of Page' sap_style = cl_dd_area=>heading ). 37 | 38 | e_dyndoc_id->new_line( repeat = 1 ). 39 | 40 | e_dyndoc_id->add_link( 41 | exporting 42 | name = 'ABAPBLOG.com' " Name (You Can Use Any Name You Choose) 43 | url = 'http://abapblog.com' " URL 44 | tooltip = 'ABAPBLOG.com' " Tool Tip 45 | text = 'ABAPBLOG.com' " Text 46 | ). 47 | 48 | 49 | endmethod. 50 | 51 | endclass. 52 | 53 | start-of-selection. 54 | 55 | select * up to 100 rows 56 | into corresponding fields of table @sflight 57 | from sflight. "#EC CI_NOWHERE 58 | 59 | "creation of falv with local redefinition 60 | data falv type ref to lcl_test. 61 | falv ?= lcl_test=>create( changing ct_table = sflight ). 62 | 63 | "Add hotspot to column 'SEATSMAX' 64 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 65 | 66 | falv->top_of_page_height = 100. "absolute size 67 | 68 | "Enable top_of_page and display Grid on full screen 69 | falv->show_top_of_page( )->display( ). 70 | -------------------------------------------------------------------------------- /CODE/zdemo_falv03.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with partly dynamic GUI STATUS 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv03. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | class lcl_test definition inheriting from zcl_falv. 8 | public section. 9 | 10 | protected section. 11 | "redefinition of event handler 12 | methods evf_user_command redefinition. 13 | private section. 14 | 15 | endclass. 16 | 17 | class lcl_test implementation. 18 | 19 | method evf_user_command. 20 | case e_ucomm. 21 | when zcl_falv_dynamic_status=>b_01. 22 | call function 'POPUP_DISPLAY_MESSAGE' 23 | exporting 24 | titel = 'Popup' " Title 25 | msgid = '00' 26 | msgty = 'S' 27 | msgno = '001' 28 | msgv1 = 'Button 1 clicked'. 29 | when zcl_falv_dynamic_status=>b_02. 30 | call function 'POPUP_DISPLAY_MESSAGE' 31 | exporting 32 | titel = 'Popup' " Title 33 | msgid = '00' 34 | msgty = 'S' 35 | msgno = '001' 36 | msgv1 = 'Button 2 clicked'. 37 | when others. 38 | super->evf_user_command( e_ucomm ). 39 | endcase. 40 | endmethod. 41 | endclass. 42 | 43 | start-of-selection. 44 | 45 | 46 | select * up to 100 rows 47 | into corresponding fields of table @sflight 48 | from sflight. "#EC CI_NOWHERE 49 | 50 | "creation of falv with local redefinition 51 | data falv type ref to lcl_test. 52 | falv ?= lcl_test=>create( changing ct_table = sflight ) . 53 | 54 | "Add title variable 55 | falv->title_v1 = 'ZDEMO_FALV03'. 56 | 57 | "Add button into GUI status at for function F01 (in partial dynamic GUI Status we can have up to 19 buttons) 58 | falv->gui_status->add_button( 59 | exporting 60 | iv_button = zcl_falv_dynamic_status=>b_01 61 | iv_text = 'POPUP 01' 62 | iv_icon = icon_abc 63 | )->add_button( 64 | exporting 65 | iv_button = zcl_falv_dynamic_status=>b_02 66 | iv_text = 'POPUP 02' 67 | iv_icon = icon_address 68 | ). 69 | 70 | "Display full screen grid 71 | falv->display( ). 72 | -------------------------------------------------------------------------------- /CODE/zdemo_falv15.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV built-in screen call stack 2 | "! It helps to check if grid is visible correctly 3 | "! when FALV use itself 4 | "! done by Lukasz Pegiel for http://abapblog.com 5 | 6 | report zdemo_falv15. 7 | 8 | 9 | data: sflight type standard table of sflight, 10 | spfli type standard table of spfli. 11 | data: falv_called type ref to zcl_falv. 12 | 13 | class lcl_test definition inheriting from zcl_falv. 14 | public section. 15 | 16 | protected section. 17 | "redefinition of event handler 18 | methods evf_user_command redefinition. 19 | private section. 20 | 21 | endclass. 22 | 23 | class lcl_test implementation. 24 | 25 | method evf_user_command. 26 | case e_ucomm. 27 | when zcl_falv_dynamic_status=>b_01. 28 | falv_called->display( ). 29 | when others. 30 | super->evf_user_command( e_ucomm ). 31 | endcase. 32 | endmethod. 33 | endclass. 34 | 35 | start-of-selection. 36 | 37 | 38 | select * up to 100 rows 39 | into corresponding fields of table @sflight 40 | from sflight. 41 | 42 | select * up to 100 rows 43 | into corresponding fields of table @spfli 44 | from spfli. 45 | 46 | 47 | "creation of falv with local redefinition 48 | data falv type ref to lcl_test. 49 | falv ?= lcl_test=>create( exporting i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 50 | changing ct_table = sflight ) . 51 | 52 | "Add title variable 53 | falv->title_v1 = 'ZDEMO_FALV15'. 54 | 55 | "Add button into GUI status at for function F01 (in partial dynamic GUI Status we can have up to 19 buttons) 56 | falv->gui_status->add_button( 57 | exporting 58 | iv_button = zcl_falv_dynamic_status=>b_01 59 | iv_text = 'Call second ALV' 60 | iv_icon = icon_list 61 | * iv_qinfo = 62 | * iv_allowed = ABAP_TRUE 63 | exceptions 64 | button_already_filled = 1 65 | button_does_not_exists = 2 66 | icon_and_text_empty = 3 67 | others = 4 68 | ). 69 | if sy-subrc <> 0. 70 | endif. 71 | 72 | falv_called ?= zcl_falv=>create( changing ct_table = spfli ). 73 | 74 | "Display full screen grid 75 | falv->display( ). 76 | -------------------------------------------------------------------------------- /CODE/zdemo_falv09.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV with cell settings 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv09. 4 | 5 | types: begin of t_sflight. 6 | include type sflight. 7 | types: styles type lvc_t_styl, 8 | end of t_sflight. 9 | 10 | data: sflight type standard table of t_sflight. 11 | 12 | 13 | class lcl_test definition inheriting from zcl_falv. 14 | public section. 15 | 16 | protected section. 17 | "redefinition of event handler 18 | methods evf_hotspot_click redefinition. 19 | private section. 20 | 21 | endclass. 22 | 23 | class lcl_test implementation. 24 | 25 | method evf_hotspot_click. 26 | case e_column_id-fieldname. 27 | when 'SEATSMAX'. 28 | me->set_cell_disabled( 29 | exporting 30 | iv_fieldname = e_column_id-fieldname 31 | iv_row = es_row_no-row_id 32 | ). 33 | me->set_cell_button( 34 | exporting 35 | iv_fieldname = 'PRICE' 36 | iv_row = es_row_no-row_id 37 | ). 38 | 39 | me->set_cell_hotspot( 40 | exporting 41 | iv_fieldname = 'CARRID' 42 | iv_row = es_row_no-row_id 43 | ). 44 | 45 | 46 | 47 | set_cell_styles( 48 | EXPORTING 49 | iv_fieldname = 'CARRID' 50 | iv_row = es_row_no-row_id 51 | iv_style = '00000020' 52 | * style2 = 53 | ). 54 | me->soft_refresh( ). 55 | endcase. 56 | endmethod. 57 | 58 | endclass. 59 | 60 | start-of-selection. 61 | 62 | select * up to 100 rows 63 | into corresponding fields of table @sflight 64 | from sflight. 65 | 66 | "creation of falv with local redefinition 67 | data falv type ref to lcl_test. 68 | falv ?= lcl_test=>create( exporting i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 69 | changing ct_table = sflight ) . 70 | 71 | 72 | "Add title variable 73 | falv->title_v1 = 'ZDEMO_FALV09'. 74 | 75 | "set whole grid editable 76 | falv->layout->set_edit( abap_true ). 77 | falv->set_editable( iv_modify = abap_true ). 78 | 79 | "Set style column name 80 | falv->layout->set_stylefname( 'STYLES' ). 81 | 82 | falv->column( 'SEATSMAX' )->set_hotspot( abap_true ). 83 | 84 | "Display full screen grid 85 | falv->display( ). 86 | -------------------------------------------------------------------------------- /CODE/zdemo_falv25.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zdemo_falv25 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | REPORT zdemo_falv25. 7 | 8 | 9 | 10 | DATA: sflight TYPE STANDARD TABLE OF sflight. 11 | 12 | 13 | CLASS lcl_test DEFINITION INHERITING FROM zcl_falv. 14 | PUBLIC SECTION. 15 | 16 | PROTECTED SECTION. 17 | "redefinition of event handler 18 | METHODS evf_ondrag REDEFINITION. 19 | METHODS evf_ondrop REDEFINITION. 20 | PRIVATE SECTION. 21 | 22 | ENDCLASS. 23 | 24 | CLASS lcl_test IMPLEMENTATION. 25 | 26 | 27 | METHOD evf_ondrag. 28 | CALL FUNCTION 'POPUP_DISPLAY_MESSAGE' 29 | EXPORTING 30 | titel = 'Drag' " Title 31 | msgid = '00' 32 | msgty = 'I' 33 | msgno = '001' 34 | msgv1 = 'Yupi!'. 35 | ENDMETHOD. 36 | 37 | METHOD evf_ondrop. 38 | 39 | CALL FUNCTION 'POPUP_DISPLAY_MESSAGE' 40 | EXPORTING 41 | titel = 'Drop' " Title 42 | msgid = '00' 43 | msgty = 'I' 44 | msgno = '001' 45 | msgv1 = 'Yupi!'. 46 | 47 | ENDMETHOD. 48 | 49 | ENDCLASS. 50 | 51 | START-OF-SELECTION. 52 | 53 | SELECT * UP TO 100 ROWS 54 | INTO CORRESPONDING FIELDS OF TABLE @sflight 55 | FROM sflight. "#EC CI_NOWHERE 56 | 57 | "creation of falv with local redefinition 58 | DATA falv TYPE REF TO lcl_test. 59 | falv ?= lcl_test=>create( CHANGING ct_table = sflight ). 60 | 61 | 62 | DATA(drag_object) = NEW cl_dragdrop( ). 63 | drag_object->add( EXPORTING flavor = 'Line' 64 | dragsrc = abap_true 65 | droptarget = abap_true 66 | effect = cl_dragdrop=>copy 67 | EXCEPTIONS already_defined = 1 68 | obj_invalid = 2 69 | OTHERS = 3 ). 70 | IF sy-subrc = 0. 71 | drag_object->get_handle( IMPORTING handle = DATA(handle) 72 | EXCEPTIONS obj_invalid = 1 73 | OTHERS = 2 ). 74 | IF sy-subrc = 0. 75 | falv->layout->set_s_dragdrop( VALUE #( row_ddid = handle cntr_ddid = handle ) ). 76 | ELSE. 77 | ENDIF. 78 | ENDIF. 79 | 80 | "Enable top_of_page and display Grid on full screen 81 | falv->show_top_of_page( )->display( ). 82 | -------------------------------------------------------------------------------- /CODE/zdemo_falv16.prog.abap: -------------------------------------------------------------------------------- 1 | report zdemo_falv16. 2 | 3 | 4 | data: spfli type standard table of spfli, 5 | sflight type standard table of sflight, 6 | falv_first type ref to zcl_falv, 7 | falv_second type ref to zcl_falv, 8 | splitter type ref to cl_gui_splitter_container. 9 | 10 | constants: custom_container_name type char30 value 'MAIN'. 11 | 12 | 13 | initialization. 14 | 15 | select * up to 50 rows into corresponding fields of table @spfli 16 | from spfli. "#EC CI_NOWHERE 17 | 18 | select * up to 100 rows into corresponding fields of table @sflight 19 | from sflight. "#EC CI_NOWHERE 20 | 21 | 22 | call screen 0100. 23 | 24 | module pbo output. 25 | set pf-status 'DYNAMIC_STATUS' of program 'SAPLZFALV'. 26 | 27 | if splitter is initial. 28 | splitter = new cl_gui_splitter_container( columns = 1 29 | rows = 2 30 | parent = new cl_gui_custom_container( container_name = custom_container_name ) 31 | ). 32 | falv_first = zcl_falv=>create( exporting i_parent = splitter->get_container( 33 | row = 1 34 | column = 1 35 | ) 36 | changing ct_table = spfli ). 37 | 38 | falv_second = zcl_falv=>create( exporting i_parent = splitter->get_container( 39 | row = 2 40 | column = 1 41 | ) 42 | changing ct_table = sflight ). 43 | 44 | falv_first->column( 'CONNID' )->set_editable( ). 45 | falv_first->set_editable( 46 | iv_modify = abap_true 47 | ). 48 | 49 | falv_first->add_button( 50 | exporting 51 | iv_function = zcl_falv=>fc_mass_replace 52 | iv_icon = icon_replace 53 | ). 54 | 55 | falv_first->display( ). 56 | falv_second->display( ). 57 | endif. 58 | endmodule. 59 | 60 | module pai input. 61 | 62 | case sy-ucomm. 63 | when 'BACK' or 'UP' or 'EXIT'. 64 | leave to screen 0. 65 | endcase. 66 | 67 | endmodule. 68 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvp01.abap: -------------------------------------------------------------------------------- 1 | class lcl_output implementation. 2 | 3 | method constructor. 4 | call function 'GUID_CREATE' 5 | importing 6 | ev_guid_22 = guid. 7 | falv = io_falv. 8 | endmethod. 9 | method show. 10 | check cl_gui_alv_grid=>offline( ) is initial. 11 | loop at outputs assigning field-symbol() where table_line->guid ne me->guid 12 | "and table_line->falv->screen eq falv->screen 13 | . 14 | ->hide( ). 15 | endloop. 16 | 17 | falv->main_container->set_visible( abap_true ). 18 | falv->parent->set_visible( abap_true ). 19 | falv->set_visible( abap_true ). 20 | endmethod. 21 | method hide. 22 | check cl_gui_alv_grid=>offline( ) is initial. 23 | falv->set_visible( abap_false ). 24 | falv->parent->set_visible( abap_false ). 25 | falv->main_container->set_visible( abap_false ). 26 | endmethod. 27 | 28 | method pbo. 29 | show( ). 30 | 31 | falv->pbo( iv_dynnr = iv_dynnr ). 32 | if first_output eq abap_true. 33 | 34 | cl_gui_cfw=>flush( 35 | exceptions 36 | cntl_system_error = 0 37 | cntl_error = 0 38 | others = 0 ). 39 | falv->display( iv_force_grid = abap_true ). 40 | 41 | clear first_output. 42 | * if falv->split_container is not initial or falv->built_in_screen is not initial. 43 | * "! When I use embedded applog then although it's container is hidden 44 | * "! then you can still see the place for it until some pbo will happen. 45 | * "! I force dummy user-command to get rid of it 46 | * falv->set_dummy_function_code( ). 47 | * endif. 48 | endif. 49 | 50 | endmethod. 51 | 52 | method pai. 53 | check c_ucomm is not initial. 54 | falv->pai( exporting iv_dynnr = sy-dynnr changing c_ucomm = c_ucomm ). 55 | endmethod. 56 | 57 | method end_of_ss1001. 58 | receive results from function 'Z_FALV_CALL_MASS_SS' 59 | importing 60 | et_rsparams = mass_repl_params. 61 | wait_for_mass_repl = space. 62 | endmethod. 63 | 64 | method set_ss1001_status. 65 | data: exclude type standard table of rsexfcode. 66 | if sy-dynnr eq 1001. 67 | exclude = value #( ( fcode = 'GET' ) ( fcode = 'SPOS' ) ( fcode = 'NONE' ) ). 68 | call function 'RS_SET_SELSCREEN_STATUS' 69 | exporting 70 | p_status = space 71 | p_program = sy-repid 72 | tables 73 | p_exclude = exclude. 74 | endif. 75 | 76 | endmethod. 77 | 78 | endclass. 79 | -------------------------------------------------------------------------------- /CODE/zdemo_falv04.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV full screen with fully dynamic GUI STATUS 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv04. 4 | 5 | data: sflight type standard table of sflight. 6 | 7 | class lcl_test definition inheriting from zcl_falv. 8 | public section. 9 | 10 | protected section. 11 | "redefinition of event handler 12 | methods evf_user_command redefinition. 13 | private section. 14 | 15 | endclass. 16 | 17 | class lcl_test implementation. 18 | 19 | method evf_user_command. 20 | case e_ucomm. 21 | when zcl_falv_dynamic_status=>b_01. 22 | call function 'POPUP_DISPLAY_MESSAGE' 23 | exporting 24 | titel = 'Popup' " Title 25 | msgid = '00' 26 | msgty = 'S' 27 | msgno = '001' 28 | msgv1 = 'Button 1 clicked'. 29 | when zcl_falv_dynamic_status=>b_02. 30 | call function 'POPUP_DISPLAY_MESSAGE' 31 | exporting 32 | titel = 'Popup' " Title 33 | msgid = '00' 34 | msgty = 'S' 35 | msgno = '001' 36 | msgv1 = 'Button 2 clicked'. 37 | when others. 38 | super->evf_user_command( e_ucomm ). 39 | endcase. 40 | endmethod. 41 | 42 | endclass. 43 | 44 | start-of-selection. 45 | 46 | 47 | select * up to 100 rows 48 | into corresponding fields of table @sflight 49 | from sflight. "#EC CI_NOWHERE 50 | 51 | "creation of falv with local redefinition 52 | data falv type ref to lcl_test. 53 | falv ?= lcl_test=>create( exporting i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 54 | changing ct_table = sflight ) . 55 | 56 | "Add title variable 57 | falv->title_v1 = 'ZDEMO_FALV04'. 58 | 59 | "Set Gui status to fully dynamic (no standard buttons of ALV Grid) 60 | falv->gui_status->fully_dynamic = abap_true. 61 | 62 | "Add button into GUI status at for function F01 (in full dynamic GUI Status we can have up to 35 buttons) 63 | falv->gui_status->add_button( 64 | exporting 65 | iv_button = zcl_falv_dynamic_status=>b_01 66 | iv_text = 'POPUP 01' 67 | iv_icon = icon_abc 68 | * iv_qinfo = 69 | * iv_allowed = ABAP_TRUE 70 | exceptions 71 | button_already_filled = 0 72 | button_does_not_exists = 0 73 | icon_and_text_empty = 0 74 | others = 0 75 | ). 76 | 77 | "Add button into GUI status at for function F02 78 | falv->gui_status->add_button( 79 | exporting 80 | iv_button = zcl_falv_dynamic_status=>b_02 81 | iv_text = 'POPUP 02' 82 | iv_icon = icon_address 83 | * iv_qinfo = 84 | * iv_allowed = ABAP_TRUE 85 | exceptions 86 | button_already_filled = 0 87 | button_does_not_exists = 0 88 | icon_and_text_empty = 0 89 | others = 0 90 | ). 91 | 92 | "Display full screen grid 93 | falv->display( ). 94 | -------------------------------------------------------------------------------- /CODE/zdemo_falv05.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV grid button adding, deleting, enabling, disabling 2 | "! done by Lukasz Pegiel for http://abapblog.com 3 | report zdemo_falv05. 4 | 5 | 6 | data: sflight type standard table of sflight. 7 | 8 | 9 | class lcl_test definition inheriting from zcl_falv. 10 | public section. 11 | 12 | protected section. 13 | "redefinition of event handler 14 | methods evf_user_command redefinition. 15 | private section. 16 | 17 | endclass. 18 | 19 | class lcl_test implementation. 20 | 21 | method evf_user_command. 22 | case e_ucomm. 23 | when zcl_falv_dynamic_status=>b_01. 24 | me->enable_button( me->mc_fc_print_back ). 25 | when zcl_falv_dynamic_status=>b_02. 26 | me->disable_button( me->mc_fc_print_back ). 27 | me->add_button( 28 | exporting 29 | iv_function = zcl_falv_dynamic_status=>b_03 30 | iv_icon = icon_alarm 31 | ). 32 | when zcl_falv_dynamic_status=>b_03. 33 | me->delete_button( zcl_falv_dynamic_status=>b_03 ). 34 | when others. 35 | super->evf_user_command( e_ucomm ). 36 | endcase. 37 | endmethod. 38 | 39 | endclass. 40 | 41 | start-of-selection. 42 | 43 | 44 | select * up to 100 rows 45 | into corresponding fields of table @sflight 46 | from sflight. "#EC CI_NOWHERE 47 | 48 | "creation of falv with local redefinition 49 | data falv type ref to lcl_test. 50 | falv ?= lcl_test=>create( exporting i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 51 | changing ct_table = sflight ) . 52 | 53 | "Add title variable 54 | falv->title_v1 = 'ZDEMO_FALV05'. 55 | 56 | "Set Gui status to fully dynamic (no standard buttons of ALV Grid) 57 | falv->gui_status->fully_dynamic = abap_true. 58 | 59 | "Add button into GUI status at for function F01 (in partial dynamic GUI Status we can have up to 19 buttons) 60 | falv->gui_status->add_button( 61 | exporting 62 | iv_button = zcl_falv_dynamic_status=>b_01 63 | iv_text = 'Enable Print' 64 | iv_icon = icon_activate 65 | * iv_qinfo = 66 | * iv_allowed = ABAP_TRUE 67 | exceptions 68 | button_already_filled = 0 69 | button_does_not_exists = 0 70 | icon_and_text_empty = 0 71 | others = 0 72 | ). 73 | 74 | "Add button into GUI status at for function F02 75 | falv->gui_status->add_button( 76 | exporting 77 | iv_button = zcl_falv_dynamic_status=>b_02 78 | iv_text = 'Disable Print' 79 | iv_icon = icon_active_inactive 80 | * iv_qinfo = 81 | * iv_allowed = ABAP_TRUE 82 | exceptions 83 | button_already_filled = 0 84 | button_does_not_exists = 0 85 | icon_and_text_empty = 0 86 | others = 0 87 | ). 88 | 89 | "In default when we use full screen FALV, Grid toolbar is switched off, we must turn it on ) 90 | falv->layout->set_no_toolbar( abap_false ). 91 | 92 | "we Add buttons to ALV grid toolbar, I'll use same function like in GUI status 93 | falv->add_button( 94 | exporting 95 | iv_function = zcl_falv_dynamic_status=>b_01 96 | iv_icon = icon_activate 97 | * iv_quickinfo = 98 | * iv_butn_type = 99 | * iv_disabled = 100 | iv_text = 'Enable Print' 101 | * iv_checked = 102 | ). 103 | "we Add buttons to ALV grid toolbar, I'll use same function like in GUI status 104 | falv->add_button( 105 | exporting 106 | iv_function = zcl_falv_dynamic_status=>b_02 107 | iv_icon = icon_active_inactive 108 | * iv_quickinfo = 109 | * iv_butn_type = 110 | * iv_disabled = 111 | iv_text = 'Disable Print' 112 | * iv_checked = 113 | ). 114 | 115 | "remove button "Details" & "Info" from standard Grid functions 116 | falv->delete_button( falv->mc_fc_detail ). 117 | falv->delete_button( falv->mc_fc_info ). 118 | "Display full screen grid 119 | falv->display( ). 120 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.lzfalvtop.abap: -------------------------------------------------------------------------------- 1 | function-pool zfalv. "MESSAGE-ID .. 2 | class lcl_output definition deferred. 3 | 4 | types: t_output type ref to lcl_output. 5 | types: tt_output type sorted table of t_output with unique key table_line. 6 | data: current_guid type char22. 7 | data: outputs type tt_output. 8 | data: okcode type sy-ucomm. 9 | data: call_stack type standard table of char22. 10 | field-symbols: type t_output. 11 | include lzfalvd01. " Local class definition 12 | 13 | DATA: dummy_container TYPE REF TO cl_gui_container. 14 | DATA: create_dummy_container TYPE abap_bool. 15 | 16 | data: g_par01_type type char255. 17 | data: g_par02_type type char255. 18 | data: g_par03_type type char255. 19 | data: g_par04_type type char255. 20 | data: g_par05_type type char255. 21 | data: g_par06_type type char255. 22 | data: g_par07_type type char255. 23 | data: g_par08_type type char255. 24 | data: g_par09_type type char255. 25 | data: g_par10_type type char255. 26 | data: g_wait type c. 27 | data: g_fieldname type string. 28 | data: g_okcode type sy-ucomm. 29 | field-symbols: type lvc_s_fcat. 30 | field-symbols: type any. 31 | 32 | define add_param_descr. 33 | concatenate 'P_DESC' &1 into g_fieldname. 34 | assign (g_fieldname) to . 35 | if sy-subrc eq 0. 36 | = &2. 37 | endif. 38 | concatenate 'P_WITH' &1 into g_fieldname. 39 | assign (g_fieldname) to . 40 | if sy-subrc eq 0. 41 | = text-s02. 42 | endif. 43 | concatenate 'P_CLEA' &1 into g_fieldname. 44 | assign (g_fieldname) to . 45 | if sy-subrc eq 0. 46 | = text-s03. 47 | endif. 48 | end-of-definition. 49 | 50 | define change_parametr_type. 51 | data: f_type type string. 52 | concatenate 'G_PAR' &1 '_TYPE' into g_fieldname. 53 | concatenate &2 '-' &3 into f_type. 54 | assign (g_fieldname) to . 55 | if sy-subrc eq 0. 56 | = f_type. 57 | endif. 58 | end-of-definition. 59 | 60 | 61 | *--------------------------------------------------------------------* 62 | * begin of selection screens 63 | *-- 64 | define add_ss_line. 65 | selection-screen begin of line. 66 | selection-screen comment 1(14) p_clea&1. 67 | parameters: p_parc&1 as checkbox user-command p_parc&1. 68 | selection-screen comment 18(10) p_desc&1. 69 | parameters: p_parf&1 like (g_par&1_type) lower case. 70 | selection-screen comment 77(6) p_with&1. 71 | parameters: p_part&1 like (g_par&1_type) lower case. 72 | 73 | "selection-screen comment 51(10) p_with&1. 74 | selection-screen end of line. 75 | end-of-definition. 76 | 77 | 78 | 79 | "mass replace ss 80 | selection-screen begin of screen 1001. 81 | add_ss_line: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10. 82 | selection-screen end of screen 1001. 83 | 84 | 85 | at selection-screen output. 86 | if sy-dynnr eq 1001. 87 | lcl_output=>set_ss1001_status( ). 88 | set titlebar 'TITLE' with text-s01. 89 | loop at screen. 90 | if screen-name cp '*P_*01*' and g_par01_type is initial. 91 | clear: p_parf01, p_part01. 92 | screen-active = 0. 93 | modify screen. 94 | endif. 95 | if screen-name cp '*P_*02*' and g_par02_type is initial. 96 | clear: p_parf02, p_part02. 97 | screen-active = 0. 98 | modify screen. 99 | endif. 100 | if screen-name cp '*P_*03*' and g_par03_type is initial. 101 | clear: p_parf03, p_part03. 102 | screen-active = 0. 103 | modify screen. 104 | endif. 105 | if screen-name cp '*P_*04*' and g_par04_type is initial. 106 | clear: p_parf04, p_part04. 107 | screen-active = 0. 108 | modify screen. 109 | endif. 110 | if screen-name cp '*P_*05*' and g_par05_type is initial. 111 | clear: p_parf05, p_part05. 112 | screen-active = 0. 113 | modify screen. 114 | endif. 115 | if screen-name cp '*P_*06*' and g_par06_type is initial. 116 | clear: p_parf06, p_part06. 117 | screen-active = 0. 118 | modify screen. 119 | endif. 120 | if screen-name cp '*P_*07*' and g_par07_type is initial. 121 | clear: p_parf07, p_part07. 122 | screen-active = 0. 123 | modify screen. 124 | endif. 125 | if screen-name cp '*P_*08*' and g_par08_type is initial. 126 | clear: p_parf08, p_part08. 127 | screen-active = 0. 128 | modify screen. 129 | endif. 130 | if screen-name cp '*P_*09*' and g_par09_type is initial. 131 | clear: p_parf09, p_part09. 132 | screen-active = 0. 133 | modify screen. 134 | endif. 135 | if screen-name cp '*P_*10*' and g_par10_type is initial. 136 | clear: p_parf10, p_part10. 137 | screen-active = 0. 138 | modify screen. 139 | endif. 140 | if screen-name+0(6) eq 'P_PARF'. 141 | concatenate 'P_PARC' screen-name+6(2) into g_fieldname. 142 | assign (g_fieldname) to . 143 | if sy-subrc eq 0 and is not initial. 144 | assign (screen-name) to . 145 | if sy-subrc eq 0. 146 | clear . 147 | endif. 148 | screen-input = 0. 149 | modify screen. 150 | elseif sy-subrc eq 0. 151 | screen-input = 1. 152 | modify screen. 153 | endif. 154 | endif. 155 | endloop. 156 | endif. 157 | 158 | 159 | if sy-dynnr eq 1001. 160 | g_okcode = sy-ucomm. 161 | clear sy-ucomm. 162 | case g_okcode. 163 | when 'ENTER'. 164 | " return. 165 | when 'CANCEL'. 166 | clear: p_parf01, p_parf02, p_parf03, p_parf04, p_parf05, p_parf06, p_parf07, p_parf08, p_parf09, p_parf10, 167 | p_part01, p_part02, p_part03, p_part04, p_part05, p_part06, p_part07, p_part08, p_part09, p_part10 . 168 | "return. 169 | when 'P_PARC01' or 'P_PARC02' or 'P_PARC03' or 'P_PARC04' or 'P_PARC05' or 'P_PARC06' or 'P_PARC07' or 'P_PARC08' or 170 | 'P_PARC09' or 'P_PARC10'. 171 | 172 | endcase. 173 | endif. 174 | -------------------------------------------------------------------------------- /CODE/zdemo_falv13.prog.abap: -------------------------------------------------------------------------------- 1 | "! This is demo for FALV Mix Demo. It contains many features, many FALVs in one program 2 | "! and a usage of a own screen with own container and FALV 3 | "! done by Lukasz Pegiel for http://abapblog.com 4 | report zdemo_falv13. 5 | 6 | types: begin of t_sflight. 7 | include type sflight. 8 | types: style type lvc_t_styl, 9 | end of t_sflight. 10 | 11 | data: sflight type standard table of t_sflight. 12 | select * up to 100 rows into corresponding fields of table @sflight 13 | from sflight. 14 | 15 | class lcl_test definition inheriting from zcl_falv. 16 | public section. 17 | 18 | protected section. 19 | methods evf_at_set_title redefinition. 20 | methods evf_top_of_page redefinition. 21 | 22 | private section. 23 | 24 | endclass. 25 | 26 | class lcl_test implementation. 27 | 28 | method evf_at_set_title. 29 | 30 | endmethod. 31 | 32 | method evf_top_of_page. 33 | 34 | e_dyndoc_id->add_text( text = 'Top Of Page' sap_style = cl_dd_area=>heading ). 35 | 36 | e_dyndoc_id->new_line( repeat = 1 ). 37 | 38 | e_dyndoc_id->add_link( 39 | exporting 40 | name = 'ABAPBLOG.com' " Name (You Can Use Any Name You Choose) 41 | url = 'http://abapblog.com' " URL 42 | tooltip = 'ABAPBLOG.com' " Tool Tip 43 | text = 'ABAPBLOG.com' " Text 44 | ). 45 | 46 | 47 | endmethod. 48 | 49 | endclass. 50 | 51 | data: falv_screen type ref to lcl_test. 52 | data: ok_code type sy-ucomm. 53 | 54 | 55 | start-of-selection. 56 | "creation of falv with local redefinition 57 | data falv_redef type ref to lcl_test. 58 | falv_redef ?= lcl_test=>create( exporting i_applog_embedded = abap_false i_popup = abap_true 59 | i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 60 | changing ct_table = sflight ) . 61 | falv_redef->show_top_of_page( ). 62 | falv_redef->add_button( 63 | exporting 64 | iv_function = 'F111' 65 | iv_icon = icon_refresh 66 | iv_butn_type = zcl_falv=>button_normal 67 | ). 68 | falv_redef->delete_button( zcl_falv=>mc_fc_detail ). 69 | falv_redef->display( ). 70 | 71 | zcl_falv=>create( exporting i_popup = abap_true changing ct_table = sflight )->display( ). 72 | falv_redef->display( ). 73 | "creation of standard falv 74 | data(falv_stand) = zcl_falv=>create( exporting i_applog_embedded = abap_true changing ct_table = sflight ). 75 | 76 | falv_stand->gui_status->add_button( 77 | exporting 78 | iv_button = falv_stand->gui_status->b_15 79 | iv_text = 'F15' 80 | iv_icon = icon_refresh 81 | iv_qinfo = 'Test d' 82 | iv_allowed = abap_true 83 | ). 84 | 85 | falv_stand->gui_status->add_button( 86 | exporting 87 | iv_button = falv_stand->gui_status->b_16 88 | iv_text = 'F16' 89 | iv_icon = icon_refresh 90 | iv_qinfo = 'Test d' 91 | iv_allowed = abap_true 92 | ). 93 | 94 | falv_stand->gui_status->add_button( 95 | exporting 96 | iv_button = falv_stand->gui_status->b_17 97 | iv_text = 'F17' 98 | iv_icon = icon_refresh 99 | iv_qinfo = 'Test d' 100 | iv_allowed = abap_true 101 | ). 102 | 103 | falv_stand->gui_status->add_button( 104 | exporting 105 | iv_button = falv_stand->gui_status->b_18 106 | iv_text = 'F18' 107 | iv_icon = icon_refresh 108 | iv_qinfo = 'Test d' 109 | iv_allowed = abap_true 110 | ). 111 | 112 | falv_stand->gui_status->add_button( 113 | exporting 114 | iv_button = falv_stand->gui_status->b_19 115 | iv_text = 'F19' 116 | iv_icon = icon_refresh 117 | iv_qinfo = 'Test d' 118 | iv_allowed = abap_true 119 | ). 120 | 121 | falv_stand->gui_status->add_button( 122 | exporting 123 | iv_button = falv_stand->gui_status->b_13 124 | iv_text = 'F13' 125 | iv_icon = icon_refresh 126 | iv_qinfo = 'Test d' 127 | iv_allowed = abap_true 128 | ). 129 | 130 | falv_stand->gui_status->add_button( 131 | exporting 132 | iv_button = falv_stand->gui_status->b_14 133 | iv_text = 'F14' 134 | iv_icon = icon_refresh 135 | iv_qinfo = 'Test d' 136 | iv_allowed = abap_true 137 | ). 138 | 139 | 140 | falv_stand->display( ). 141 | 142 | "copy of standard falv + some changes of descriptions 143 | data(falv_stand_copy) = falv_stand->create_by_copy( ). 144 | falv_stand_copy->column( 'CARRID' )->set_scrtext_l( 'test' ). 145 | falv_stand_copy->column( 'CARRID' )->set_scrtext_m( 'test' ). 146 | falv_stand_copy->column( 'CARRID' )->set_scrtext_s( 'test' ). 147 | falv_stand_copy->column( 'CARRID' )->set_reptext( 'test' ). 148 | falv_stand_copy->variant-report = sy-repid. 149 | falv_stand_copy->layout_save = 'X'. 150 | falv_stand_copy->layout->set_zebra( abap_true ). 151 | falv_stand_copy->display( ). 152 | 153 | "copy of falv with own local redefinitions 154 | data(falv_redef_copy) = falv_redef->create_by_copy( ). 155 | falv_redef_copy->display( ). 156 | 157 | falv_stand->display( ). 158 | 159 | falv_stand_copy->display( ). 160 | 161 | falv_redef_copy->column( 'SEATSMAX' )->set_edit( abap_true ). 162 | falv_redef_copy->layout->set_edit( abap_true ). 163 | falv_redef_copy->set_editable( ). 164 | falv_redef_copy->layout->set_stylefname( 'STYLE' ). 165 | falv_redef_copy->set_cell_disabled( 166 | exporting 167 | iv_fieldname = 'SEATSMAX' 168 | iv_row = 1 169 | ). 170 | falv_redef_copy->add_button( 171 | exporting 172 | iv_function = zcl_falv=>fc_mass_replace 173 | iv_icon = icon_replace 174 | ). 175 | falv_redef_copy->refresh_table_display( ). 176 | falv_redef_copy->delete_all_buttons( ). 177 | falv_redef_copy->display( ). 178 | 179 | falv_stand->display( ). 180 | 181 | falv_redef_copy->display( ). 182 | 183 | call screen 100. 184 | *&---------------------------------------------------------------------* 185 | *& Module PBO OUTPUT 186 | *&---------------------------------------------------------------------* 187 | * text 188 | *----------------------------------------------------------------------* 189 | module pbo output. 190 | set pf-status 'DYNAMIC_STATUS_PART' of program 'SAPLZFALV'. 191 | if falv_screen is initial. 192 | falv_screen ?= lcl_test=>create( exporting 193 | i_parent = new cl_gui_custom_container( container_name = 'CC_MAIN' ) 194 | i_subclass = cl_abap_classdescr=>describe_by_name( p_name = 'LCL_TEST' ) 195 | changing ct_table = sflight ) . 196 | falv_screen->column( 'CARRID' )->set_reptext( 'test' ). 197 | falv_screen->show_top_of_page( ). 198 | falv_screen->display( ). 199 | endif. 200 | endmodule. 201 | 202 | module pai input. 203 | falv_screen->pai( 204 | exporting 205 | iv_dynnr = sy-dynnr 206 | changing 207 | c_ucomm = ok_code 208 | ). 209 | 210 | endmodule. 211 | -------------------------------------------------------------------------------- /CODE/zfalv.fugr.z_falv_mass_replace.abap: -------------------------------------------------------------------------------- 1 | FUNCTION Z_FALV_MASS_REPLACE. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" REFERENCE(IO_GRID) TYPE REF TO CL_GUI_ALV_GRID 6 | *" CHANGING 7 | *" REFERENCE(CT_OUTTAB) TYPE STANDARD TABLE 8 | *"---------------------------------------------------------------------- 9 | data: ft_rsparams type rsparams_tt. 10 | data: f_lines type i. 11 | data: f_num(2) type n. 12 | data: f_index type i. 13 | data: f_field type string. 14 | data: f_changed type flag. 15 | data: f_tabix type i. 16 | data: f_space like line of ft_rsparams. 17 | 18 | field-symbols: like line of ft_rsparams. 19 | field-symbols: like line of ft_rsparams. 20 | field-symbols: like line of ft_rsparams. 21 | field-symbols: like line of ft_rsparams. 22 | field-symbols: type any table. 23 | field-symbols: type any table. 24 | field-symbols: type any. 25 | field-symbols: type lvc_s_modi-value. 26 | field-symbols: type lvc_t_styl. 27 | field-symbols: