Skip to Content
0
Former Member
Apr 15, 2010 at 09:13 AM

To merge contents of 2 itabs in an efficient way

87 Views

Dear All,

I want to avoid the fetch from the table EBAN twice for 2 diff internal tables.

So i want to first merge the contents of itab1 and itab2 and then have a single fetch from table EBAN.

My code as of now is like this

SELECT banfn bnfpo lfdat ebeln ebelp
           INTO TABLE t_eban
           *FROM eban*
            FOR ALL ENTRIES in lt_iafvgd
          where banfn = lt_iafvgd-banfn.

 SELECT banfn bnfpo lfdat ebeln ebelp
           *FROM eban*
           *appending TABLE t_eban*
           FOR ALL ENTRIES in lt_iresbd
           where banfn = lt_iresbd-banfnr.

If you see above , i am unnecssarily doing fetch from EBAN twice.

How to combine the contents of 2 internal table and then do a single fetch

Please guide.

Regs,

SuryaD.