‎2008 Jul 25 6:32 AM
‎2008 Jul 25 6:40 AM
Hi!
Yes you can retrieve the data in END-OF-SELECTION event.
Have a look at this sample code.
REPORT z_sdn.
DATA:
fs_tab TYPE scarr.
DATA:
t_tab TYPE TABLE OF scarr.
END-OF-SELECTION.
SELECT *
FROM scarr
INTO TABLE t_tab.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-carrid.
ENDLOOP.
Regards
Abhijeet
‎2008 Jul 25 6:35 AM
Hi Vijaya,
END_OF_SELECTION is the last event. You cannot process data after this event.
This event is triggered after the START-OF-SELECTION is completed.
This statement tells the server that all the database reading is completed and no more data reading is going to take place. END-OF-SELECTION is generally used for the summary/results of reports. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.
After a program is executed by the user, the database is locked when it encounters a START-OF-SELECTION statement and the lock is released when an END-OF-SELECTION statement is encountered (to maintain the consistency). Data selection is done between START-OF-SELECTION and END-OF-SELECTION. Now if we donu2019t write the END-OF-SELECTION statement, the database will remain locked till the programs get terminated. Hence, the performance will be reduced. So it is always good practice to write END-OF-SELECTION statement after finishing the data selection from database.
Hope this helps you.
Regards,
Chandra Sekhar
‎2008 Jul 25 6:36 AM
yes you can retrieve data anywhere in your program, after
end-of-selection, before that, in initialization also but i dont think any requirement of this type will ever come....right it does nt make any sense.
end-of-selection is the last event of the list and it is triggered after geting all the data for the database. the end-of-selection event is used for taking appropriate actions the programmer wants to take before the list is displayed. its mainly used to formatt the data before displaying
With all the luck,
Pritam.
‎2008 Jul 25 6:40 AM
Hi!
Yes you can retrieve the data in END-OF-SELECTION event.
Have a look at this sample code.
REPORT z_sdn.
DATA:
fs_tab TYPE scarr.
DATA:
t_tab TYPE TABLE OF scarr.
END-OF-SELECTION.
SELECT *
FROM scarr
INTO TABLE t_tab.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-carrid.
ENDLOOP.
Regards
Abhijeet
‎2008 Jul 25 6:43 AM
‎2008 Jul 25 6:44 AM
Hi vijay,
You can retreve data in END-OF_SELECTION.
to be frank, this event is mainly for list processing and has no point for which you can't retreve data in it.
Regards,
Anirban
‎2008 Jul 25 6:47 AM
no u cannot retrieve the data after END OF SELECTION
check this report and put a break point after end of selection check what happens
data: begin of it_data occurs 0,
matnr type mara-matnr,
mbrsh type mara-mbrsh,
mtart type mara-mtart,
end it_data.
data: begin of it_makt occurs 0,
matnr type makt-matnr,
maktx type makt-maktx,
end of it_makt.
parameter: p_matnr type mara-matnr.
initialization.
start-of-selection.
select matnr
mbrsh
mtart
from mara into table it_data where matnr eq p_matnr.
end-of-selection.
select matnr
maktx
from maktx into table it_makt
for all entries in it_data
where matnr eq it_data-matnr.