on 2015 Aug 27 8:36 PM
I used the following syntax while creating a scripted calculation view-
/********* Begin Procedure Script ************/
BEGIN
var_out =
Select ESSPLC , ESRVND , ESRSTY, ESSCOD,
SUM(ESHSQY),
FROM "JDA_SRC"."CIVS00P"
GROUP BY ESSPLC, ESRVND, ESRSTY, ESSCOD
Order by ESSPLC,ESRVND, ESRSTY, ESSCOD
END
/********* End Procedure Script ************/
I am getting the following error while attempting to validate my view(see attachment). Please help me
Request clarification before answering.
Really? You make _us_ all take out our magnifier glasses to actually read the error message?
My weary eyes recognised something like "... syntax error near FROM... ".
Hey that's a good hint, ain't it?
Checking how your statement looks like around the FROM word what do we find?
...
Select ESSPLC , ESRVND , ESRSTY, ESSCOD,
SUM(ESHSQY),
FROM "JDA_SRC"."CIVS00P"...
GOTCHA!
What you mean, you don't see it?
It's right there (I made the error bold):
Select ESSPLC , ESRVND , ESRSTY, ESSCOD,
SUM(ESHSQY),
FROM "JDA_SRC"."CIVS00P"
Still not? Alright then:
Select ESSPLC , ESRVND , ESRSTY, ESSCOD,
SUM(ESHSQY) , <-- this comma doesn't belong here and is only there because someone tried copy&paste coding and that didn't work out so well.
FROM "JDA_SRC"."CIVS00P"
🙂
Pro-tip: when in doubt, it can be very helpful to run a SQL statement from a procedure separately in a SQL editor window. Just to see what the error might be.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lars,
I am still getting this error-
Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "END": line 9 col 1 (at pos 422)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" as table ("ESSPLC" DECIMAL(5,1), "ESRVND" VARCHAR(6), "ESRSTY" VARCHAR(15), "ESSCOD" VARCHAR(3), "ESHSQY" DECIMAL(8,1))nProcedure DDL: create procedure "_SYS_BIC"."picture_report_BB/PIC_REP/proc" ( OUT var_out "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN n t var_out = nSelect ESSPLC, ESRVND, ESRSTY, ESSCOD,SUM(ESHSQY)nFROM "JDA_SRC"."CIVS00P"nGROUP BY ESSPLC,ESRVND,ESRSTY,ESSCODnOrder by ESSPLC,ESRVND, ESRSTY,ESSCODnEND n/********* End Procedure Script ************/n
This time attaching u the screenshot of the View
Alright mate, tell you what: this is funny.
So I am going to tell you that this time
BTW: love your screen-snapshotting-abilities! Next round on I expect a little screen-capture-movie plus voice over
Select ESSPLC,ESSCOD,SUM(ESHSQY)
FROM "_SYS_BIC"."picture_report_BB/CIVSOOP_ANALYTIC"
GROUP BY ESSPLC,ESSCOD
Order by ESSPLC,ESSCOD
Following is the error I get -
| Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "END": line 9 col 1 (at pos 404)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" as table ("ESSPLC" DECIMAL(5,1), "ESRVND" VARCHAR(6), "ESRSTY" VARCHAR(15), "ESSCOD" VARCHAR(3), "ESHSQY" DECIMAL(8,1))nProcedure DDL: create procedure "_SYS_BIC"."picture_report_BB/PIC_REP/proc" ( OUT var_out "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN n t var_out = nSelect ESSPLC,ESSCOD,SUM(ESHSQY)nFROM "_SYS_BIC"."picture_report_BB/CIVSOOP_ANALYTIC"nGROUP BY ESSPLC,ESSCODnOrder by ESSPLC,ESSCODnENDn/********* End Procedure Script ************/n |
U suppose it may be some authorization related issue-
I am again getting
Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "END": line 8 col 1 (at pos 312)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" as table ("ESSPLC" DECIMAL(5,1))nProcedure DDL: create procedure "_SYS_BIC"."picture_report_BB/PIC_REP/proc" ( OUT var_out "_SYS_BIC"."picture_report_BB/PIC_REP/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN n t var_out = nSelect ESSPLCnFROM "JDA_SRC"."CIVS00P"nnENDn/********* End Procedure Script ************/n
I just tried to set the scale of a decimal typed output parameter for a scripted calculation view to zero.
And it worked.
I just had to click into the text cell for scale, enter 0 and press [ENTER].
To be honest, I can't recall this ever not to work (even though SAP HANA studio does admittedly features some strange keyboard shortcuts and tab-cycles...).
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.