Skip to Content
0
Former Member
Oct 30, 2007 at 08:44 AM

How do i drop a column from an internal table?

310 Views

Hi.

I need to create an internal table based on a database table (ZTAB1).

However, I only want columns 3, 4 and 5 from ZTAB1. How do I do that?

****************************************************

DATA BEGIN OF ITAB_LINE.

INCLUDE STRUCTURE ZTAB1.

DATA END OF ITAB_LINE.

DATA ITAB LIKE TABLE OF ITAB_LINE.

****************************************************

In this case, ITAB will have the same columns as ZTAB1.

But I do not want ZTAB1-Field1, ZTAB1-Field2. I only want ZTAB1-Field3, Field4, Field5 in ITAB. Is there any way I can drop ZTAB1-Field1, ZTAB1-Field2 from ITAB, using the codes above? Thanks.