‎2008 Jul 02 11:59 AM
Hi all,
I have defined a type and then then standard table of this type.
itab TYPE STANDARD TABLE OF ty_itab.
Now I am checking for not blank internal table
if not itab is initial.
Will it work or I need to put [].
Regards,
Jeetu
‎2008 Jul 02 12:08 PM
No need to put [] when checking the table itab.
As the table is defined without header line
itab TYPE STANDARD TABLE OF ty_itab.
So no need to put []with table name when checking it's content.
if i_tab is initial. << Here itab indicates table itself not the header line
So this statement works fine in ur case.
Regards,
Joy.
Edited by: Joyjit Ghosh on Jul 2, 2008 1:09 PM
‎2008 Jul 02 12:01 PM
if not itab is initial. <-- this will check only the header line ..
U need to put [].
‎2008 Jul 02 12:02 PM
‎2008 Jul 02 12:05 PM
itab without square brackets '[]' checks only for header line..
Hence to check if internal table is initial or not u need to use [].
If itab[] is initial.
Endif.
‎2008 Jul 02 12:06 PM
data: i_tab type standard table of x_tab initial size 0.
if i_tab is not initial.
*The check will happen for table body as the table has *no header line
endif.
data:i_tabh like x_tab occurs 0.
if i_tabh is not initial.
*The check will happen for table header as the table *has header line
endif.
so in your case no need for []
‎2008 Jul 02 12:06 PM
Hi,
As you have define your internal table as :
itab TYPE STANDARD TABLE OF ty_itab
it is a internal table with headerline.
so you need to put itab[] : will check the body of internal table.
itab : will check the headerline.
plz reward if useful.
thanks,
dhanashri.
‎2008 Jul 02 12:08 PM
No need to put [] when checking the table itab.
As the table is defined without header line
itab TYPE STANDARD TABLE OF ty_itab.
So no need to put []with table name when checking it's content.
if i_tab is initial. << Here itab indicates table itself not the header line
So this statement works fine in ur case.
Regards,
Joy.
Edited by: Joyjit Ghosh on Jul 2, 2008 1:09 PM