Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get comments in Class CL_CI_TEST_ABAP_COMP_PROCS Method RUN

sebastian_wilhelm1
Participant
0 Kudos
612

Hi experts,

I wanna create a custom check-class for ATC/CI Checks inheriting from class CL_CI_TEST_ABAP_COMP_PROCS (and NOT from CL_CI_TEST_SCAN). With iTab PROC_REFS the class offers a modern way of structuring the abap-objects for the needed checks. Now, I have the requirement to check comments within the abap-objects. The Problem is, that PROC_REFS doesn't contain any comments. Does anybody know, if I can trigger something or set some Customizing which will add the comments to PROC_REFS?

Thanks and regards,

Sebastian

.

1 ACCEPTED SOLUTION

BjörnJüliger
Product and Topic Expert
Product and Topic Expert
0 Kudos
415

Hello Sebastian,

there is no way to include comments in the COMP_PROCS structures - for one, because they don't fit into the organization of the code into procedures and statements. A comment - in particular a full-line comment starting with asterisks - is not unambiguously associated with a statement and hence it is unclear where exactly one would expect such comments to show up in the analysis structures.

If you need to analyse comments, you need to use the "raw" output of the SCAN statements. In classes inheriting from CL_CI_TEST_ABAP_COMP_PROCS this is available in the SCANS instance attribute if you have set the SCAN_NEEDED attribute in the constructor of your check class.

Kind regards,

Björn

2 REPLIES 2

BjörnJüliger
Product and Topic Expert
Product and Topic Expert
0 Kudos
416

Hello Sebastian,

there is no way to include comments in the COMP_PROCS structures - for one, because they don't fit into the organization of the code into procedures and statements. A comment - in particular a full-line comment starting with asterisks - is not unambiguously associated with a statement and hence it is unclear where exactly one would expect such comments to show up in the analysis structures.

If you need to analyse comments, you need to use the "raw" output of the SCAN statements. In classes inheriting from CL_CI_TEST_ABAP_COMP_PROCS this is available in the SCANS instance attribute if you have set the SCAN_NEEDED attribute in the constructor of your check class.

Kind regards,

Björn

0 Kudos
415

Thanks Björn! I'll check SCANS