ABAP根据表名创建动态内表并更新
Posted chaguoguo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ABAP根据表名创建动态内表并更新相关的知识,希望对你有一定的参考价值。
查询界面
执行结果
SE11
主
*&---------------------------------------------------------------------*
*& Report ZIT0003
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zit0003.
INCLUDE zit0003_head.
INCLUDE zit0003_screen.
INCLUDE zit0003_forms.
INITIALIZATION.
sscrfields-functxt_01 = ‘下载文档‘.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
* 选择文件搜索帮助
PERFORM frm_set_file_f4 USING p_file2 CHANGING p_file2.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN ‘FC01‘.
PERFORM frm_down_excel.
WHEN OTHERS.
ENDCASE.
START-OF-SELECTION.
IF sy-uname+0(2) NE ‘IT‘.
MESSAGE ‘仅限IT账号使用‘ TYPE ‘S‘ DISPLAY LIKE ‘E‘.
RETURN.
ENDIF.
IF p_name+0(1) NE ‘Z‘.
MESSAGE ‘仅允许更新自建表‘ TYPE