一、业务场景:
当通过MKPF-USNAM查找ADRP-NAME_LAST时,中间缺少一个表,即USR21.否则,MKPF-USNAM不能和ADRP-PERSNUMBER直接对等。
二、解决方法:
1 DATA:L_NAME_LAST LIKE ADRP-NAME_LAST, 2 L_NAME_FIRST LIKE ADRP-NAME_FIRST. 3 4 CLEAR:L_NAME_LAST,L_NAME_FIRST. 5 6 SELECT 7 adrp~persnumber 8 date_from 9 nation 10 name_last 11 name_first 12 bname 13 FROM adrp 14 INNER JOIN usr21 ON adrp~persnumber = usr21~persnumber 15 INTO TABLE it_adrp 16 FOR ALL ENTRIES IN it_mkpf 17 WHERE usr21~bname = it_mkpf-usnam.