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

write statement

Former Member
0 Likes
718

if i write a WRITE statement after end-of-selection will that be triggered?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
688

hi Pradeep

yes it will definitely be triggered

regards

ravish

<b>plz dont forget to reward if useful</b>

5 REPLIES 5
Read only

gopi_narendra
Active Contributor
0 Likes
688

Yes , it will be triggered if you write a WRITE statement after END-OF-SELECTION

The END-OF-SELECTION event is triggered in executable programs once the reading of all data is finished and before the list processor is started, which is nothing but the write statement.

Regards

Gopi

Read only

Former Member
0 Likes
689

hi Pradeep

yes it will definitely be triggered

regards

ravish

<b>plz dont forget to reward if useful</b>

Read only

mohammed_moqeeth
Active Participant
0 Likes
688

Hello Pradeep,

Yes, after END-OF-SELECTION write statement will trigger.

After all the data has been selected this event writes the data to the screen.

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.

It is mainly used to free the memory when you are using logical database.

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.

<u>For your kind reference, please check the below link</u><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/content.htm</b>

Regards,

Moqeeth.

Read only

Former Member
0 Likes
688

Hi pradeep

Yes after end-of-selection WRITE statement will trigger

<b>

Regards,

Azhar</b>

Read only

Former Member
0 Likes
688

please read this

END-OF-SELECTION

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.