Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

report-end-of-selection

raj_kumar86
Participant
0 Kudos

what is the use of end-of-selction ? with out of end-of-selection also working, what is significance ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

End-of-Selection can be used to free variables, memory and Internal tables.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 all data that the program has stored in sequential datasets, such as internal tables or extracts.

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.

Hope tis helps, Do reward.

Edited by: Runal Singh on Apr 2, 2008 12:11 PM

6 REPLIES 6

Former Member
0 Kudos

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 all data that the program has stored in sequential datasets, such as internal tables or extracts, during the various GET events.

The following executable program is connected to the logical database F1S.

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.

This program fills a sorted table with data from the logical database in the GET spfli event, and displays them in a list in the END-OF-SELECTION event.

reward if helpful

Former Member
0 Kudos

hi,

End-of-Selection can be used to free variables, memory and Internal tables.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 all data that the program has stored in sequential datasets, such as internal tables or extracts.

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.

Hope tis helps, Do reward.

Edited by: Runal Singh on Apr 2, 2008 12:11 PM

manubhutani
Active Contributor
0 Kudos

hi

End of selection as clear from the name is the event which is triggered when aall the selection is done and you want to display the results.

IF you know about logical databases used in HR then

after GET PENR (which is a loop) when this loop ends

end of selection is triggered.

IF you dont write end of selection then everything comes under loop..

Please reward points

Former Member
0 Kudos

Hi friend,

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.

Reward if useful.

Former Member

Former Member
0 Kudos

Hi Indra,

With out end-of-selection also wecan proceed.

But in some requirements to deviate from normal executin of sequence of events by using stop statemet

end-of-selection is triggered.

Ex:

start-of-selection .

Statement 1

Statement 2

stop.

Statement 3

Statements4

top-of-page

-


end-of page

-


End -of-selection

Statement 5.

Inthis case after statements 1 2 next statement 'll be 5.in such cases EOS is used.It skips all other eventsand directly goes to EOS.

give me points if ur satisfied with this ans.but iam sure above statement