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

Dyanamic Date Selection in variants

arpit_shah
Contributor
0 Likes
937

Hi....

In select-options i have declared one field for Posting Date.

my requirement is

in TO : Today - 1.

based on that FROM : start of month date

for that what i hv to change in variant.

I hv select for date selection variable as D and

Name of Variable : what i hv to choose.

or how can add my new formula in that.

Regards,

Arpit

Hi....

In select-options i have declared one field for Posting Date.

my requirement is

in TO : Today - 1.

based on that FROM : start of month date

for that what i hv to change in variant.

I hv select for date selection variable as D and

Name of Variable : what i hv to choose.

or how can add my new formula in that.

Regards,

Arpit

9 REPLIES 9
Read only

Former Member
0 Likes
914

Hi,

try this code.

initialization.

d-high = sy-datum - '1'.

concatenate sy-datum0+(6) '01' into d-low.

append d.

Read only

0 Likes
914

hi..will smith

is it possible to change by dynamic date calculation by variant??........

bcoz i m calling this report from other report using submit keyword and pass the variant name.

so i want to calculate from variant only..

for this what to do?...

Regards,

Arpit

Read only

0 Likes
914

Hi,

yes it is possible,

please see the link from the online help:

[http://help.sap.com/saphelp_nw70/helpdata/en/c0/98039be58611d194cc00a0c94260a5/frameset.htm]

Kindly regards,

STefan

Read only

0 Likes
914

hi..Stefan

but my requirement is in

To : Today - 1.

From : Current month Start date....

In that how to configure.

pls advise.

Read only

0 Likes
914

Hi,

check the above link carefully it has the answer.

Read only

0 Likes
914

but in that my requirement is not fulfill.

in there option of

current month date of start to today.

but i want in to TODAY - 1.

for that i cant get.

If i want to add my variant in that then what to do?.....

Read only

0 Likes
914

Hi Arpit,

you are right - I thought it is possible without trying it,

Sorry!

You described that you call the report from an other report using SUBMIT statement-

Could you calculate the range of the date in first report and use this for the SUBMIT command?

Also there have to be a check, that the "today - 1" is not lower then the "current month start".

Today it would be 01.01.2008 to 31.12.2007 ... and this would be an error.

By the way: Happy new year!

Kindly Regards,

Stefan

Read only

0 Likes
914

hi....stefan

thanks for your reply..

is it possible if i passed variant name for other selection and for date i am pass through program?

becoz the selection is not fixed so due to the selection criteria i m passing with variant and date pass with program?

so it is possible?........

Read only

0 Likes
914

Hi Arpit,

yes this is possible ... and this time i tried it out before i post..

I used this little testreport:

-


...

DATA: lt_range_date TYPE RANGE OF d,

ls_range_date LIKE LINE OF lt_range_date.

ls_range_date-sign = 'E'.

ls_range_date-option = 'BT'.

ls_range_date-low = '20071201'.

ls_range_date-high = '20071212'.

APPEND ls_range_date TO lt_range_date.

SUBMIT zdatetest USING SELECTION-SET 'TEST'

WITH s_date IN lt_range_date.

...

-


It's calling a testreport zdatetest which has two parameters and a variant TEST.

One parameter was set by the variante and the other for the date-selection was set from the lt_range_date.

Stefan