Dynamic Table Name in ABAP/4
In ABAP/4, you can specify table name in SELECT statement by dynamically.
Example
DATA table_name(10) TYPE C.
DATA num_rows TYPE I.
table_name = ’BKPF’.
SELECT COUNT( * ) FROM (table_name) INTO num_rows.
WRITE: ’Table Name ’, table_name, ’have rows ’, num_rows.
- thitima's blog
- 957 reads
Post new comment