因为练习系统是IDES,没数据。
所以从其他系统导出部分数据到excel,然后上传到IDES。
如果是spfli等航班表不需要这样,直接参考下面的就行
http://blog.sina.com.cn/s/blog_c0978c9b0102vvtr.html
下面是工具程序
具体代码:
*&---------------------------------------------------------------------*
*& Report ZLM_003
*&---------------------------------------------------------------------*
*& http://blog.sina.com.cn/sapliumeng
*&---------------------------------------------------------------------*
REPORT zlm_dynamic_upload_db_data.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
PARAMETER: p_file TYPE ibipparms-path DEFAULT 'C:\Users\Thinkpad\Desktop\so.xlsx'.
PARAMETERS p_name TYPE tabname DEFAULT 'SNWD_SO_I'.
SELECTION-SCREEN END OF BLOCK b1.
*&---------------------------------------------------------------------*
*& Data Define
*&---------------------------------------------------------------------*
DATA: lv_filename LIKE rlgrap-filename.
DATA: lt_excel LIKE TABLE OF alsmex_tabline.
DATA: ls_excel LIKE LINE OF lt_excel.
DATA: dyn_table TYPE REF TO data.
DATA: dyn_wa TYPE REF TO data.
DATA: lv_index TYPE int4.
DATA: exception TYPE REF TO cx_root.
FIELD-SYMBOLS: TYPE table,
TYPE any,
.