Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calculation view with SQL Scripting - Activation error

shishupalreddy
Active Contributor
0 Likes
406

Hello ,

I am creating calculation view by joining two tables as below .Validation is success , but on activation i m getting the error message .please advise if I am doing something wrong .

BEGIN

      var_out = SELECT DISTINCT   CLASSH.MANDT  AS  "SAPCLIENT"  ,  CLASSH.KLART  AS  "CLASSTYPE"  , 

                    CLASSH.STATU  AS  "CLASSIFICATIONSTATUS"  ,  RTRIM( SUBSTRING( FLYER.OBJEK , 1  , 18  ) )  AS  "ABCD"   

                    FROM "SAP_ECC"."KLAH"  AS  CLASSH 

                    LEFT OUTER JOIN  "SAP_ECC"."KSSK" AS FLYER ON

                    CLASSH.MANDT  = FLYER.MANDT AND

                    CLASSH.KLART  = FLYER.KLART AND

                    CLASSH.CLINT = FLYER.CLINT

                    WHERE CLASSH.CLASS = <CLASS ID>

END /********* End Procedure Script ************/

Error message :

MDXRuntime: Internal deployment of object failed: Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near ".": line 11 col 39 (at pos 776)nSet

Schema DDL statement: set schema "SLT_RBW_MAT_MDS_DT3"nType DDL: create type "_SYS_BIC"."d-rbw-mat-mds/011_Z0M_Z0MM_MATFLYER_X13_AKE814/proc/tabletype/VAR_OUT" as

table ("SAPCLIENT" NVARCHAR(3), "CLASSTYPE" NVARCHAR(3), "CLASSIFICATIONSTATUS" NVARCHAR(1), "FLYERID" NVARCHAR(18))nProcedure DDL: create procedure

"_SYS_BIC"."d-rbw-mat-mds/011_Z0M_Z0MM_MATFLYER_X13_AKE814/proc" ( OUT var_out "_SYS_BIC"."d-rbw-mat-mds/011_Z0M_Z0MM_MATFLYER_X13_AKE814/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as  n

/********* Begin Procedure Script ************/ n

BEGIN n t var_out = SELECT DISTINCT   CLASSH.MANDT  AS  "SAPCLIENT"  ,  CLASSH.KLART  AS  "CLASSTYPE"  ,  n                    CLASSH.STATU  AS  "CLASSIFICATIONSTATUS"  ,  RTRIM( SUBSTRING( FLYER.OBJEK , 1  , 18  ) )  AS  "FLYERID"  

ntttttFROM "SAP_ECC"."KLAH"  AS  CLASSH  ntttttLEFT OUTER JOIN  "SAP_ECC"."KSSK" AS FLYER ON ntttttCLASSH.MANDT  = FLYER.MANDT AND

ntttttCLASSH.KLART  = FLYER.KLART ANDntttttCLASSH.CLINT = FLYER.CLINT ntttttWHERE CLASSH.CLASS = 'X13_AKE814'.nn

END /********* End Procedure Script

Thank you

Shishupal

1 ACCEPTED SOLUTION
Read only

shishupalreddy
Active Contributor
0 Likes
356

';' missing at the end ....now it is resolved .thanks

1 REPLY 1
Read only

shishupalreddy
Active Contributor
0 Likes
357

';' missing at the end ....now it is resolved .thanks