2017 Jun 16 1:12 AM - edited 2024 Feb 03 9:06 PM
Hi all.
It’s over Midnight… and I’m stuck with that problem. Time to ask for some help !
In a given table function we are using the WORKDAYS_BETWEEN() function, which rely on the TFACS calendar table from SAP ECC to calculate working days between 2 dates.
So of course you have to precise in the parameters what calendar code you want to use, and in what schema it is located.
So the problem is that the schema name ‘SAPDHL’ hardcoded there won’t survive the transport to the quality environment
I’ve already tried many things :
The last and only solution I see is to let the function with ‘SAPDHL’ hardcoded (3 times in the TF), and have a ‘powerfull user’ change it directly in the target system. This is ugly. I don’t even know if it’s feasible. I want to avoid this.
Thanks for your support.
Hello Stéphane!!!
May I suggest you to lightly change the header of your function by :
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA SCHEMA_ALIAS_IN_MAPPING_TABLE
READS SQL DATA AS
BEGIN ..............................................
You'll find the schema mapping table and aliases in HANA Modeler options. No need for quotes or anything for the schema alias.
I hope it helps even before midnight 🙂 🙂 🙂
See you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For ADD_WORKDAYS we used a variable as last argument in the function:
DECLARE V_SCHEMA CHAR(6);
SELECT physical_schema INTO V_SCHEMA FROM "_SYS_BI"."M_SCHEMA_MAPPING" WHERE authoring_schema = 'ABAP';
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.