09-29-2008 7:43 AM
Hi
I have to exit the entire program if an internal table contains 0 records.
Can I use the EXIT statement for this purpose?
Like....
if itab[] is initial.
exit.
else.
-
endif.
09-29-2008 7:48 AM
Hi,
You can use EXIT command in the Report programme..
Better to use Leave to List Processing.
Regards,
Deepthi.
09-29-2008 7:43 AM
09-29-2008 7:45 AM
09-29-2008 7:48 AM
Exit will only breaks your
if itab[] is initial.
exit.
.......
condition.
rest program processing would continue .
09-29-2008 7:45 AM
09-29-2008 7:45 AM
Hi,
Is this a Report program?. If yes, Then try the following which will suit well instead of Exit.
LEAVE LIST-PROCESSING
Cheers,
Kothand
09-29-2008 7:48 AM
Hi,
You can use EXIT command in the Report programme..
Better to use Leave to List Processing.
Regards,
Deepthi.
09-29-2008 7:51 AM
Hi,
...
start-of-selection.
fill itab.
if itab[] is initial.
message ...
exit.
endif.
......
end-of-selection.
Regards, Dieter
09-29-2008 7:51 AM
Hi,
Yes, Youn can write that statement.
Data : itab type table of spfli,
wa type spfli.
parameters : p_carrid like spfli-carrid.
start-of-selection.
select * from spfli into table itab where carrid = p_carrid.
if itab[] is initial.
EXIT.
endif.
Regards,
Kasuladevi.