Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

default values for select options

Former Member
0 Likes
631

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
528

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.

3 REPLIES 3
Read only

anversha_s
Active Contributor
0 Likes
528

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>

Read only

Former Member
0 Likes
528

initialization.

svbeln-low = 1.

svbeln-high = 20.

svbeln-option = bt.

svbeln-sign = check this whether needs to be given...

Read only

Former Member
0 Likes
529

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.