‎2025 Mar 27 3:52 PM - edited ‎2025 Mar 27 3:53 PM
Hello,
I have a requirement to use the WORKDAYS_BETWEEN function an AMDP transformation routine in BW Bridge. I get an error that the TFACS table cannot be found in the schema when I try to load some data. I found the TFACS table in BW Bridge using the search, but there is no schema mentioned there. Also, when I try to preview the data of TFACS, I get an error that I'm not authorized to do so. I used the Datasphere Database Explorer as an alternative to test my SQL, but I get the same error. Any idea of how I can find the schema and resolve this issue?
Request clarification before answering.
Hi @mitko1994 ,
Since BW Bridge runs on the BTP ABAP Environment, the integration and access to the factory calendar work differently compared to traditional ABAP systems. Accessing DDIC tables like TFACS directly is not allowed anymore, as these are not released for use in ABAP Cloud.
Instead, SAP provides public APIs and CDS views that allow you to access factory calendar data in a compliant way. Since you're accessing it via AMDP, I recommend checking this documentation:
👉 Accessing Holiday and Factory Calendar Tables Using VDM-Compliant CDS Views
There you'll find the list of released CDS views, such as I_PublicHolidayCalendarBasic.
Alternatively, you could also move the calendar logic outside of BW Bridge and implement it directly in SAP Datasphere. A colleague of mine wrote a helpful blog post that might guide you through this approach:
👉 Combining Date and Factory Calendar Data in SAP Datasphere
Hope this helps!
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David_Nicolay_ for my understanding, can you please type up an example call to the WORKDAYS_BETWEEN function using the CDS view in BW Bridge?
Hi,
do you mean for a solution within BW Bridge or in SAP Datasphere?
In Datasphere, the approach is documented in the blog I shared, where you can join the Datasphere view SAP.TIME.M_TIME_DIMENSION with the S/4HANA view I_FACTORYCALWORKINGDAYSPERYR to get the desired working day calculations.
In BW Bridge it's a bit different. You do have access to an ABAP API, but this would mean stepping outside of SQL/AMDP logic. You can use the following API:
Interface: IF_FHC_FCAL_RUNTIME
Method: CALC_WORKINGDAYS_BETWEEN_DATES
More details can be found here:
👉https://help.sap.com/docs/btp/sap-business-technology-platform/rel-comp-factory-calendar#reading-fac...
If you're looking for a pure SQL-based solution in BW Bridge using AMDP, there currently isn’t a released CDS view equivalent to I_FACTORYCALWORKINGDAYSPERYR from S/4HANA. You’d likely need to build your own logic by joining views like I_FactoryCalendarBasic with standard date views such as I_CalendarDate.
You might also find some inspiration or examples in this SAP Community thread:
👉https://community.sap.com/t5/enterprise-resource-planning-q-a/wanted-i-calendardate-like-abap-cds-vi...
If it's an option for your use case, I would still recommend handling this logic in Datasphere, as it's much more flexible for these types of calculations.
Best regards,
David
Hi,
do you mean for a solution within BW Bridge or in SAP Datasphere?
In Datasphere, the approach is documented in the blog I shared, where you can join the Datasphere view SAP.TIME.M_TIME_DIMENSION with the S/4HANA view I_FACTORYCALWORKINGDAYSPERYR to get the desired working day calculations.
In BW Bridge it's a bit different. You do have access to an ABAP API, but this would mean stepping outside of SQL/AMDP logic. You can use the following API:
Interface: IF_FHC_FCAL_RUNTIME
Method: CALC_WORKINGDAYS_BETWEEN_DATES
More details can be found here:
👉 https://help.sap.com/docs/btp/sap-business-technology-platform/rel-comp-factory-calendar#reading-fac...
If you're looking for a pure SQL-based solution in BW Bridge using AMDP, there currently isn’t a released CDS view equivalent to I_FACTORYCALWORKINGDAYSPERYR from S/4HANA. You’d likely need to build your own logic by joining views like I_FactoryCalendarBasic with standard date views such as I_CalendarDate.
You might also find some inspiration or examples in this SAP Community thread:
👉 https://community.sap.com/t5/enterprise-resource-planning-q-a/wanted-i-calendardate-like-abap-cds-vi...
If it's an option for your use case, I would still recommend handling this logic in Datasphere, as it's much more flexible for these types of calculations.
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.