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

Code inspector(SCI) error

Former Member
0 Likes
1,675

HI all,

When I do the sci for my program , it is giving the error " Greater than/less than comparisons with character type operands may not be portable".

how can i rectify this.

wil get reward points.

regards,

Ajay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,418

Hi

acording to that

your comparing the charcet vales with lessthan or greater than

if you avoid this that won't get

so make that field as integer field

reward if usefull

10 REPLIES 10
Read only

Former Member
0 Likes
1,419

Hi

acording to that

your comparing the charcet vales with lessthan or greater than

if you avoid this that won't get

so make that field as integer field

reward if usefull

Read only

0 Likes
1,418

Hi Naresh,

I could n't make it 'INT'. it should be Char only. Then what is the solution .

regards,

Ajay

Read only

0 Likes
1,418

Hi ajay,

Can u paste the piece of code .. ?

Read only

0 Likes
1,418

Hi sndeep,

I am wrting like this.

data : LW_CHAR(50)

IF NOT LW_CHAR BETWEEN LW_LOW AND LW_HIGH.

will get full reward points if solved .

regards,

Ajay

Read only

0 Likes
1,418

hi,

Which release u are working on ( is it 4.7 or above)?

Also , data type of lw_low and high?

Read only

0 Likes
1,418

Hi sandeep,

all are CHAR only.

regards,

Ajay

Read only

0 Likes
1,418

Hi,

I tried this in ECC6.0 and it works fine for me.

No SCI errors .

DATA : lw_char(50),

lw_low TYPE char50,

lw_high TYPE char50.

*IF NOT lw_char BETWEEN lw_low AND lw_high.

IF lw_char GE lw_low AND lw_char LE lw_high.

ENDIF.

Read only

0 Likes
1,418

Hi sandeep,

When i do the same changes what you suggested in 4.7 i amgetting the SCI errors here.

regards,

Ajayreddy

Read only

0 Likes
1,418

Ajay,

Normally if you use Charcters field ,then should not compare like gt,lt,ge,le..

even you want to keep operation then create one range ..

DATA : lw_char(50),

lw_low TYPE char50,

lw_high TYPE char50.

ranges r_value for lw_char.

r_value-low = lw_low.

r_value-high = lw_high.

r_value-option = 'BT'.

r_value-sign = 'I'.

append r_value.

if not LW_CHAR in r_value.

endif.

Thanks

Seshu

Read only

Former Member
0 Likes
1,418

hi

Tools for Performance Analysis

Run time analysis transaction SE30

SQL Trace transaction ST05

Extended Program Check (SLIN)

Code Inspector ( SCI)

Code Inspector (SCI)

You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).

The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.

<b>click on that error it will explain what you have to do</b>

reward if useful