In This session I will discuss about important topic that might help making task easy :
1. Default HANA SAP Date format : The default date format is YYYY-MM-DD i.e. 2024-06-20 :
2. Conversion from one format to another date : From VARCHAR (for example 8 character) to Date :
INV_DATE= NVARCHAR(8)=20240620
INVOICE_DATE =Date (INV_DATE) = 2024-06-20
3. Convert date from one date format to another date format to make suitable for Input parameter with SAP data format.
PDATE (date) = 20120121
INPUT+PARAM_DATE =date(leftstr(string("PDATE"),4)+'-'+midstr(string("PDATE"),5,2)+'-'+rightstr(string("PDATE"),2))
4. Changing the date format to Varchar(12) which is frequently used -
when PDATE (date) = 20120121
string(format((date("PDATE ")),'Mon DD, YYYY'))
5. Input parameter pruning in sub query inside a internal Hana view inside a table function from a calculation view :
1. Create a table function with input parameter and put the input parameter into placeholder event.
FUNCTION "PLB.Procedures::TABLE_FUNCTION_GET_INVOICE_NO" (IN_MGR_ID NVARCHAR (12))
RETURNS TABLE ("INVOICE_NO" NVARCHAR (20), "ADDRESS" NVARCHAR (100))
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
AS
/********* Begin Procedure Script ************/
BEGIN
var_out = SELECT "INVOICE_NO",P."ADDRESS" FROM CV_SALES_DATA (PLACEHOLDER."$$IN_MGR_ID$$" => :MGR_ID);
END
2. Use Manage mapping from the view node from which the table function called.
Hope this will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
16 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |