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: 

enpty table

Former Member
0 Kudos

hi experts

how do i check if a table is empty

thanks

amit

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

do this way ..


if itab[] is initial.

endif.

7 REPLIES 7

Former Member
0 Kudos

if itab is initial

Former Member
0 Kudos

hi

you can use IS INITIAL command in an if loop.

this will help.

reward if useful.

Regards

Sumit Agarwal

Former Member
0 Kudos

hi,

do this way ..


if itab[] is initial.

endif.

Former Member
0 Kudos

There are 2 alternatives:

1) After the select query check SY-SUBRC.

2)Use:

if itab[] is initial.

endif.

Former Member
0 Kudos

hi,

if you check an internal table (Say, itab) with header line, then

if itab[] is initial.

endif.

if itab is without header line, then use

if itab is initial.

endif.

it will defenitely work.

Award if found helpful.

Anirban Bhattacharjee

Former Member
0 Kudos

Hi,

Go to SE11.

Put The table name In Database 'Table Field'

click 'Diaplay' Or 'Change' Pushbutton Below.

The Press CtrlshiftF10 A screen is Displayed.

Noe In The Application toolber Click On 'Number Of Entries'

Button If Entry 0 Means Table is Empty.

Let Me know if any Confusion.

Former Member
0 Kudos

Hi,

Fire a select query on that table and take the values in an internal table. If the internal table is empty, ur table is empty.

The command is

if itab[] is initial.

endif.

Nayan