Recently i have needed an ABAP program which reports ABAP programs with the related code line. My intention was catching Select sql statements without in connection keyword. By this means i had aimed to find all select statements which are selecting from HANA replicated tables but has no HANA connection.
After determining these ABAP programs and related code line, ABAP’ers would be able to fix these code lines. Therefore all
i need was to add a navigation button to that report. After double clicking ABAP program name and line number ABAP’ers could navigate to ABAP editor. EDITOR_PROGRAM was aimed to achieve this . Below code shows its usage.
read table GT_LIST into LS_LIST with key SELECTED = 'X'.
if SY-SUBRC eq 0 .
call function 'EDITOR_PROGRAM'
DISPLAY = 'X'
LINE = LS_LIST-LINE
PROGRAM = LS_LIST-PROGRAM.
if SY-SUBRC ne 0.
write 'error navigating ABAP code'.