‎2008 Jun 24 8:33 AM
Hi, I am using event Initialization to assign default values to the selection screen date fields.
When I go to SE38 and execute the program, it is showing those default values, but when I use the Transaction code directly, these default values are not getting assigned.
I debugged and found that INITIALIZATION is not getting triggered when I use the TCode, but gets triggered when I execute from the SE38 editor.
Here is the code.
Selection screen fields are declared in a separate INCLUDE.
In the main program,
INITIALIZATION.
p_begda = sy-datum - 1.
Please let me know your views.
Thanks
Krishna
‎2008 Jun 24 8:39 AM
try to set the initial value in the declaration?
parameters: p_begda type .... value gv_date.
initialization.
gv_date = sy-datum - 1.
regards,
lavanya
‎2008 Jun 24 8:44 AM
Hi,
Your code is good, check the tcode once again, I tried with below code by running the tcode for the below report, it is working fine.
REPORT ztest_initi.
PARAMETERS: p_date TYPE d.
INITIALIZATION.
p_date = sy-datum - 1.
Thanks,
Ravi
‎2008 Jun 24 8:44 AM
Hi
I tried putting selection screen and initilization in different includes but I am getting values on the selection screen.
think there is no prob in this
try default edition of parameters otherwise
regards
prasanth
‎2008 Jun 24 8:54 AM
Hi,
I tried with the below code using tcode for the program . It is working fine i am getting the date.
PARAMETERS:
p_date TYPE d.
INITIALIZATION.
p_date = sy-datum - 1.
‎2008 Jun 24 8:58 AM
Hi Krishna
Initialization event is used when you execute your report first of all the initialization event will trigger where you can check the authorisation of hte report etc......
&**********Reward point if helpful***********&
‎2008 Jun 24 9:04 AM
Thanks everyone for the response.
I solved the problem myself.
Soln: The problem was that, the Tcode was declared as 'Program and Screen'. I changed it to 'Program and Selection Screen'. Now the initialization is getting triggered.
Thanks
Krishna
‎2008 Jun 24 9:06 AM
Hi ,
I think you want to show default values to your parameters on the selection screen.
So, why dont use the DEFAULT addtion with the parameter .
‎2008 Jun 24 9:58 AM
Hi,
While creating T code in start object tab select radio button "program & selection screen".
& in next screen under GUI support tab check box SAPGUI gor HTML & SAPGUI for windows. i hope ur prlbm is solved..