cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BW Bridge: In what schema can I find table TFACS?

mitko1994
Participant
0 Likes
3,018

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? 

mitko1994_1-1743090252791.png

 

 

Accepted Solutions (1)

Accepted Solutions (1)

David_Nicolay_
Explorer

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

mitko1994
Participant
0 Likes
Thanks, David. I will probably proceed with combining the calendar data in Datasphere as per the blog.
mitko1994
Participant
0 Likes

@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?

David_Nicolay_
Explorer
0 Likes

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:

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

Answers (1)

Answers (1)

David_Nicolay_
Explorer
0 Likes

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:

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

mitko1994
Participant
0 Likes
Thank you very much, David. I guess I will implement this in Datasphere then.