cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Dynamic date calculation in some transactions.

Former Member
0 Kudos

Hello everyone.

I have to create some dynamic variants using the dynamic date calculation. The problem is that in some transactions it´s not possible to use some variables that can round a value. For example: in transaction /SAPAPO/MC90, I need to fix 3 months in the horizon like this: From date: 01.01.2009 To date 31.03.2009. The current month is 01.01.2009. Next month the current month will be february, so the horizon would be 01.02.2009 to 30.04.2009.

In 5.1 version, it´s impossible to fix the months, because the options that appear in the match code are:

Current Date

Current date +/- ??? days

current date +/- ??? work days

First day of current month

nth working day of current month

First day of next month

First day of previous month

Last day of previous month

Last Day of the Current Month

Does anybody knows how to do this? This is happening in other transactions to.

Thanks a lot

Regards

Angela

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I am not sure where you are looking for..but here is what I can do it in MC90 Tcode:

1. when you try to save the variant, in the variant screen check the two boxes under "Current date" field for Selection Variables attributes "L"

2. Then click on Selection variables option and click on the "D" variable so that it turns to green

3. Drop down in the first current date field, select "Current +/- ??? days. here if you want to start from today's date maintain 0 days

4. In the second Current date field maintain 90 days in "Current +/- ??? days.

5. save it

please let me know if I misunderstod the issue

Former Member
0 Kudos

Dear Angela,

you can create a report which calculates the dates you need for variants and writes the results in table TVARVC. Then you can use the column 'Name' as a selection varible type 'T' in every variant. Now you are using type 'D' for dynamic calculation.

Just schedule the report every day to keep the dates actual.

Hope it helps.

Robert

Former Member
0 Kudos

Angela,

Do not go for the P_DATFR and P_DATTO fields while saving the variant. You need to select D for 'From' field. In this, check out the last variable name (you may need to scroll down) which has the option as (Beginning of mth-xx months, end of mth+yy months). This should solve your issue.

Check ythis out & let me know. Hope this helps.

Cheers,

Srinidhi

former_member250654
Discoverer
0 Kudos

Hi Srinidhi,

Can you please let us know if you have any idea on P_DATFR and P_DATTO fields in the program: /sapapo/rtscopy. Why the fields P_DATFR and P_DATTO are used.

Thanks,

Kartick