In ABAP code, a count (*) it is determined whether there is a field value in the table, it is not added into the.
The following code example, in determining whether the purchase order EKKO present, so little definition of a variable. . . Lazy one word. . . .
1
2
3
4
5
6
7
8
9
10
11
12
|
REPORT ztest_countlines.
PARAMETERS:p_ebeln TYPE ekko-ebeln.
SELECT COUNT(*)
FROM ekko
WHERE ebeln = p_ebeln.
IF sy-subrc = 0.
WRITE: '存在'.
ELSE.
WRITE:'不存在'.
ENDIF.
|
the above.