如何取得用户参数文件中的parameters-[BAPI_USER_GET_DETAIL]

TCode:SU01或SU3中可以看到用户参数文件(user profile)中的parameter :

这个parameters可以通过函数 BAPI_USER_GET_DETAIL

例子代码

REPORT ztest_get_user_parameter.

DATA:lit_ret  TYPE STANDARD TABLE OF bapiret2,
     lit_para TYPE STANDARD TABLE OF bapiparam,
     lwa_para TYPE bapiparam.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'
  EXPORTING
    username  = sy-uname
*   CACHE_RESULTS        = 'X'
* IMPORTING
*   LOGONDATA =
*   DEFAULTS  =
*   ADDRESS   =
*   COMPANY   =
*   SNC       =
*   REF_USER  =
*   ALIAS     =
*   UCLASS    =
*   LASTMODIFIED         =
*   ISLOCKED  =
*   IDENTITY  =
*   ADMINDATA =
  TABLES
    parameter = lit_para
*   PROFILES  =
*   ACTIVITYGROUPS       =
    return    = lit_ret
*   ADDTEL    =
*   ADDFAX    =
*   ADDTTX    =
*   ADDTLX    =
*   ADDSMTP   =
*   ADDRML    =
*   ADDX400   =
*   ADDRFC    =
*   ADDPRT    =
*   ADDSSF    =
*   ADDURI    =
*   ADDPAG    =
*   ADDCOMREM =
*   PARAMETER1           =
*   GROUPS    =
*   UCLASSSYS =
*   EXTIDHEAD =
*   EXTIDPART =
*   SYSTEMS   =
  .
LOOP AT lit_para INTO lwa_para.
  WRITE:/ lwa_para-parid,lwa_para-partxt,lwa_para-parva.
ENDLOOP.

运行结果:

也可以在表USR05中直接抽取数据:

以上。

posted @ 2019-08-30 10:24  真的是很难  阅读(438)  评论(0编辑  收藏  举报