ITPub博客

首页 > 数字化转型 > ERP > [绝对原创] SAP Get User data by User ID

[绝对原创] SAP Get User data by User ID

原创 ERP 作者:DicksonJYL560101 时间:2015-04-01 21:11:23 0 删除 编辑

[绝对原创] SAP Get User data by User ID

 

1, Table

Go to table USR21 and get the person number, then use that person number number go to ADRP

2, View

view V_USR_NAME is a view over the USR21 and ADRP tables

 

3, Function module

  • You can alternatively use SUSR_USER_ADDRESS_READ.

The exporting parameter user_address would have the full name of the user in the field name_text.

    DATA: user_address LIKE addr3_val.

    CALL FUNCTION 'SUSR_USER_ADDRESS_READ'

      IMPORTING

        user_name                    = sy-uname

*       READ_DB_DIRECTLY             = ' '

      EXPORTING

        user_address                 = user_address

*       USER_USR03                   =

      EXCEPTIONS

        user_address_not_found       = 1

        OTHERS                       = 2.

 

    IF sy-subrc = 0.

       write:/ user_address-name_text.

    ENDIF.

 

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29829936/viewspace-1482198/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
行万里路,读万卷书,阅无数人。 吃货一枚,爱吃湘菜,粤菜与杭帮菜,尝遍天下美食。 摄影爱好者,游遍名川大山,江河胡海,赏遍人间春色。 爱看电影,尤其是国产大片,好莱坞大片。英文名:Dickson Jin, 网名:风一样的BOY。精通SAP供应链咨询。2017年开始研习人工智能。

注册时间:2014-08-27

  • 博文量
    2598
  • 访问量
    4671712