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: 

if the program has a write statement at the top & the TOP-OF-PAGE

Former Member
0 Kudos

Q] We know that START-OF-SELECTION is triggered by the 1st writr statement. Now if the program has a write statement at the top & the TOP-OF-PAGE too is written explicitly which also contains write statements-----what will be the effect?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Start-of-Selection.

Write: ' line one'.

End-of -selection.

Write: 'list is ended'.

Top-of-page.

Write: 'List Heading'.

when the abap processor reads the first write statement [either in the start-of-selection or in the end-of-selection] it will search for a top-of-page . and it writes the top-of-page first and then it writes the first write statement [either in the start-of-selection or in the end-of-selection].

Hope it will be clear for you now.

Reward points if usefull.

Regards

Ravi

8 REPLIES 8

Former Member
0 Kudos

Hi,

if u littlebit clear i can explain what u want

Former Member
0 Kudos

Hello,

Nothing will happen.

First, what ever the write statement is in the TOP-OF-PAGE will be displayed in the top of the page. TOP-OF-PAGE will trigger when ever the first page is displayed in output and when ever the next page will be displayed. These next pages are dependent are line count which we will give in REPORT statement in the begining of the program.

Reward If Helpful.

Regards

--

Sasidhar Reddy Malti.

Former Member
0 Kudos

Hi,

i will order of events

see first of all initialization event gets triggred and then at selection screen triggres and then it goes to start of selection and if it found any list processing statement then it goes to top-of -page event and after executing all the statements it returns back to the start of selection event

just i will give one test case to u execute it u will know one thing

give one write statement in the initialization event and in the start of selection of give one write statement see what happns u can find different different things just try i will expalin u the concept..

plzz reward if it is useful...

plzz dont forget to reward..

if u want any concepts u can contact me on mutyalasunilkumar@gmail.com

plzz reward

Former Member
0 Kudos

HI,

Start-of-Selection.

Write: ' line one'.

End-of -selection.

Write: 'list is ended'.

Top-of-page.

Write: 'List Heading'.

when the abap processor reads the first write statement [either in the start-of-selection or in the end-of-selection] it will search for a top-of-page . and it writes the top-of-page first and then it writes the first write statement [either in the start-of-selection or in the end-of-selection].

Hope it will be clear for you now.

Reward points if usefull.

Regards

Ravi

Former Member
0 Kudos

hi,

start-of-selection is not triggered during its first write statement

start-of-selection is triggred when u r fetching the data from data base table

top-of-page is triggred when it is sees first write statement

if ur doubt is u have a write statement at the top and also u have top-of-page which contains write statement which write statemnt will be exectuted first

then write statement inside the top-of-page will be printed first and then other write statement

if u r doubt is not this make u r question more clear

0 Kudos

Well Nandini

suppose u have a write statement after the data declaration this statement do trigger the s-o-s event

now my question is

if the code is this way

data.............etc

data .........etc

parameters:.............,

..............,

................

>>>>>>write .................'' this st triggers top.........

  • ctrl gets to

top of page

>>>>>>>write -


written at first----.

my ques is which of the indicated WRITE gets first output

0 Kudos

one thing I want to tell u,

start-of-selection is default event in sap.

if u dont give Start-of-selection also it will put internally.

Report zxxxxx.

write:/ 'this contains default S-O-S'.

Top-of-page.

Write:/ 'this is top-of-page'.

TOP-OF-PAGE triggers only after first write statement.

so, out put is ..

first ctl go to write:/ 'this contains default S-O-S'. this one.

then to top-of-page.

If u r not clrear let me know.

Regards,

sarath

0 Kudos

Hi Dude,

The write in T-O-P is written first,then the write in S-O-S.

See S-O-S is the first event to get triggered,even before T-O-P while T-O-P is triggered before any output(write) to the triggered.

Reward if useful.

Regards,

Lakshmanan