查询结果字段名的转换
将透明表查询值直接传递给内表,两表中栏位结构一样,但栏位名称缺不同。若查询中使用CORRESPONDING FIELD OF
语法进行赋值时,则会发现不同名称的字段不能正常赋值,解决办法是在SELECT
查询时将其直接转换
DATA:
BEGIN OF xpfli OCCURS 0,
carrid2 LIKE spfli-carrid,
connid2 LIKE spfli-connid,
END OF xpfli.
SELECT carrid AS carrid2
connid AS connid2
INTO CORRESPONDING FIELDS OF TABLE xpfli
FROM spfli
WHERE carrid = 'LH'.