09-09-2008 2:27 AM
Can we write the select query in end-of-selection?
in which cases we write the select query under end-of-selection?
Regards,
pandu
09-09-2008 2:33 AM
End of selection is typically used with logical databases after all the database accesses have been done. Having said that, i dont think there would be a need for a select in end of selection. What is your requirement?
Refer this thread for more info on End of selection.
https://forums.sdn.sap.com/click.jspa?searchID=16044108&messageID=3332525
09-09-2008 4:06 AM
Hi Panduranga rao, You can write SELECT query under END-OF-SELECTION event. There are no cases to write, wherever you need data from database table, you can write there . Regards, Venkat.O
09-09-2008 4:48 AM
hi,
let me explain you with an example:
if we have to display data in some report : then first of all we fetch data in " START OF SELECTION"
and for displaying data we use " END OF SELECTION". hence end of selection is used to do processing like download, dislay etc on fetched data.
FOR eg:
TABLES: vbak , vbap.
TYPE-POOLS:slis.
DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
TYPES: BEGIN OF ty_itab1,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
werks LIKE vbap-werks,
lgort LIKE vbap-lgort,
END OF ty_itab1.
DATA: itab1 TYPE TABLE OF ty_itab1.
DATA: wa_itab1 TYPE ty_itab1.
DATA: l_file TYPE string.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS: alv_list RADIOBUTTON GROUP g1,
alv_grid RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS: topc AS CHECKBOX,
p_file TYPE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
AT SELECTION-SCREEN ON s_vbeln.
PERFORM vbeln_validate.
START-OF-SELECTION.
PERFORM select_data.
END-OF-SELECTION.
PERFORM display.
Hope it will help you
Thanks and Regards
Rahul Sharma
.
Edited by: RAHUL SHARMA on Sep 9, 2008 5:49 AM
09-09-2008 4:51 AM
09-09-2008 4:58 AM
see end-of-selection is mostly used in logical databases.
and in an ordinary report
if you want to differentiate two different blocks
u can use this end of selection.
and one more thing is after this end of selection if u do any process such as select query it doesn't works
after that u need to do one more start of selection and then do it