Skip to content

Instantly share code, notes, and snippets.

@mbtools
Created June 24, 2020 09:37
Show Gist options
  • Save mbtools/743b7e082e60b63c7b79334d5d7e4f31 to your computer and use it in GitHub Desktop.
Save mbtools/743b7e082e60b63c7b79334d5d7e4f31 to your computer and use it in GitHub Desktop.
Create index of source code position for classes
REPORT zabapgit_clas_position_index.
DATA: gt_class TYPE TABLE OF seoclsname,
go_helper TYPE REF TO cl_oo_source_pos_index_helper.
START-OF-SELECTION.
CREATE OBJECT go_helper.
SELECT obj_name FROM tadir INTO TABLE gt_class
WHERE pgmid = 'R3TR' AND object = 'CLAS' AND devclass LIKE '$ABAPGIT%'.
LOOP AT gt_class ASSIGNING FIELD-SYMBOL(<g_class>).
WRITE: / sy-tabix, <g_class>.
CALL METHOD go_helper->if_oo_source_pos_index_helper~create_index
EXPORTING
class_name = <g_class>
version = 'A'
IMPORTING
index_tab = DATA(gt_index).
WRITE: 'Lines:', lines( gt_index ).
ENDLOOP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment