cancel
Showing results for 
Search instead for 
Did you mean: 

how to derive Fiscal week from date

Former Member
0 Kudos

Hi,

We've a requirement where we've to derive fiscal week from basic start date as show in below screenshot. Please can you give sample code how to derive this from date. 

We're using BW 3.5 data flow. please give example how to declaration etc. in bw 3.5.

In this example for basic start date 13-oct -13 and week is 42. Our fiscal year starts fom July.

Accepted Solutions (0)

Answers (3)

Answers (3)

abdullahqureshi
Contributor
0 Kudos

Hi Pawan,

In update rule use Fiscal week mapping with source info object basic start date. System will calculate the fiscal week according to the setting of fiscal year in your system.

Regards,

Abdullah

former_member185132
Active Contributor
0 Kudos

Hi,

I wouldn't recommend writing code for this requirement because in this context it can restrict your ability to use standard (0FISC* and 0CAL*) objects and can also break if they decide to change the fiscal week logic in future.

Better to ask your functional consutant to create a Fiscal Variant in OB29 tcode. This will be a custom fiscal variant and will specify the start and end date of each week as per fiscal calendar.

After that, in your DSO/Cubes, add the 0FISCPER and 0FISCVARNT objects. In the transformations/update rules, hardcode the 0FISCVARNT to the name of the above custom fiscal variant. Map the 0FISCPER from any appropriate date field in the source data.

If you do that, then 0FISCPER will automatically contain the fiscal week number which you can then use in reports.

Regards,

Suhas

dhrubojyoit_saha
Explorer
0 Kudos

May be this can help

Help on ABAP: Function Module (Custom) to get Fiscal Week from Date

This is assuming that the fiscal variant is maintained in the system.

Disclaimer : All credit to the original blogger

Regards