ABAP|取当前用户姓名

DATA: lt_full_name    TYPE ad_namtext,  "用户中文名称
      lt_name_first   TYPE ad_namefir,
      lt_name_last    TYPE ad_namelas.```

```CALL FUNCTION 'FDM_CUST_USER_NAME_READ_SINGLE'
        EXPORTING
          i_user_id   = sy-uname
        IMPORTING
          e_firstname = lt_name_first
          e_lastname  = lt_name_last  .```

  ```    IF sy-subrc = 0.```

``` CONCATENATE lt_name_last  lt_name_first INTO lt_full_name .
        CONDENSE lt_full_name  NO-GAPS.  "去掉空格字符
      ENDIF.```

你可能感兴趣的:(ABAP|取当前用户姓名)