01-29-2008 2:47 AM
How can I assign a default value to a parameter dynamically? like every time i run my program it should generate a default value into that.
01-29-2008 2:51 AM
Try using INITIALIZATION or AT SELECTION-SCREEN OUTPUT Events.
Check below example for some understanding:
parameters: p_chb as checkbox user-command chb,
p_text type char15.
at selection-screen output.
perform get_text.
*&---------------------------------------------------------------------*
*& Form GET_TEXT
*&---------------------------------------------------------------------*
form GET_TEXT .
if p_chb is initial.
p_text = 'NOT CHECKED'.
else.
p_text = 'CHECKED'.
endif.
endform. " GET_TEXT
Regards
Eswar
01-29-2008 2:51 AM
Try using INITIALIZATION or AT SELECTION-SCREEN OUTPUT Events.
Check below example for some understanding:
parameters: p_chb as checkbox user-command chb,
p_text type char15.
at selection-screen output.
perform get_text.
*&---------------------------------------------------------------------*
*& Form GET_TEXT
*&---------------------------------------------------------------------*
form GET_TEXT .
if p_chb is initial.
p_text = 'NOT CHECKED'.
else.
p_text = 'CHECKED'.
endif.
endform. " GET_TEXT
Regards
Eswar
01-29-2008 3:23 AM
Hi,
u can use initialization event like below.
parameters : p_date type dats.
initialization.
move sy-datum to p_date.
whenever the rpt is run...........system date becomes default value of p_date.
Cheers,
Will.
01-29-2008 3:25 AM
Hi ,
Use the initialization event for it .
In that event get the value of the parameter and then assign the value to it.
Regards
Arun