on 07-03-2017 9:03 AM - last edited on 02-03-2024 9:04 PM by postmig_api_4
Scenario: I have BW tables storing the huge amount of data, so while fetching the itself I want to restrict the no of lines to avoid memory errors. so for one of the field I have set Input parameter with multiple values. As per requirements I need to use the graphical view with Input Parameters into table function for further processing.
SAP HANA version: SPS 11
I tried passing multiple values with quotes as input parameter to calculation view but fails with instantiation error. Code in table function:
DECLARE VAR_ARRAY_WT VARCHAR(4) ARRAY;
DECLARE VAR_WT_TEXT VARCHAR(3000);
DECLARE I,J INT;
**** below calculation view converts input parameter into table column removing the quotes added while passing****
VAR_WT = SELECT "INPUTPARAM" as "WAGETY" FROM "_SYS_BIC"."XX"(PLACEHOLDER."$_I_INPUT_PARAM$" => :I_WT);
VAR_WT_ROW = select "WAGETY" from :VAR_WT;
VAR_ARRAY_WT := ARRAY_AGG(:VAR_WT_ROW."WAGETY");
J := 1;
FOR I IN 1..CARDINALITY(:VAR_ARRAY_WT) DO
IF(J=1) THEN
VAR_WT_TEXT := :VAR_ARRAY_WT[:J];
ELSE
VAR_WT_TEXT := :VAR_WT_TEXT ||CHAR(39)||CHAR(39) ||',' || CHAR(39)||CHAR(39)|| :VAR_ARRAY_WT[:J];
END IF ;
J := :J + 1;
END FOR;
VAR_WT_TEXT := CHAR(39) || CHAR(39) || CHAR(39) || :VAR_WT_TEXT || CHAR(39) || CHAR(39) || CHAR(39) ;
VAR_BASE2 = SELECT * from "_SYS_BIC"."YY" (PLACEHOLDER."$DATE1$" => :DATE_FROM, PLACEHOLDER."$DATE2$" => :DATE_TO, PLACEHOLDER."$FLAG$" => :I_FLG, PLACEHOLDER."$_I_WT$" => :VAR_WT_TEXT );
I am getting below error: column store error: search table error: [34023] Instantiation of calculation model failed;exception 306002: An internal error occurred
Regards,
Amol
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.