Application Development and Automation 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: 
Read only

events

Former Member
0 Likes
827

1) Wha is the use of END OF SELECTION explain in detail

thanks

ahmed

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
804

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

7 REPLIES 7
Read only

Former Member
0 Likes
804

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

Read only

oliver
Active Contributor
0 Likes
804

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

Read only

Former Member
0 Likes
804

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

Read only

0 Likes
804

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

Read only

0 Likes
804

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

Read only

Former Member
0 Likes
805

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

Read only

0 Likes
804

i appreciate your explanation