Using ABAP in Eclipse code completion feature

Code completion feature of ABAP in Eclipse can truly speed up your ABAP coding speed. It also reduces spelling errors of keyword or typo mistakes.

Moreover, it suggests correct ABAP syntax so you don’t have to memorize it. These advantages should be enough to bring this feature into practice. Let’s learn how to do it.

We continue enhancing our first program. If you want to create a new ABAP program, feel free to do so.

Notice the above image. As soon as I typed in ‘D’, ADT started reflecting the keyword ‘data’. Now all I have to do is press tab to completed the keyword.

Similarly, as soon as I typed in the alphabet ‘s’, ADT started reflecting ‘standard table of’. I press tab to complete the code. Yes, code completion does speeds coding for ABAP in Eclipse.

Using Ctrl+Space in ADT

As you continue typing in cl_salv_table=> , the ADT starts reflecting the static methods of the class. Hit tab to highlight the method, and hit shift+enter to insert the method. The method along with its complete signature gets inserted.

Delete not required lines from the method and complete the code.

*&---------------------------------------------------------------------*
*& Report zamarmn_prg1
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zamarmn_prg1.

data: gt_sflight type standard table of sflight,
      go_salv type ref to cl_salv_table.

start-of-selection.
select * from sflight into table gt_sflight.

cl_salv_table=>FACTORY(
  importing
    R_SALV_TABLE   = go_salv                          
  changing
    T_TABLE        = gt_sflight
).
go_salv->DISPLAY( ). 

This article explained the very important feature of code completion in ABAP in Eclipse.