‎2007 Jul 16 11:47 AM
Hi All,
I am new to ABAP.Just heard about this site.....
My question is:
As we can assign default values to select-options in the selection screen itself by using default keyword.
But same thing we can do in initialization event....then
What is the difference in both techniques????
‎2007 Jul 16 11:54 AM
suppose you have material number, plant number, material group etc in the selection screen u can set default values to only them using default keyword but with initialisation u can set default values to any variables within the ABAP program and also those in the selection screen.
regards,
srinivas
<b>*reward points if helpful*</b>
‎2007 Jul 16 11:50 AM
Hi,
It is used to perform authorization checks for TCODES
It is also used to do a one time selection from database tables.
‎2007 Jul 16 11:50 AM
Hi Kiran,
In the selection screen you can initialize only those fields defined in the selection screen.
In the Initialization event you can do for other varaibles declared in the program
Regards
Arun
‎2007 Jul 16 11:52 AM
U can do the same in selection screen also.
But initialization is to assign the initial values.
if u want to give the list of values for select-options as Default u can do here and if u want to give some default values for some variables u can do here.
u can define Ranges in Initialization event.
This is not only for Parameters Default option.
Reward Points if helpfull.
‎2007 Jul 16 11:54 AM
suppose you have material number, plant number, material group etc in the selection screen u can set default values to only them using default keyword but with initialisation u can set default values to any variables within the ABAP program and also those in the selection screen.
regards,
srinivas
<b>*reward points if helpful*</b>
‎2007 Jul 16 11:57 AM
HI
DEFAULT IS A KEYWORD
INITILIZATION IS A EVENT
BY USEING DEFAULT YOU CAN ENTER ONLY ONE VALUE
BY USEING INITIALIZATION YOU CAN ENTER HOW MANY VALUES YOU WANT
EX: SELECT-OPTIONS MATNR FOR MARA-MATNR DEFAULT '1000'.
ON SELECTION SCREEN YOU BY DEFAULT IT HAD ONLY ONE VALUE
EX:SELECT-OPTIOS MATNR FOR MARA-MATNR .
INITIALIZATION.
MATNR-LOW =
MATNR-HIGH =
MATNR-SIGN =
MATNR-OPTION =
APPEND MATNR.
INITIALIZATION.
MATNR-LOW =
MATNR-HIGH =
MATNR-SIGN =
MATNR-OPTION =
APPEND MATNR.
INITIALIZATION.
MATNR-LOW =
MATNR-HIGH =
MATNR-SIGN =
MATNR-OPTION =
APPEND MATNR.
LIKE THIS YOU CAN ENTER ANY NUMBER OF VALUES
REWARD IF USE FUL
‎2007 Jul 16 11:57 AM
by giving default values..you can just assign some constants but cannot assign any variables
In INITIALIZATION event you can assign variable to them
INITIALIZATION.
select single f1 into v_f1 where ...
p_matnr = v_f1.
‎2007 Jul 16 12:00 PM
Hi Kiran,
In initialization Event you can do calculation also. E.g. Suppose you want to print current data & the +30 days this calculation can do given in Initilization not as defalult value.
INITILIZATION.
s_date-low = sy-datum.
s_date-high = sy-datum + 30.
s_date-sign = 'I'.
s_date-options = 'BT'.
APPEND s_date.
Reward points if helpful answer.
Ashvender
‎2007 Jul 17 8:14 AM
hi kiran
you can very well use the default values in select options like
... DEFAULT val1 [TO val2] [OPTION opt] [SIGN sgn]
in initialization event you just declare the variables saying that those variables are been used in the program..but the variables used in select-options goin to be dispalyed in the output screen....
Reward if useful kiran...!!