‎2007 Dec 18 4:08 PM
hii friends....
is it mandatory to gv a end-of-selection in reports?
‎2007 Dec 18 4:15 PM
END-OF-SELECTION is not mandatory,this is for Output formatting.
In start-of-selection,you get all data into internal table then you need to display the data .if selection does not match for select query,then use stop command ,it goes straight way to end-of-selection.
‎2007 Dec 18 4:12 PM
‎2007 Dec 18 4:13 PM
‎2007 Dec 18 4:15 PM
END-OF-SELECTION is not mandatory,this is for Output formatting.
In start-of-selection,you get all data into internal table then you need to display the data .if selection does not match for select query,then use stop command ,it goes straight way to end-of-selection.
‎2007 Dec 18 5:32 PM
‎2008 Mar 15 12:40 PM
hi ,
Hi,
END-OF-SELECTION makes more sense when you are using logical database in your program.
See these links.
http://help.sap.com/saphelp_46c/helpdata/en/34/8e74266df74873e10000009b38f9b8/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/frameset.htm
After all the data has been selected END-OF-SELECTION event writes the data to the screen
The END-OF-SELECTION event is triggered in executable programs once the logical database has finished reading all data and before the list processor is started.
Try to go thro this link.
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9a1435c111d1829f0000e829fbfe/frameset.htm
Mostly end-of-selection is used in logical data base. It is not mandatory.
Ex:
If you use a logical database in your report then this event is mandatory because when all the data selection from the database is finished this events get triggers.
For example if you are populating a internal table using a logical data base event 'GET' then you need this event because if you don't use this you get display again and again for each selection.
START-OF-SELECTION.
GET PERNR.
itab-pernr = pernr-pernr.
append itab.
*this get triggers after all selection from database.
END-OF-SELECTION.
loop at itab.
write:/ itab-pernr.
endloop.
When you execute a program, database is locked when it encounter a start-of-selection. Again that lock released when a end-of-selection is encountered to maintain the consistency. So we just do the data selection between start-of-selection nad end-of-selection. Now if you dont write the end-of-selection, the database will be locked till the programs terminated. Hence, the performance will decrease. So it is always good to write end-of-selection after you finish the selection from database. Then after collecting all the data in internal table in between start-of-selection nad end-of-selection, we do the required procesing and preparing the list etc after the end-of-selection.
regards,
venkat.
‎2008 Mar 15 12:40 PM
Hi,
None of the events is mandatory in report. But it is good programming practice to use the events in a structured way. We can eliminate the coding of the events which are unneccessary. Please check below events which we will use in general. We can eliminate one or more of the below events if we don't have the requirement(EG: We can eliminate INITIALIZATION event if we no need to populate default values in the selection screen which are calculated dynamically
eg: date)
INITIALIZATION.
To initialize the selection screen fields.
AT SELECTION-SCREEN OUTPUT/
ON VALUE REQUEST/ON
To chage the selection screen dynamically as per the user input.(Eg: If user selects one radio button then disable some input fields)
To give the search helps(Down load/upload file names)
AUTHORITY DATA CHECK
To check the user authority
START-OF-SELECTION
All select statements.
END-OF-SELECTION
All calculations and output formatting
TOP-OF-PAGE
Display the headers(EG: column headings)
END-OF-PAGE
Display the footer
AT LINE-SELECTION
To display secondary lists, transaction when user selects some thing in the output.
AT USER-COMMAND
To handle user actions
Thanks,
Vinod.
‎2008 Mar 18 6:54 AM
Hi!!
Most of us dont use this event. There is no need to use this event. But it gives good program practice.
The END-OF-SELECTION event is triggered in type 1 programs once the logical database has finished reading all data and before the list processor is started