Application Development 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: 

yestarday date(sy-update-1) in select-options

Former Member
0 Kudos
1,194

Hi,

I want to show yestarday date in my select-options as default.

I have written like this...

select-options: s_update for sy-datum.

INITIALIZATION.

s_update = sy-datum - 1.

I not getting it...where is wrong?

thanks in advance,

fractal.

1 ACCEPTED SOLUTION

former_member186741
Active Contributor
0 Kudos
144

if s_update was a parameter it would work. For select-options you have to:

s_update-option = 'EQ'.

s_update-sign = 'I'.

s_update-low = sy-datum - 1.

APPEND s_update.

10 REPLIES 10

former_member186741
Active Contributor
0 Kudos
145

if s_update was a parameter it would work. For select-options you have to:

s_update-option = 'EQ'.

s_update-sign = 'I'.

s_update-low = sy-datum - 1.

APPEND s_update.

0 Kudos
144

I tried as Parameter, but it's not getting...

0 Kudos
144

PLEASE SHOW US THE EXACT CURRENT CODE...AND WHAT VALUE IS IN THE DATE NOW?

0 Kudos
144

I have written like this..

parameters: s_update like sy-datum.

INITIALIZATION.

s_update-option = 'I'.

s_update-sign = 'EQ'.

s_update-low = sy-datum - 1.

s_update-high = sy-datum - 1.

append s_update.

I am getting an error "s_update is not a structure, no component called option".

another way:

select-options: s_update for sy-datum.

INITIALIZATION.

  • s_update-sign = 'EQ'.

  • s_update-option = 'I'.

  • s_update-low = sy-datum - 1.

  • s_update-high = sy-datum - 1.

  • append s_update.

Incorrect option "I" for selection "Update date"

what is the correct way to get yestarday date?

the date should be in ranges...From date to To-date format....

thanks,

fractal

0 Kudos
144

1.

parameters: s_update like sy-datum.

INITIALIZATION.

s_update = sy-datum - 1.

or even..

parameters: s_update like sy-datum default sy-datum.

2.

select-options: s_update for sy-datum.

INITIALIZATION.

s_update-sign = 'I'.

s_update-option = 'EQ'.

s_update-low = sy-datum - 1.

append s_update.

0 Kudos
144

This worked for me...Just comment the <b>s_update-option = ''.</b>


select-options: s_update for sy-datum.

INITIALIZATION.
*<b>s_update-option = ''.</b>
s_update-sign = 'EQ'.
s_update-low = sy-datum - 1.
s_update-high = sy-datum - 1.
append s_update.

Greetings,

Blag.

0 Kudos
144

<b>select-options:S_update for sy-datum .</b>

Do like this

INITIALIZATION.

*for slect-options.

s_update-option = 'EQ'.

s_update-sign = 'I'.

s_update-low = sy-datum - 1.

s_update-high = sy-datum - 1.

append s_update.

Its working fine ...

Pl ..award the points if it help you .

Thanks

0 Kudos
144

Fractal,

cut and paste ANYBODIES solution. They will all work but you have mixed up SIGN and OPTION.

former_member181966
Active Contributor
0 Kudos
144

Try this

selection-screen begin of block block3 with frame title text-003.

select-options:s_update for sy-datum .

parameter:dat like sy-datum.

selection-screen end of block block3.

INITIALIZATION.

*for slect-options.

s_update-option = 'EQ'.

s_update-sign = 'I'.

s_update-low = sy-datum - 1.

s_update-high = sy-datum - 1.

append s_update.

*For parameter

dat = sy-datum - 1.

Thanks

Message was edited by: Saquib Khan

Former Member
0 Kudos
144

Hi,

Do this..

initialization.

s_update-option = 'EQ'.

s_update-sign = 'I'.

s_update-low = sy-datum - 1.

append s_update.