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

abap code inspector (tx : SCI) to detect certain patterns

jihoon_kim
Associate
Associate
0 Likes
1,584

Hello Experts,

I want to use SAP Code Inspector to detect common problematic ABAP codes for all developed programs.

But, I don't know how to make the check variant for detecting follwoing three patterns.

SELECT * FROM

SELECT * INTO

SELECT SINGLE * INTO

I guess I can use "Search for ABAP tokens" or "Search for ABAP statements paterns". But, It did'nt work because ' * ' represents any sequence of characters in the code inspector.

Anyone can help me?

3 REPLIES 3
Read only

jihoon_kim
Associate
Associate
0 Likes
1,043

I managed to set up the variant, however found a problem.

I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.

SELECT + INTO *

SELECT SINGLE + INTO *

However following statements were detected.

SELECT * INTO TABLE IT_DRAW FROM DRAW.

SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.

SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.

SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.

It's because + means one ABAP token in the code inspector.

Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ?

Read only

0 Likes
1,043

Hi,

interesting problem. SCI is a great tool, but you might be able to make this particular scan by using program RPR_ABAP_SOURCE_SCAN instead.

Cheers

Thomas

Read only

0 Likes
1,043

Thanks..

RPR_ABAP_SOURCE_SCAN works as I expected.

By the way, "Performance Check" -> "Copy Large Data Objects" -> "Wide Structures (> 1000B)"

can also be used as a work around.