第一种方式  首先创建内表 插入表的值到内表


data:begin of mycrhd,
      objid(20type c,
      werks(20type c,
  end of mycrhd.


data testcrhd like TABLE OF mycrhd WITH HEADER LINE.

select objid werks from crhd into table testcrhd UP TO 100 rows  .
 LOOP AT testcrhd INTO mycrhd.
   WRITE/ mycrhd-objid,mycrhd-werks.
 ENDLOOP.


第二种 通过表直接创建内表

 data ggg like table of crhd WITH HEADER LINE .
 select from crhd into table ggg UP TO 100 rows.
 data  sss like line of ggg.
 LOOP AT ggg INTO sss.
   WRITE / sss-objid.
 ENDLOOP.


循环时候 也可以这样输出

 LOOP AT ggg.
   WRITEggg-objid,ggg-werks.
 ENDLOOP.   
 
 



其他技巧   DD03L查询表结构

DDFTX 查询表字段描述

ST05 查询sql日志

se37查看函数

se38 查看程序

se11 查看表

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2021-04-23
  • 2021-11-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案