我正在编写一个 BSP,并且基于用户输入,我需要从不同的数据库表中选择数据。这些表在不同的包中。是否可以根据路径指定我要使用的表,如下所示:
data: path1 type string value 'package1/DbTableName',
path2 type string value 'package2/OtherDbTableName',
table_to_use type string.
if some condition
table_to_use = path1.
elseif some condition
table_to_use = path2.
endif.
select *
from table_to_use
...
endselect
我是 ABAP 和 Open SQL 的新手,我知道这可能是一个简单/愚蠢的问题 :) 非常感谢任何帮助!