Why I like to code in ABAP in Eclipse
1. My first touch with ABAP in Eclipse
2. Return
I’ve return to Eclipse after month or two, when Kepler release was out together with new version of AiE. I’ve said at the time: “I’ll try to work with Eclipse for one month, if it will not convince me, then I’ll not try it at least to the next Eclipse version (they appear regularly each year)”.
But after one week of working with Eclipse and ABAP OO, I was sure that this is the correct way of working, although there were still some improvements to do.
3. AiE Support and development
Before I will write about the tool itself, I’d like to mention whole AiE development team with Thomas Fiedler on the top of it. Whole team is doing really good job and they are really open on all suggestions and remarks. It happened not once that after a suggestion on SCN or Twitter some new option was added. And when you face a bug in Eclipse, they are also there to help and solve the issue.
How to access private or protected data and methods of CL_GUI_ALV_GRID

Send mail in BADI or User-Exit without commiting

WYSIWYG HTML Editor in ABAP
FALV (Fast ALV Grid)
- Why I've created FALV although SALV classes are provided by SAP?
I know SALV classes although I haven't used them often. The main reason was that they don't provide edit mode. So at the end I've always worked with cl_gui_alv_grid class so then whenever users decided that they need one of the field to be editable then I can do it in few seconds/minutes.
- But there is a way to make SALV editable!
Yes, I know the solutions of Naimesh Patel (found here) and Paul Hardy (in his ABAP to the Future book) and some other folks to make SALV editable. But In my own opinion, especially when you're at least on 7.40 with SP5 making SALV editable is not needed as you can fast create ALV Grid which does everything you want. To be clear the big advantage of SALV, to call grid output of table in two, three lines when you goes to the code you'll see it's nothing more than call of REUSE_ALV_GRID_DISPLAY... really old FM, which at the end use CL_GUI_ALV_GRID.
- Direct reasons
As I used CL_GUI_ALV_GRID so often then I came up with an idea to do some class which will make the creation faster, but I never had time to do it at work. You may know it, because of the time pressure you choose to create report/program/solution in the way you're doing from years ... and then comes another task....and another....
So I've decided to do it at home.... yeah I'm crazy. But at least some of you can also use it.
- Advantages
- Fast CL_GUI_ALV_GRID creation
- Replacement of REUSE_ALV_GRID_DISPLAY and REUSE_ALV_GRID_DISPLAY_LVC for a simple editable reports to omit screen creation
- All events are already handled and with redefinition of method I can faster use it
- Faster setting of layout and field catalog attributes
- Easy switch and copy between popup, full screen and container version
- Easy toolbar handling (in grid and in full screen/popup using Dynamic GUI STATUS & TITLE with ABAP code )
- One place to handle user commands of full screen/popup call -> event user_command
- Prerequisites
I've worked on this on 7.40 SP8 but this should work also on SP5 as well. Sorry for the users bellow that versions but I'm so used to use new syntax that I couldn't force myself to use old way of coding.
UPDATE: Thanks to Santi Moreno we have now 7.31 version, you can find it here as an attachment ZFALV_V1.1.0.zip. Also GitHub repository is now available here https://github.com/fidley/falv so if you'd like to join us, you're more than welcomed.
- Outcome
- Package ZFALV
- Classes
- Function Group
- ZFALV - screens, GUI STATUSES, TITLE, FMs for ZCL_FALV, local classes
- Demo Programs
- ZDEMO_FALV01 - FALV: Demo Simple Full Screen Call
- ZDEMO_FALV02 - FALV: Demo with Redefinitions
- ZDEMO_FALV03 - FALV: Demo Full Screen GUI Status Dynamic Partly
- ZDEMO_FALV04 - FALV: Demo Full Screen GUI Status Dynamic Fully
- ZDEMO_FALV05 - FALV: Demo Full Screen ALV Toolbar
- ZDEMO_FALV06 - FALV: Demo Full Screen Layout
- ZDEMO_FALV07 - FALV: Demo Full Screen Columns
- ZDEMO_FALV08 - FALV: Demo Mass Replace Function
- ZDEMO_FALV09 - FALV: Demo Cell Settings
- ZDEMO_FALV10 - FALV: Demo Colors
- ZDEMO_FALV11 - FALV: Demo Editable
- ZDEMO_FALV12 - FALV: Demo Error Log
- ZDEMO_FALV13 - FALV: Mix Demo + own screen and container usage
- ZDEMO_FALV14 - FALV: Popup calls
FALV (Fast ALV Grid) - First blood
- Fast CL_GUI_ALV_GRID creation
- Replacement of REUSE_ALV_GRID_DISPLAY and REUSE_ALV_GRID_DISPLAY_LVC for a simple editable reports to omit screen creation
- All events should be already handled and with redefinition of method I can faster use it
- Faster setting of layout and field catalog attributes
- Easy switch and copy between popup, full screen and container version
- Easy toolbar handling (in grid and in full screen/popup using Dynamic GUI STATUS & TITLE with ABAP code )
- One place to handle user commands of full screen/popup call -> event user_command
How to teach ABAP ???
How to copy BOM using CEWB Function Modules
- At the beginning let's clear Function Group memory using FM 'CP_CC_S_REFRESH_DATA'. Just for the safety reasons :-)
- Then let's load BOM header data to FG memory. If you want to do mass transaction then you would probably want to fill selection table i_cpsc_bom_sel with more than one BOM number, it will be then faster than calling FM 'CP_CC_S_LOAD_COMPLEX_BY_BOM' separately many times.
- But header data is not enough, we should do same thing for BOM items using FM 'CP_CC_S_LOAD_COMPLEX_BY_ITM', as Items belongs to different work area in CEWB.
- Once we loaded data to memory we can start copying, firstly we need to call 'CP_CC_S_BOM_PROVIDE_BY_MBM' to get source header data and then use its export parameters in FM 'CS_CL_S_MAT_BOM_CREATE_BY_COPY', which is doing copy of a header data.
- Once it's done we have to get source items from memory using 'CS_CL_P_ITM_PROVIDE', and then use it for copying items to our target BOM in 'CS_CL_S_ITM_CREATE_BY_COPY'.
- At the end, when everything is fine, use FM 'CP_CC_S_SAVE' to save your changes and commit your work.
Work done!
Direct access quality notification attachments from action box


The SIN of progress indicator

AiE (ADT) dark theme settings

Dynamic GUI STATUS & TITLE with ABAP code
"! Dummy program for keeping GUI STATUS and TITLE
"! Used by ZCA_AB_DYNAMIC_GUI
"! Do not delete it!!!
report zab_dynamic_gui_status.

Create fieldcatalog from internal table
class-methods lvc_fcat_from_internal_table
importing
it_table type any table
returning value(rt_fcat) type lvc_t_fcat.
method lvc_fcat_from_internal_table.
data: table type ref to data.
create data table like it_table.
assign table->* to field-symbol(<table>).
try.
cl_salv_table=>factory( importing
r_salv_table = data(salv_table)
changing
t_table = <table> ).
rt_fcat = cl_salv_controller_metadata=>get_lvc_fieldcatalog(
r_columns = salv_table->get_columns( ) " ALV Filter
r_aggregations = salv_table->get_aggregations( ) " ALV Aggregations
).
catch cx_root.
endtry.
endmethod.