Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to create an internal table with fields from different sources

Hi.

I need to create an internal table where some of the fields are from a database table, and the other fields are user specified. How do i do that?

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

Example:

DB table ZTAB with fields ZTAB-FIELD1, ZTAB-FIELD2.

I want to create an internal table ITAB with the fields ZTAB-FIELD1, ZTAB-FIELD2 from ZTAB. In addition, I also want to have one more field RECORD_NO, which is not from ZTAB. How do I do it? Could I do something like below?

DATA BEGIN OF ITAB.

INCLUDE STRUCTURE ZTAB.

DATA RECORD_NO TYPE I.

DATA END OF UPLINE.

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

Or, are there more efficient way of doing it? Thanks.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question