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 tables

Former Member
0 Likes
1,156

Hi,

1)Can internal table be declared without occurs statement?

2)Two internal tables with exactly same structure. How to pass data efficiently from one to the other one?

Thanks,

SAI

1 ACCEPTED SOLUTION
Read only

Shivaji16
Active Participant
0 Likes
600

1. Yes, we can.

Ex: data : t_mara type standard table of mara.

2. itab1[] = itab2[].

5 REPLIES 5
Read only

Shivaji16
Active Participant
0 Likes
601

1. Yes, we can.

Ex: data : t_mara type standard table of mara.

2. itab1[] = itab2[].

Read only

Former Member
0 Likes
600

Hi,

1) yes, DATA ITAB TYPE TABLE OF SPFLI.

2) YES, ITAB2[] = ITAB1[].

Regards:-

Santosh.

<b>P.S. Mark useful answers</b>

Read only

Former Member
0 Likes
600

ya internal tables can be declared wis out occurs

example .. DATA: wa_zcform LIKE LINE OF t_zcform.

u can pass value 4rm 1 it to otehr like this ..

loop at itab1 .

read table itab where vbeln = itab1-vbeln .

itab-posnr = itab1-posnr .

itab-matnr = itab1-matnr .

modify itab .

endloop.

or

LOOP AT t_excise WHERE rdoc1 = t_final-vgbel .

MOVE-CORRESPONDING t_excise TO t_final .

MODIFY t_final .

ENDLOOP .

reward points if helpful

Read only

Former Member
0 Likes
600

Hello,

1. Itab can be declared without occurs statement. and if u declare an itab with occurs statement, the itab is of type standdard table and with header line. and this variant not allowed in ABAP Object context.

2. move itab1[] to itab2[].

Regards,

Vasavi.K

Read only

Former Member
0 Likes
600

Hi sai,

1.yes we can create the internal tables with out Occurs statement,

2. and if they have similar structure then we can equate the bodies of the two internal tables.

Regards

Vijay D T T.