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: 

How to customize SAP Code Inspector?

Former Member
0 Kudos

Hello guys,

I know the basic customization in Code Inspector (SCI) to perform the standards check provided by SAP. However, I would like to customize it further in such a way that i can make use of the feature of approving or rejecting an exception using the path 'Goto->Exceptions' in the SCI transaction. So, my questions and/or issues around this are:

1. How can i create an exception request for the approver?

2. How can i not make an error that the CI identifies to be suppressed by the use of pseudo-comment such as #EC CI_NOWHERE, # EC CI_NOFIELD, etc.? Errors such as these should be reviewed and be approved or rejected by Quality Manager (Approver).

I hope my question is clear. Please tell me if you need more information to understand my question.

Thank you,

vishwanath.

1 ACCEPTED SOLUTION

former_member184455
Active Participant
0 Kudos

Hi Vishwanath,

There is no customizing option in Code Inspector to switch from pseudo-comment to table-based exception for a single or several check messages. Whether a check message can be suppressed by a pseudo-comment or by a table-based exception is defined hardcoded by every check itself, normally in the CONSTRUCTOR of the check class. An internal table SCIMESSAGES is filled with one entry for every check message, and one property of the check message is 'PCOM'. It can be filled with some pseudo-comment like #EC CI_NOFIELD, or alternatively with the constant C_EXCEPTN_BY_TABLE_ENTRY which has the value 'CI_TABL_EXCEPTN'.

The handling via SCI approval framework works for check classes that inherit from CL_CI_TEST_PROGRAM or CL_CI_TEST_DDIC.

If you would like to have for some existing check table-based exceptions instead of pseudo-comments, you have to copy the check class and re-implement the definition of the check messages.

For Code Inspector checks integrated into the ABAP Test Cockpit (ATC), the ATC excemption framework can be used instead of the Code Inspector exception framework (and should be, since it's more robust and well maintained).

Best Regards,

Randolf

1 REPLY 1

former_member184455
Active Participant
0 Kudos

Hi Vishwanath,

There is no customizing option in Code Inspector to switch from pseudo-comment to table-based exception for a single or several check messages. Whether a check message can be suppressed by a pseudo-comment or by a table-based exception is defined hardcoded by every check itself, normally in the CONSTRUCTOR of the check class. An internal table SCIMESSAGES is filled with one entry for every check message, and one property of the check message is 'PCOM'. It can be filled with some pseudo-comment like #EC CI_NOFIELD, or alternatively with the constant C_EXCEPTN_BY_TABLE_ENTRY which has the value 'CI_TABL_EXCEPTN'.

The handling via SCI approval framework works for check classes that inherit from CL_CI_TEST_PROGRAM or CL_CI_TEST_DDIC.

If you would like to have for some existing check table-based exceptions instead of pseudo-comments, you have to copy the check class and re-implement the definition of the check messages.

For Code Inspector checks integrated into the ABAP Test Cockpit (ATC), the ATC excemption framework can be used instead of the Code Inspector exception framework (and should be, since it's more robust and well maintained).

Best Regards,

Randolf