06-28-2013 8:03 AM
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
06-28-2013 8:43 AM
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.
06-28-2013 8:43 AM
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.
06-28-2013 8:55 AM
Beside the question, Can you imagine a need in reallife to use a write statement before the Start-of-Selection Block?
06-28-2013 9:36 AM
06-28-2013 9:39 AM
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.
06-29-2013 6:34 AM
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.
06-29-2013 3:43 PM
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.
06-28-2013 9:56 AM
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
06-28-2013 10:38 AM
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.
06-30-2013 11:50 AM
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
07-01-2013 6:07 AM
Thanks Shravan.
This "Display under miscellaneous" thing was new to me.
It really helped thanks a lot.
-Vibhor