2007 Jun 19 3:55 PM
1) Wha is the use of END OF SELECTION explain in detail
thanks
ahmed
2007 Jun 19 4:36 PM
In report programs using LDB for every value selected the program issues the output, to control this you would use END-OF-SELECTION. Now if you call your output in this event, the output is made only after all the values are selected as per the selection criteria.
but i will give u a nice example where u need end-of-selection.
suppose while coding, u need a logic like below
if a condition is satisfied continue with the report
and if not satisfied, then display a message and end the report.
then u can code like below.
start-of-slection.
if a = <condition>.
do the following.......
else.
stop.
end-of-selection.
write: 'THIS IS END'.
note: stop command triggers end-of-slection from anywhere.
Regards
Ravi
In report programs using LDB for every value selected the program issues the output, to control this you would use END-OF-SELECTION. Now if you call your output in this event, the output is made only after all the values are selected as per the selection criteria.
but i will give u a nice example where u need end-of-selection.
suppose while coding, u need a logic like below
if a condition is satisfied continue with the report
and if not satisfied, then display a message and end the report.
then u can code like below.
start-of-slection.
if a = <condition>.
do the following.......
else.
stop.
end-of-selection.
write: 'THIS IS END'.
note: stop command triggers end-of-slection from anywhere.
Regards
Ravi
2007 Jun 19 3:56 PM
Hello,
Basic form
END-OF-SELECTION.
Effect
Event keyword:
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.
If useful reward.
Vasanth
2007 Jun 19 3:59 PM
It is already explained in detail in the official documentation:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/frameset.htm
Best regards,
ok
2007 Jun 19 4:06 PM
hi,
This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started. You can use the corresponding event block to process and format the data that the program has stored in internal tables or extracts during the various GET events.
The following program is connected to the logical database F1S.
REPORT EVENT_DEMO.
NODES SPFLI.
DATA: SPFLI_TAB TYPE SORTED TABLE OF SPFLI
WITH UNIQUE KEY CITYFROM CITYTO CARRID CONNID,
SPFLI_LINE TYPE SPFLI.
START-OF-SELECTION.
WRITE 'Demo program for END-OF-SELECTION'.
SKIP.
GET SPFLI FIELDS CARRID CONNID CITYFROM CITYTO.
MOVE-CORRESPONDING SPFLI TO SPFLI_LINE.
INSERT SPFLI_LINE INTO TABLE SPFLI_TAB.
END-OF-SELECTION.
LOOP AT SPFLI_TAB INTO SPFLI_LINE.
WRITE: / SPFLI_LINE-CITYFROM,
SPFLI_LINE-CITYTO,
SPFLI_LINE-CARRID,
SPFLI_LINE-CONNID.
ENDLOOP.This program fills a sorted.
regards,
Ashokreddy
2007 Jun 19 4:30 PM
Thanks for the answer it is good but if i dont know Logical Db then how should i talk about it .Thay ask what do u write in end of selection ?
regards
ahmed
2007 Jun 19 4:35 PM
Hi
We simply write the output fields that are to be displayed in the list output
in end-of-selection
Reward points for useful Answers
Regards
Anji
2007 Jun 19 4:36 PM
In report programs using LDB for every value selected the program issues the output, to control this you would use END-OF-SELECTION. Now if you call your output in this event, the output is made only after all the values are selected as per the selection criteria.
but i will give u a nice example where u need end-of-selection.
suppose while coding, u need a logic like below
if a condition is satisfied continue with the report
and if not satisfied, then display a message and end the report.
then u can code like below.
start-of-slection.
if a = <condition>.
do the following.......
else.
stop.
end-of-selection.
write: 'THIS IS END'.
note: stop command triggers end-of-slection from anywhere.
Regards
Ravi
2007 Jun 20 6:48 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |