Skip to Content


In order to work with factory calendar information it is sometimes helpful if the information would be stored in a datastore object for each day factory calendar and company code if it is a working day or not. The information is extracted after the “factory calendar” have been replicated via “Transfer global settings”

Howto extract the factory calendar information

To achieve this two function modules are needed FISCPER_FROM_CALMONTH_CALC and DATE_CONVERT_TO_FACTORYDATE.

The target DSO contains those key fields / data fields. The data fields aside from the working days keyfigure are optional but might be useful aggregated views are of intrest.


The dataflow in this example forsees to load the required company code / factory calendar assignments from the enhanced masterdata object 0COMP_CODE. This can also be altered to suit e.g. 0PLANT and those factory calendar informations.


The attached expert routine determines for each company code and factory calendar ID if the individual calendarday is a working day or not. The information is stored in the DSO.



Each day is either 0 (no working day) or 1 (working day).

Attached are both the FM and the required expert routine.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Martin Grob Post author

      yes in our case we have a factory calendar per company code which is attached to 0COMP_CODE and we derive the working days from there. you could also do the same from 0PLANT where you have the factory calendar attached from bi content.

  1. Former Member

    Hi Martin,

    This is innovative post from you. Seems to be nice code ๐Ÿ™‚ . I suggest you to come up with such blogs. Thanks for sharing.

    If possible, please keep the code opened. I mean don’t put in ZIp file.



    1. Martin Grob Post author

      Hi Suman

      Thanks for your comment. I actually uploaded the texts as TXT but somehow it seems they get zipped automatically. ๐Ÿ™‚


  2. Former Member

    Hi, nice Blog!

    Question: How did you got the (user input variables) l_start_date & l_end_date (see Expert routine) into this Expert routine (Source in ZIP is not complete).

    Plz. give exact required coding including the decleration of the variables & other steps/actions if required.

    By the way: By using 0Plant instead of 0Comp_code you get directly a value for the Calendar ID from the field 0Plant-Factcal_id. Which you can using when calling the custom FM in the expert routine. Here we used a custom datasource to add Company code (BUKRS) from ECC (R/3 6.0) to 0Plant. Which makes (BW-) live a bit easier here… ๐Ÿ˜‰

    See also table T001W (* T001K / T001) in ECC & table TFACD (Factory Calendar) in ECC/BW.

    cheers, Josh


Leave a Reply