‎2007 May 02 8:24 AM
Hi friends,
I am debugging one report.
In that report some select statements are there.
If itab is initial.
Select * from tsp03l where padest = l_device.
exit.
endselect.
Please tell me its meaning.
What is the purpose of exit statement here.
Thanks in Advance,
Anil.........
‎2007 May 02 8:26 AM
‎2007 May 02 8:26 AM
HI,
In the Select, it is checking for a reocrd which is equal to l_device, if that is success then it will exit from that select and in the header of the table TRP03L will contain a record which is equals to L_DEVICE.
Regards
Sudheer
‎2007 May 02 8:26 AM
Hi
When a record is found , then it comes out of the loop of select..endselect.
Reward points if useful
Regards
Anji
‎2007 May 02 8:27 AM
If itab[] is initial.
Select * from tsp03l where padest = l_device.
exit.
endselect.
EXIT statement will exit from the select statement when it had found the value of l_device in the table tsp03l
‎2007 May 02 8:30 AM
select * ...
what does it actually means ...
it select all the records from all the field accoring to the where condition that you have given....
and endselect....is just acts as a loop for selecting all the records... so using exit... if you write then the executuion of the select query will be ended if the record is found out...
Regards,
Jayant
Please award if helpful
‎2007 May 02 8:36 AM
Hi Anil,
If the record is found.
i.e. if sy-subrc = 0.
exit statement will be executed and compiler
will come out from select...endselect loop.
this means that it will check for any other value further.
Exit statement bring the compiler out of loop.
If sy-subrc <> 0
then select...endselect loop will be continue...........
Reward points if helpful.
Regards,
Hemant
‎2007 May 02 8:45 AM
Hi,
This statements are used to get Long/short device names for Spools.
if itab is inital it is checking db table comparing variable l_device
for it is getting db fields if found and then exiting the select. means if data is selected tsp03l stru will contain data, this data would have used in further codes.
Hope this helps u.
Jogdand M B