4 weeks ago - last edited 4 weeks ago
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,
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 |
---|---|
90 | |
11 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.