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

date

Former Member
0 Likes
739

Hi,

how to assign low and high values of date as default.

select-options: s_date for sy-datum obligatory.

for this the default value

s_date-low = '07/01/2007

s_date-high = 07/31/20007

how to assign.

Regards,

kb

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
714

Hi KB,

To have default values to be displayed in selection-screen, you need to assign the initial values or default values in the INITIALIZATION event.You need to give values to the date field in the internal storage format as yyyymmdd.

Check this code.

select-options: s_date for sy-datum obligatory.

INITIALIZATION.

S_DATE-LOW = '20070701'.

S_DATE-HIGH = '20070731'.

APPEND S_DATE.

<b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their valuable time.

Thanks,

Vinay

6 REPLIES 6
Read only

Former Member
0 Likes
714

Hi,

Initialization.

s_date-low = '07/01/2007

s_date-high = 07/31/20007

Use the Initialization event.

Regards,

Himanshu

Read only

0 Likes
714

HI,

i have used in initialization only.

i need the date been displayed when exe, defaultly.

Regards,

kb

Read only

varma_narayana
Active Contributor
0 Likes
714

Hi...

Try this code:

select-options: s_date for sy-datum obligatory.

INITIALIZATION.

s_date-sign = 'I'. "Include

s_date-option = 'BT'. "Between

s_date-low = SY-DATUM. "Assign Current Date

s_date-high = SY-DATUM. "Assign Current Date

s_date-low+6(2) = '01' . "Assign First day of the month

s_date-high+6(2) = '01'. "Assign First day of the month

add 1 to s_date-high+4(2). "Increment Month to Store first day of next month

Subtract 1 from s_date-high. " Stores Last day of current month

APPEND S_DATE.

CLEAR S_DATE.

<b>Reward if Helpful.</b>

Read only

Vijay
Active Contributor
0 Likes
714

hi

in initialization event

s_date-low = '07/01/2007'

s_date-high = '07/31/20007'

don't forgot to put date in single quotes

regards

vijay

<b>reward points if helpful</b>

Read only

Former Member
0 Likes
715

Hi KB,

To have default values to be displayed in selection-screen, you need to assign the initial values or default values in the INITIALIZATION event.You need to give values to the date field in the internal storage format as yyyymmdd.

Check this code.

select-options: s_date for sy-datum obligatory.

INITIALIZATION.

S_DATE-LOW = '20070701'.

S_DATE-HIGH = '20070731'.

APPEND S_DATE.

<b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their valuable time.

Thanks,

Vinay

Read only

Former Member
0 Likes
714

Hi,

try this.

select-options:sdate for sy-datum.

initialization.

sdate-low = '07/01/2007'.

sdate-high = '07/31/20007'.

sdate-sign = 'I'.

sdate-option = 'BT'.

append sdate.

if it helps in solving your problem.Please award me points.