Application Development and Automation 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: 
Read only

Pragma/Pseudo Code to suppress Select *

manuel_horn3
Explorer
0 Likes
13,320

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
Read only

larshp
Active Contributor
0 Likes
3,892

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

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!

3 REPLIES 3
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
3,892

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...

Read only

larshp
Active Contributor
0 Likes
3,893

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

Read only

manuel_horn3
Explorer
0 Likes
3,892

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!