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: 

Pragma/Pseudo Code to suppress Select *

manuel_horn3
Explorer
0 Kudos

Hi Experts,

is there a Pragma/Pseudo Code to suppress Select * e.g. if more fields are selected than used in the coding? I tried #EC * but that doesn't work.

Is there another Pragma/Pseudo Code to supress Errors of the Code inspector?

Thanks and regards!

1 ACCEPTED SOLUTION

larshp
Active Contributor
0 Kudos

Hi,

In case you are referring to the code inspector check "Search problematic SELECT * statements", and the error message is "Select-Statement can be transformed. &1% of fields used" then CI_ALL_FIELDS_NEEDED should work.

Sometimes the code inspector check does not inform about the pseudo comment, in this case the comment is documented in the code eg CONSTRUCTOR of class CL_CI_TEST_ANALYZE_SELECT_HANA

3 REPLIES 3

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

CI messages cannot be suppressed by pragmas but by pseudo comments only. As a rule, a CI message should inform you about the corresponding pseudo comment.

https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenpseudo_comment...

larshp
Active Contributor
0 Kudos

Hi,

In case you are referring to the code inspector check "Search problematic SELECT * statements", and the error message is "Select-Statement can be transformed. &1% of fields used" then CI_ALL_FIELDS_NEEDED should work.

Sometimes the code inspector check does not inform about the pseudo comment, in this case the comment is documented in the code eg CONSTRUCTOR of class CL_CI_TEST_ANALYZE_SELECT_HANA

manuel_horn3
Explorer
0 Kudos

Hi,

Thanks a lot for your help! I will test your input. Lars you are right, that is the check that I mean. Is there also a common pseudo comment where I can ignore all errors? I thout #CI * is this general comment. But it doesn't work.

Thanks and regards!