2008 Mar 19 3:38 PM
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.
2008 Mar 19 3:41 PM
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.
2008 Mar 19 3:41 PM
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.
2008 Mar 19 3:41 PM
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
2008 Mar 19 3:44 PM
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
2008 Mar 19 3:45 PM
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
2008 Mar 19 4:06 PM
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.