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

Extended Program Check Warning For Syntax Check

Former Member
0 Likes
396

Warning:

Syntax Check Warning

This Warning only Displayed in SLIN

WHERE lgtyp IN S_LGTYP.

  Messages :

  In "SELECT SINGLE...", the where condition for the key field "LGTYP" does not test  for equality .

  There fore the single record yuor searching may not be unique.

IF NOT S_LGTYP[] IS INITIAL.

    SELECT SINGLE * FROM T301

     WHERE lgtyp IN S_LGTYP.----


>IT SHOWING THIS LINE

    IF SY-SUBRC NE 0.

      MESSAGE E005(Z01).

    ENDIF.

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
348

Hi Raghu,

When you are using SELECT SINGLE, it is always better to use EQ in the condition than IN.

Instead of using select-options S_LGTYP, declare a parameter: P_LGTYP and if possible re-write the select query as below:

SELECT SINGLE * FROM T301 into lv_variable

WHERE lgtyp EQ P_LGTYP .

Regards

Deepa.

1 REPLY 1
Read only

Former Member
0 Likes
349

Hi Raghu,

When you are using SELECT SINGLE, it is always better to use EQ in the condition than IN.

Instead of using select-options S_LGTYP, declare a parameter: P_LGTYP and if possible re-write the select query as below:

SELECT SINGLE * FROM T301 into lv_variable

WHERE lgtyp EQ P_LGTYP .

Regards

Deepa.