Report z_barry_dyn_where.
TABLES: tstc.
DATA where_tab(80) OCCURS 10 WITH HEADER LINE.
DATA : count_rec TYPE i.
SELECT-OPTIONS: s_trx FOR tstc-tcode NO INTERVALS OBLIGATORY
DEFAULT 'va01'.
MOVE 'tcode in s_trx' TO where_tab.
APPEND where_tab.
CONCATENATE 'and tcode like' '''V%''' INTO where_tab SEPARATED BY space.
APPEND where_tab.
CLEAR where_tab.
SELECT COUNT( * ) INTO count_rec
FROM tstc
WHERE (where_tab).
WRITE: count_rec.
阅读(6490) | 评论(4) | 转发(0) |