将记录添加到内部表中



我想将记录添加到内部表中。当我尝试添加时,t 显示错误

字段"ITAB_EMPLOYEE"未知,但有一个字段具有相似的名称"ITAB_EMPLOYEE_I"。

    REPORT zitab_siddhi.
    TYPES: BEGIN OF EMPLOYEE,
             EMPID    TYPE C,
             EMPNAME     TYPE string,
             EMPADDRESS  TYPE c,
             EMPEMAIL    TYPE c,
             EMPDEPT     TYPE c,
             EMPROLE     TYPE string,
             EMPCONT TYPE C,
           END OF employee.
    TYPES ITAB_EMPLOYEE TYPE STANDARD TABLE OF EMPLOYEE.
    DATA: ITAB_EMPLOYEE_I TYPE EMPLOYEE.
      ITAB_EMPLOYEE_I-EMPID = '123'.
      ITAB_EMPLOYEE_I-EMPNAME = 'JOHN DOE'.
      ITAB_EMPLOYEE_I-EMPADDRESS = 'BANGALORE'.
      ITAB_EMPLOYEE_I-EMPEMAIL = 'JOHN@BANGALORE.COM'.
      ITAB_EMPLOYEE_I-EMPDEPT = 'SALES'.
      ITAB_EMPLOYEE_I-EMPROLE = 'MANAGER'.
      ITAB_EMPLOYEE_I-EMPCONT = '1234567890'.
 APPEND ITAB_EMPLOYEE_I TO ITAB_EMPLOYEE.
ITAB_EMPLOYEE

代码中声明为表类型,而不是内部表。将TYPES替换为DATA

DATA itab_employee TYPE STANDARD TABLE OF employee.

相关内容

  • 没有找到相关文章

最新更新