‎2008 Jul 07 7:45 AM
what is the difference between it_tab1 = it_tab2 and it_tab1[] = it_tab2[].
Will it_tab1 = it_tab2 mean only the header line contents are assigned to it_tab1?
regards,
balaji
‎2008 Jul 07 7:47 AM
it_tab1 = it_tab2 only header data will get assigned
it_tab1[] = it_tab2[] taable contents will get assigned
‎2008 Jul 07 7:47 AM
it_tab1 = it_tab2 only header data will get assigned
it_tab1[] = it_tab2[] taable contents will get assigned
‎2008 Jul 07 7:48 AM
Hi,
it_tab1[] = it_tab2[] :
This is like copying the body of it_itab1 to it_itab2.
Hope this helps u,
Arunsri
‎2008 Jul 07 7:49 AM
hi....
itab1 = itab2 is just for header data of the internal table whereas itab1[] = itab2[] is ued for bosy of the internal table i.e. all the contents of internal table itab1 will be passed on to internal table 2.
whereas in the first statement only the contenets in the header line will be passed on.
‎2008 Jul 07 7:50 AM
Hi Balaji!
u r right in saying that widout [] symbol only header lines are copied.
Wid [] symbol the complete body i.e contents are copied.
rewrd if helpful.
‎2008 Jul 07 7:51 AM
If you created an internal table with optional header line means WITH HEADER LINE statement....
then it_tab1 = it-tab2 refers only header lines are copied
it-tab1[] = it_tab2[] refers body of the itab are copied.
Regards,
Dara.
‎2008 Jul 07 7:52 AM
if it_tab1 and it_tab2 both of them are declared with header line then
it_tab1 = it_tab2. >> means transferring header line contents from it_tab2 to it_tab1.
And
it_tab1[] = it_tab2[]. >> means transferring contents of table body from it_tab2 to it_tab1.
if it_tab1 and it_tab2 both of them are declared without header line then
it_tab1 = it_tab2. >> means transferring contents of table body from it_tab2 to it_tab1.
And
it_tab1[] = it_tab2[]. >> means transferring contents of table body from it_tab2 to it_tab1.
i.e. there is no diff. between these 2 statements.
Regards,
Joy.
‎2008 Jul 07 7:53 AM
Hi,
Writing itab_tab1 you address only header line, whereas itab_tab1[] you address its content.
Therefore statement:
it_tab1 = it_tab2 - will copy header line of it_tab2 to it_tab1
it_tab1[ ] = it_tab2[ ] - will copy content of it_tab2 to it_tab1
Note!
Both tables must be defined with header lines.
Regards,
Marcin
‎2008 Jul 07 7:53 AM
Hi balaji,
it_tab1 = it_tab2 will assing only header from it_tab2 to it_tab1.
where as it_tab[] stands for table content so
it_tab1[] = it_tab2[] will copy entire data from it_tab2 to it_tab1 . (if both are compatibility)
Please reward if useful.
Regards ,
Naveen
‎2008 Jul 07 7:59 AM
Hi,
If you created an internal table with header line means WITH HEADER LINE statement....
1. it_tab1 = it-tab2 : only header lines are copied from it-itab2 to it-itab1.
it-tab1[] = it_tab2[] : body of the itab are copied from it-itab2 to it-itab1.
Plz reward if useful.
thanks,
dhanashri.