Code Isnpector Issues
Appreciate your help on these two code inspector errors
1. NO CHECK or IF SY-TFILL > 0 preceeding SELECT...FOR ALL ENTRIES was found in line
SELECT docnum countr stapa1 stapa2 stapa3 stapa4 stamid stamno
FROM edids INTO TABLE i_edids
FOR ALL ENTRIES IN i_edidc
WHERE docnum = i_edidc-docnum.
2. SELECT - Without UP TO 1 ROWS was found in line
SELECT vkgrp FROM knvv INTO (knvv-vkgrp)
WHERE kunnr = i_edidc-sndprn.
Manish Garg replied
for #1, you should always check your internal table to make sure it has some entries, else the select will bring all the records from DB table, so before your select statemnt check for rows in i_edidc to be greater than 0.
for #2, if you really expecting more than 1 entry from KNVV for your critera ignore that.