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: 

Initialization event flow

Former Member
0 Kudos

Hi Experts,

I was just practicing and came to know that:

PARAMETERS P_MATNR TYPE MATNR DEFAULT 'A112233'.

INITIALIZATION.
WRITE 'INITIALIZATION'.

START-OF-SELECTION.
WRITE 'START OF SELECTION'.

END-OF-SELECTION.
WRITE: 'END OF SELECTION'.

does not write INITIALIZATION.

But without PARAMETERS statement it writes.

can anyone explain me why it is so.

Thanks,

Vibhor



1 ACCEPTED SOLUTION

matt
Active Contributor
0 Kudos

The parameters statement puts a screen in the way, so when you get the "start-of-selection", you've got a new screen.

If you want to see the sequence of events, try using the MESSAGE statement instead of write.

10 REPLIES 10

matt
Active Contributor
0 Kudos

The parameters statement puts a screen in the way, so when you get the "start-of-selection", you've got a new screen.

If you want to see the sequence of events, try using the MESSAGE statement instead of write.

Former Member
0 Kudos

Beside the question, Can you imagine a need in reallife to use a write statement before the Start-of-Selection Block?

Former Member
0 Kudos

Thanks a lot Matthew.

Former Member
0 Kudos

Hi Nikolaus,

It is not required to have a write statement before the start of selection because only after selection is executed you can have write statement.

Former Member
0 Kudos

Dear Matthew,

          It is a very basic question. it should be rejected actually. Any one can find answer very easily for these type of questions.

matt
Active Contributor
0 Kudos

I thought that at first, but then thought - if someone asked me what would happen in this situation, I wouldn't have known without writing the code. So I decided the question, while basic, was sufficiently interesting to let pass.

Moderation is always a subjective judgement call. I've no objection to newbies asking reasonable basic questions. It's the ones that are answered easily be searching or having had done BC400 that will get rejected.

Former Member
0 Kudos

he he he,

Initialization is the event before screen is getting callled.

it executes the write statement, but where it should write???

Put messages of type I then you will get the exact result what you want.

Regards,

Vj

0 Kudos

Hi Vijay,

If you remove the PARAMETERS statement then it is writing it anyway.

Matthew is right, because the selection screen comes the a way.

Former Member
0 Kudos

Hi Vibhor,

The initialization will gets printed without selection screen because it is the first event that gets trigger. So if there is a selection screen, then after the initialization event the screen will be displayed then after user action other events will gets trigger and the previous list will be refreshed.

To know the correct execution just put a break point at report statement and in the debugging mode just see the display list which will be under Miscellaneous. There you can find in detail 

0 Kudos

Thanks Shravan.

This "Display under miscellaneous" thing was new to me.

It really helped thanks a lot.

-Vibhor