Skip to Content
0

Error in scripted calculation view

Apr 30 at 02:01 PM

66

avatar image

Hi Experts

Below is my code

 
 /********* Begin Procedure Script ************/ 
 BEGIN 
 	 var_out = CE_COLUMN_TABLE("SAPABAP1"."STXL",


             [    "SRTF2" ,
                  "CLUSTR",
                  "TDNAME",
                  CONVERT ("CLUSTD" USING utf8) AS "CONVERTED_TEXT" ]);


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

I am trying to decode the value stored in table - STXL,field- CLUSTD but i am experiencing the following error

Message : Repository: Encountered an error in repository runtime extension;Model inconsistency. Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "USING": line 9 col 32 (at pos 422) Set Schema DDL statement: set schema "SYSTEM" Type DDL: create type "_SYS_BIC"."TEST/CLV_SCRIPTED_CONVERT_TEXT/proc/tabletype/VAR_OUT" as table ("SRTF2" SMALLINT, "CLUSTR" SMALLINT, "TDNAME" NVARCHAR(70), "CLUSTD" BLOB) Procedure DDL: create procedure "_SYS_BIC"."TEST/CLV_SCRIPTED_CONVERT_TEXT/proc" ( OUT var_out "_SYS_BIC"."TEST/CLV_SCRIPTED_CONVERT_TEXT/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as /********* Begin Procedure Script ************/ BEGIN var_out = CE_COLUMN_TABLE("SAPABAP1"."STXL", [ "SRTF2" , "CLUSTR", "TDNAME", CONVERT ("CLUSTD" USING utf8) AS "CONVERTED_TEXT" ]); END /********* End Procedure Script ************/

Please help me in this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lars Breddemann
May 01 at 12:47 AM
0

Using CE_-function has been dis-encouraged now for years. Also, you're using a wrong syntax for it.

The CONVERT function doesn't show up in my HANA reference documentation - it's just not a function that you can use there.

CLUSTD is a binary encoded text field from ABAP systems.

Just do the minimum search here on SCP and you'll find plenty discussions how to deal with this. Hint: it's not simply "convert to UTF-8".

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks a lot Lars for answering.

My main objective is to decode the CLUSTD and get the text hidden in hexcode. I was not not lucky enough to find out any "READ_TEXT" ABAP like inbuilt function while creating a calculation view graphically. I am new in scripting.

Please help me solving this problem.


0

Hi Indrajit,

There is no option in HANA to decode CLUSTD into a readable format.

Write an ABAP code either in ECC or in SLT to decode the Hexadeciaml into readable format.

I would prefer using ABAP keyword IMPORT instead of using FM: READ_TEXT, since FM executes for reach record which is performance intensive

Please refer this blog for more details

Regards,

Nag

0