我在循环语句期间遇到了这个问题。
我有一个循环:
loop at lt assigning <ls> where <condition> (im using loop instead of reaf table coz i need to use GE and LE logical statements)
if sy-subrc = 0.
result = <ls>-FIELD.
else.
result = ''.
endif.
endloop.
所以问题是它跳过了 sy-subrc 检查。当循环执行并且没有找到记录(sy-subrc = 4)时,它不会将 '' 分配到结果字段中,而是保留初始语句。
有什么问题?