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 variant for date range?

Former Member
0 Likes
655

Hi.

I need to create dynamic date range in ECC5.0 for variant, Low value previous day and Hight value is Current day . When I am creating only Low value is coming and High value is not comming. Please suggest how can i get High value for selection option .

Thanks in advance,

Regards,

Ramprasad

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
594

Hello Ramprasad,

You cannot assign multiple values using the dynamic variant calculation.

SAP documentation says:

The field SELECTION OPTIONS is only supported for date variables that supply select options and assign single values to them.

I think J@y's solution is best suited for your req.

BR,

Suhas

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
594

can have this code in intialization

read table sel_opt into wa_opt index 1.
if sy-subrc eq 0.
wa_opt-high = sy-datum.
wa_opt-low = date_wanted. "(= sy-datum - 1 )
append wa_opt to sel_opt.
endif.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
595

Hello Ramprasad,

You cannot assign multiple values using the dynamic variant calculation.

SAP documentation says:

The field SELECTION OPTIONS is only supported for date variables that supply select options and assign single values to them.

I think J@y's solution is best suited for your req.

BR,

Suhas

Read only

Former Member
0 Likes
594

Hi,

You can create a variant and and atatch to your program. This variant can be made to calculate the dates dynamically.

Read only

0 Likes
594

Hello Shivkumar ... Please give your answers in detail. Don't answer just vaguely . Thanks