‎2007 Apr 04 5:35 AM
hi,
could any one clarify whether
initialization event is to be written first or
selection-screen begin of block is to be written.plz tell whether this affects performance.
I have written a report with the following structure.plz correct me if i'm wrong
1)DB table declaration
2) internal tables declaration and ranges decltn
3)ALV variables & internal tables
4)constants & variables
5)initialization
6)selection-screen(begin of block-end of block)
7)at selection-screen on value req
😎 at selection-screen
9)start-of-selection
10)end-of-selection
‎2007 Apr 04 5:39 AM
Hi mamatha,
Initilaization eventt is to be written first, rather than going for selection-screen begin of block .
Coming to your code structure, this should be the order.
1,2,4,3,5,6,7,8,9,10
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 04 5:39 AM
Hi mamatha,
Initilaization eventt is to be written first, rather than going for selection-screen begin of block .
Coming to your code structure, this should be the order.
1,2,4,3,5,6,7,8,9,10
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 04 5:39 AM
hi Mamatha,
The structure for a program is:
INCLUDE
TABLES
TYPES (Including TYPE-POOLS)
CONSTANTS
DATA
INFOTYPES ( HR Specific)
INTERNAL TABLES
FIELD-SYMBOLS
FIELD-GROUPS
INSERT
CONTROLS
SELECT-OPTIONS
PARAMETERS
INITIALISATION
AT SELECTION-SCREEN
START-OF-SELECTION
GET
END-OF-SELECTION
AT LINE-SELECTION
AT PFXX
AT USER-COMMAND
TOP-OF-PAGE
END-OF-PAGE
FORM
CLASS
METHOD
INTERFACES
hope this helps u.
Regards,
Thasneem
‎2007 Apr 04 5:42 AM
5)selection-screen(begin of block-end of block)
6)initialization
initialization is an event and selection-screen(begin of block-end of block)
id the declaration of selection screen so it is good practice to declare all the variables and selection screen before the event and then only code the events.. i dont think it will decrease in any performance but it is a good practice...
regards
shiba dutta
‎2007 Apr 04 5:50 AM
HI Mamatha,
first you write Begin of block -- selection screen.
then you write Initilization.
Initilization is an event, by which the selection screen is automatically filled and modified.
At selection screen on value request, at selection-screen are the events of selection screen processing after the user entered the data.
a clear idea is initilization is -- PBO and At selection-screen is PAI.
Reward points if useful.
Regards,
Dhanunjay.
‎2007 Apr 04 6:22 AM
Hi,
Initialization should come first .Whaterver we declare in the initialization part will work before the screen id displayed.
‎2007 Apr 04 6:18 PM
Hi Mamatha
There is absolutely no need of worrying about which should come first and which next...
Anything is fine...whether INITIALIZATION coming first or vice-versa. and further, there is no connection of this with performance. Infact, let me tell you that PERFORMANCE comes into picture only when u r accessing the database or when u r processing large internal tables.
<b>and regarding the order of ur report:</b>
Its fine! How ever, for more readability, u can swap the 5th and 6th steps, so that all the events are grouped at one place and all the data declarations above them.
And let me tell u one important thing: Don't allow the data declaration to happen in SELECTION-SCREEN events, it will not be global.....
Hope u understand me completely
Reward points if helpful
Regards
‎2007 Apr 04 6:41 PM
Hi Mamatha,
Performance will not come into this picture.
Anyway selection screen will be triggered first though you write initialization event first.
Hope this helps.
Thanks,
Srinivas