2006 Nov 26 7:24 AM
This question was asked in interview
I have define a select options say
select-options svbeln for vbak-vbeln.
I want to set 2 default values ranges for above select options
1st range of default value should be say, svbeln-low is 1 and svbeln-high is 20 it should be exclusive of 16.
the second range of default value should be svbeln-low 50 and svbeln-high is 60 exclusive of 55
when the user execute the report and press f4, it should display this 2 ranges by default
correct solutions will be rewarded appropriately.
thanks
Sanjay
2006 Nov 26 2:08 PM
Hi,
Try this:
TABLES: VBAK.
...
SELECT-OPTION: S_VBELN FOR VBAK-VBELN.
...
INITIALIZATION.
S_VBELN-LOW = '1'.
S_VBELN-HIGH = '20'.
S_VBELN-OPTION = 'BT'.
S_VBELN-SIGN = 'I'.
APPEND S_VBELN.
S_VBELN-LOW = '16'.
S_VBELN-HIGH = '16'.
S_VBELN-OPTION = 'EQ.
S_VBELN-SIGN = 'E'.
APPEND S_VBELN.
S_VBELN-LOW = '50.
S_VBELN-HIGH = '60'.
S_VBELN-OPTION = 'BT'.
S_VBELN-SIGN = 'I'.
APPEND S_VBELN.
S_VBELN-LOW = '55'.
S_VBELN-HIGH = '55'.
S_VBELN-OPTION = 'EQ'.
S_VBELN-SIGN = 'E'.
APPEND S_VBELN.
2006 Nov 26 7:27 AM
hi,
look this example..
here is am giving the starting and end date of a month as default.
the similar thing u can adopt.
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.
rgds
Anver
<b><i>if hlped pls mark points</i></b>
2006 Nov 26 2:03 PM
initialization.
svbeln-low = 1.
svbeln-high = 20.
svbeln-option = bt.
svbeln-sign = check this whether needs to be given...
2006 Nov 26 2:08 PM
Hi,
Try this:
TABLES: VBAK.
...
SELECT-OPTION: S_VBELN FOR VBAK-VBELN.
...
INITIALIZATION.
S_VBELN-LOW = '1'.
S_VBELN-HIGH = '20'.
S_VBELN-OPTION = 'BT'.
S_VBELN-SIGN = 'I'.
APPEND S_VBELN.
S_VBELN-LOW = '16'.
S_VBELN-HIGH = '16'.
S_VBELN-OPTION = 'EQ.
S_VBELN-SIGN = 'E'.
APPEND S_VBELN.
S_VBELN-LOW = '50.
S_VBELN-HIGH = '60'.
S_VBELN-OPTION = 'BT'.
S_VBELN-SIGN = 'I'.
APPEND S_VBELN.
S_VBELN-LOW = '55'.
S_VBELN-HIGH = '55'.
S_VBELN-OPTION = 'EQ'.
S_VBELN-SIGN = 'E'.
APPEND S_VBELN.