怎么修改 动态创建的内表 abap
3个回答
展开全部
假设你的内表是 lt_data, 你的内表有一个字段 FIELD1.
DATA: WA_DATA LIKE LINE OF LT_DATA.
FIELD-SYMBOLS: <FS_DATA> TYPE ANY,
<FS_FIELD> TYPE ANY.
LOOP AT LT_DATA ASSIGNING <FS_DATA>.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <FS_DATA> TO <FS_FIELD>
<FS_FIELD> = 'Whatever you want'.
ENDLOOP.
DATA: WA_DATA LIKE LINE OF LT_DATA.
FIELD-SYMBOLS: <FS_DATA> TYPE ANY,
<FS_FIELD> TYPE ANY.
LOOP AT LT_DATA ASSIGNING <FS_DATA>.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <FS_DATA> TO <FS_FIELD>
<FS_FIELD> = 'Whatever you want'.
ENDLOOP.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询