Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal Table query Please help!!!!!

Former Member
0 Likes
424

Q. What is the differance between:

TABLES: KNA1.

PARAMETERS: STATE LIKE KNA1-REGIO DEFAULT ‘MA’.

TYPES: BEGIN OF OUTREC,

KUNNR LIKE KNA1-KUNNR,

REGIO LIKE KNA1-REGIO,

TELF1 LIKE KNA1-TELF1,

END OF OUTREC.

DATA: OUT_ITAB <b>TYPE</b> STANDARD TABLE OF OUTREC

INITIAL SIZE 10 WITH HEADER LINE.

and

TABLES: KNA1.

PARAMETERS: STATE LIKE KNA1-REGIO DEFAULT ‘MA’.

TYPES: BEGIN OF OUTREC,

KUNNR LIKE KNA1-KUNNR,

REGIO LIKE KNA1-REGIO,

TELF1 LIKE KNA1-TELF1,

END OF OUTREC.

DATA: OUT_ITAB <b>LIKE</b> STANDARD TABLE OF OUTREC

INITIAL SIZE 10 WITH HEADER LINE.

also cant we write it as:

DATA: OUT_ITAB LIKE KNA1OCCURS 10 WITH HEADER LINE.

Thanks,

Dhiraj

3 REPLIES 3
Read only

Former Member
0 Likes
393

Hi

Yes, You can write like

DATA: OUT_ITAB LIKE KNA1 OCCURS 10 WITH HEADER LINE.

but only thing is here all the fields of KNA1 are considered in OUT_ITAB.

In the previous Example only few fields are used.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
393

hi Dhiraj,

Refer to this related thread

Read only

Former Member
0 Likes
393

Thanks Anji and Santosh for providing information