tcode:SU3中可以查看SAP登录用户的电话号码,电子邮件以及用户全名,如下:
代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
REPORT ztest_get_user. DATA: l_sname TYPE adrp-name_text, "Name l_email TYPE ad_smtpadr, "Service leader email l_telno TYPE adr2-tel_number, "Sales office telno l_tel_extens TYPE adr2-tel_extens. "Sales office tel ext SELECT SINGLE adrp~name_text "Name of adr2~tel_number "Tel adr2~tel_extens "Extension adr6~smtp_addr "Email INTO ( l_sname,l_telno,l_tel_extens,l_email ) FROM usr21 INNER JOIN adrp ON adrp~persnumber = usr21~persnumber LEFT OUTER JOIN adr2 ON adr2~persnumber = usr21~persnumber LEFT OUTER JOIN adr6 ON adr6~persnumber = usr21~persnumber WHERE usr21~bname = sy-uname AND adrp~date_from = '00010101' AND adrp~nation = space. WRITE:/ l_sname, / l_telno, / l_tel_extens, / l_email. |
SU3中的相关信息保存在表 ADR2 ADRP和ADR6中。
以上。
发表评论