06-18-2008 6:53 AM
Hi All
What is the purpose of end-of-selection.
When is end-of-selection is triggered.
In which condition the end-of-selection is used.
06-18-2008 6:56 AM
Hiiii..
when the STOP statement is triggerd in between the programming ...
END OF SELECTION gets triggerd...
reagrds
chandu reddy
06-18-2008 6:56 AM
HI,
[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/content.htm]
regards
Nicole
06-18-2008 6:56 AM
Hi,
Refer
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.
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/frameset.htm
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/end_of_s.htm
06-18-2008 6:59 AM
Hi Vasudevan,
START-OF-SELECTION.
LOOP AT IT_KNA1 INTO WA_KNA1.
IF WA_KNA1-KUNNR = 1000.
STOP.
ENDIF.
ENDLOOP.
END-OF-SELECTION.
WRITE: / '1000th customer is encountered'.
If you could have been used STOP statement in a loop and end loop, that STOP statement searches for END-OF-SELECTION event and triggers it immediately. If END-OF-SELECTION is not found, then the output will be displayed.
STOP statement in END-OF-SELECTION will not reflects as a recursion.
thanks & regards
Kishore Kumar Maram
06-18-2008 6:59 AM
hi
Go to this link
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/frameset.htm
Reward points if usefull
Cheers
Snehi
06-18-2008 7:00 AM
Hi,
End-Of-Selection is the one time event in the report programming and will be triggered when STOP statement is used and also triggered after the retrieval of data from the logical database. Mostly end-of-selection is used for output purpose.
Effect
This statement defines an event block, whose event is raised by the ABAP-runtime environment during the calling of an executable program , if the logical database, with which the program is linked, has completely finished its work.
06-18-2008 7:01 AM
Hi,
I hope this helps.
==============
end_of_selection 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 all data that the program has stored in sequential datasets, such as internal tables or extracts, during the various GET events.
REPORT demo_program_end_of_selection.
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.
=======
06-18-2008 7:03 AM
Hi,
Please refer the piece of code and put a break point and debug the program you will come to know which event will trigger and etc.
initialization.
write : 'At initialization'.
Top-of-page.
write : 'At Top Of Page'.
start-of-selection.
write : 'At Start of selection'.
end-of-selection.
write : 'At end of selection'.
"Generally end-of-selection is used to display the output.
Thanks,
Sriram Ponna.