· Scenario#1: Copy the posting date to the delivery date in a Sales Order using a query
· Scenario#2: Copy the posting date + 7 days to the delivery date in a Sales Order using a query
· Scenario#3: Populate a UDF (U_ItemFullName) added to the row of a sales order with the format: “<ItemCode>-<ItemDescription>”
· HANA SQL/SQL Script is case sensitive. You need to use double quotes (“”) for the exact case when the table name, field name or procedure name contains lower case. Otherwise, without double quotes (“”) HANA SQL Engine in run-time will consider everything as upper case, giving you an error “Invalid column or table name”.
· In our example, the table name is entered without quote marks, since it is upper case, for example, ORDR for the Sales Order entry screen. The field name is mixed case and must be quoted, for example, the DocDate field in ORDR which stores the Posting Date.The formatted search syntax in SQL Server can select a field without a from clause. However, SAP HANA syntax requires "FROM DUMMY”
· The following FMS query (table name with double quotes) in SAP HANA will give an error as “Internal error - 1110”.
SELECT $[“ORDR”."DocDate"] FROM DUMMY
· · The function name for getting the date is different in SAP HANA. If applicable, please replace the date format 'mm/dd/yyyy’ accordingly.
· · The differences of ADD_DAYS and TO_DATE functions between SQL Server and SAP HANA list below:
HANA format | MSSQL format | HANA example | MSSQL example |
ADD_DAYS (d, n) | DATEADD(day [/ dd / d], n, datetime) | ADD_DAYS ('1.1.2012', 4) | DATEADD(day [/ dd / d], 4, '1.1.2012') |
TO_DATE (expression [, format]) | CAST (exp AS date), | TO_DATE ('20120730'), | CAST('20120730' as date), |
CONVERT(date, exp [, style ]) | TO_DATE ('20120730', 'yyyymmdd') | CONVERT(date, '20120730', 112) |
· Use the NUMBER parameter if the field concerned contains an amount and a currency key, and you want to extract the amount only.
· Use the CURRENCY parameter if the field concerned contains an amount and a currency key, and you want to extract only the currency key.
· Use the DATE parameter if the field concerned is a date field and you want to use it for calculations.
· Use 0 to get the value as a string
Fields in Sales Order Window | Item/Column UID |
Line Details Matrix | 38 |
Item Code | 1 |
Item Description | 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
11 | |
8 | |
8 | |
7 | |
6 | |
4 | |
4 | |
4 | |
3 |