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

Dynamic Date Calculation for Current Date - 1

Former Member
0 Likes
2,407

I am trying to create a variant with a dynamic date calculation attribute.

I am following the instructions as they are posted to the web but I get an error message.

I want to get all data EQ to the current date -1

In the object for selection screen I enter a D for Selection Variable, for Name of Variable I enter an I to include specific values and the option EQ for current date +/- ??? days. Then I enter 1- for the number of days. I have tried to enter this many times and in many ways but it doesn't work. I keep getting this message "lower limit of interval is greater than upper limit"

1 ACCEPTED SOLUTION
Read only

natasha_baunach
Explorer
1,904

Carolyn,

Please apply OSS note Note 990695 - Dynamic date calculation, DB 274, which should also apply the prereq Note 956480 (fix for negative values).

Natasha

9 REPLIES 9
Read only

amit_khare
Active Contributor
0 Likes
1,904

Hi,

Welcome to SDN.

Selection-screen has four values -

SIGN

OPTION

LOW

HIGH

Pass your date value in the option low for the screen.

Sign you have already pass as I and option as EQ.

Regard,

Amit

Reward all helpful replies.

Can you paste your code here.

Message was edited by:

Amit Khare

Read only

0 Likes
1,904

Hi Amit,

Thanks for answering my post. But I don't quite understand. Where are the four values SIGN, OPTION, LOW, HIGH. How do I select LOW.

Thanks

Read only

Former Member
0 Likes
1,904

Hi,

The error message you are getting is because the value in the LOW option of the select-option is greater than the value in the HIGH option.

Check if you are giving any value in the HIGH option before the execution of the program.

Regards,

Ravi.

Read only

Former Member
0 Likes
1,904

Hi Carolyn,

Please type -1 for parameter.

For select-option, please enter 'I' (I/E field) and

EQ (option field) then enter -1.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,904

Hi Carolyn,

try this:

TABLES: BKPF.

*

PARAMETERS: P_DATE LIKE SY-DATUM.

*

SELECT-OPTIONS: S_DATE FOR BKPF-BUDAT.

*

INITIALIZATION.

*

P_DATE = SY-DATUM - 1.

*

S_DATE-LOW = SY-DATUM - 1.

S_DATE-SIGN = 'I'.

S_DATE-OPTION = 'EQ'.

APPEND S_DATE.

You can use parameters or select-options as you need.

Regards, Dieter

Read only

Former Member
0 Likes
1,904

select-options : date for mkpf-budat.

initialization.

date-sign = 'I'.

date-option = 'BT'. " between EQ equal ....

date-low = '20070201'.

date-high = '20070101.

*high must be greater than low

append date.

Read only

natasha_baunach
Explorer
1,905

Carolyn,

Please apply OSS note Note 990695 - Dynamic date calculation, DB 274, which should also apply the prereq Note 956480 (fix for negative values).

Natasha

Read only

Former Member
0 Likes
1,904

Hi Carolyn,

You could try to apply the OSS note 970999, this note fixes problems with negative number in dynamic date calculation.

Regards.

Read only

Former Member
0 Likes
1,904

Hi ,

when u save the variant click the varaiable as L Selection variable and press the

selection variable push buttom .

there u see the variable where DATE is shown press in T DBL click and select + or -

when u select this come out of the screen by saving .

then select the variant u wll c the ur data will be + or - what u want to give.

Rewards points.