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

Initialization event flow

Former Member
0 Likes
1,373

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
Read only

matt
Active Contributor
0 Likes
1,343

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
Read only

matt
Active Contributor
0 Likes
1,344

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.

Read only

Former Member
0 Likes
1,343

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

Read only

Former Member
0 Likes
1,343

Thanks a lot Matthew.

Read only

Former Member
0 Likes
1,343

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.

Read only

Former Member
0 Likes
1,343

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.

Read only

matt
Active Contributor
0 Likes
1,343

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.

Read only

Former Member
0 Likes
1,343

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

Read only

0 Likes
1,343

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.

Read only

Former Member
0 Likes
1,343

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 

Read only

0 Likes
1,343

Thanks Shravan.

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

It really helped thanks a lot.

-Vibhor