Application Development 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: 

difference

Former Member
0 Kudos
89

Hye ...

What is the minute level difference between..

if itab is initial. and if itab[] is initial.

There is no difference whn it comes to working of the 2 statements at the macro level.

will the former throw any exceptions? Which is more advantageos?

Thanks,

Imran.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
63

Hi,

if itab is initial. => Checking header line of the internal table.

if itab[] is initial => Checking whether internal table is filled u with the values or not?

Thanks,

Sriram Ponna.

5 REPLIES 5

Former Member
0 Kudos
64

Hi,

if itab is initial. => Checking header line of the internal table.

if itab[] is initial => Checking whether internal table is filled u with the values or not?

Thanks,

Sriram Ponna.

JozsefSzikszai
Active Contributor
0 Kudos
63

hi Imran,

it depends on the internal table declaration:

if itab is declared with header line, than itab is the header line (i. e. work area to the table), while itab[] is the internal table itself. So, in this case it is a must to make the statement as you wrote in your question.

if itab is declared without header line there is no difference between itab and itab[]

hope this helps

ec

Former Member
0 Kudos
63

hi

if not itab is initial means the header of the internal table is not initial(no data).

if not itab[] is initial means the table body of the contents of the itab or records of the itab is not initial(no data).

some times the internal table contains data even though the header is empty...

regards,

venkat

Former Member
0 Kudos
63

Hi

if you say only itab[] this means all the entries in the internal table and if you say itab this means only the header.

This is the only difference.

Regards.

Venkat

Former Member
0 Kudos
63

Hi,

If we consider a statement

APPEND ITAB INTO ITAB[].

IN THE ABOVE CASE ITAB IS THE HEADER SECTION AND ITAB[] IS THE BODY SECTION.

IF FORMER ITAB IS PRESENT THEN THE DATA IS SAVED INTO THE HEADER SECTION .

SIMILARLY THE SYSTEM BY DEFAULT UNDERSTANDS ITAB[] IS THE BODY PART SO IT DISPLAYS DATA TO BE INSERTED IN THE BODY SECTION.