Skip to Content
Mar 22, 2021 at 09:22 AM

Data could be found in internal table but disappear when looping

33 Views Last edit Mar 22, 2021 at 01:11 PM 3 rev


I am facing an issue in my program, in debug model, I can find "t2~maktx in it_resb(internal-table.png), however, this field is blank when looping(looping.png), my program as below:


SELECT t1~rsnum t1~rspos t1~matnr t2~maktx t1~erfmg t1~erfme FROM resb AS t1
INNER JOIN makt AS t2 ON t1~matnr = t2~matnr
INTO TABLE it_resb FOR ALL ENTRIES IN it_afko WHERE rsnum = it_afko-rsnum.

LOOP AT it_afko INTO wa_afko WHERE aufnr = p_aufnr.
wa_header-plnbez = wa_afko-plnbez.
wa_header-maktx = wa_afko-maktx.
wa_header-gamng = wa_afko-gamng.
wa_header-gltrp = wa_afko-gltrp.
wa_header-rsnum = wa_afko-rsnum.


I cannot find any incorrect in my program, would you please help me to check it?

Thanks & Best Regards


internal-table.png (171.7 kB)
looping.png (124.0 kB)