逻辑很简单,就是去标准表中关联取值,源代码如下:
DATA: w_firstname TYPE adrp-name_first. DATA: w_lastname TYPE adrp-name_last. CLEAR: e_name. IF I_ernam IS NOT INITIAL. CLEAR: w_firstname,w_lastname. SELECT SINGLE name_first name_last INTO (w_firstname, w_lastname) FROM usr21 INNER JOIN adrp ON usr21~persnumber = adrp~persnumber WHERE usr21~bname = i_ernam. CONDENSE: w_firstname,w_lastname. CONCATENATE w_lastname w_firstname INTO e_name. CONDENSE e_name. ENDIF.
执行结果:
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/18372.html