2006 Sep 26 8:56 AM
hi,
I have created a query in sq01.I would like to make the selet-option as parameter and assign it sy-datum value as default on selection screen. Is it possible???
2006 Sep 26 9:00 AM
hi,
check this sample code...
tables: mkpf.
data date like sy-datum.
data date1 like sy-datum.
select-options: s_date for mkpf-budat.
initialization.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = date
EV_MONTH_END_DATE = date1
.
s_date-option = 'EQ'.
s_date-sign = 'I'.
s_date-low = date.
s_date-high = date1.
append s_date.
so automattically,
low - 1st day of month.
high - last day of month.
chnge accoding to ur requirement.
rgds
anver
if helped mark points
2006 Sep 26 9:00 AM
open sq01
enter query name in rite area.
go to infoset query.
now u just see the right side window where all the select option come.
thee in option for giving it value in 3rd tab just put the value here.
2006 Sep 26 9:02 AM
its taking a value.but i need it to be sy-datum so that everytime it changes according to current date. this is my requirement.is it possible.
2006 Sep 26 9:11 AM
i don't think it is possible with that..
but u can make dynamic variant for dat field.
2006 Sep 26 9:24 AM
2006 Sep 26 10:00 AM
sorry for late reply..
1st go to infoset query.
goto--->variant mantinance for tamplate.
Enter the values in the selection screen
2. Save the variant using the SAVE button
3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (ie. D - Dynamic date calculation).
5. Click on the down arrow button and select the option 'Current Date'.
6. Save the variant.
noq go to sq01 and run the query.
Kindly assign points if this is helpful.