vbeln type vbak-vbeln,
ernam type vbak-ernam,
vkbur type vbak-vkbur ,
kvgr5 type vbak-kvgr5,
end of ty_vbak.
data:
ls_vbak type ty_vbak,
lt_vbak type table of ty_vbak.
if c_vkdfif[] is not initial.
select vbeln ernam vkbur kvgr5
into corresponding fields of table lt_vbak
from lips
for all entries in c_vkdfif
where vbeln = c_vkdfif-vbeln.
sort lt_vbak by vbeln.
loop at c_vkdfif.
read table lt_vbak into ls_vbak with key vbeln = c_vkdfif-vbeln binarysearch.
if sy-subrc = 0.
c_vkdfif-zzernam = ls_vbak-ernam.
c_vkdfif-zzvkbur = ls_vbak-vkbur.
c_vkdfif-zzkvgr5 = ls_vbak-kvgr5.
modify c_vkdfif.
endif.
endloop.
endif.