Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8338

PAK : TREX Planning Engine error

$
0
0

Dear experts,

 

as shown in SAP Help

 

http://help.sap.com/saphelp_nw73/helpdata/de/09/28fb4384a44cd4adb52143b77e56ee/content.htm?frameset=/de/4b/47f7d8c0cf424db0c74ce884ce7e4b/frameset.htm

 

i have implemented the TREX-methods of Interface IF_RSPLFA_SRVTYPE_TREX_EXEC without reference data.

 

Herein i have the following code that calls a HANA Procedure:

 

    l_procedure_name = 'SP_YPAK_CL_DEMO_TEST'.    r_s_view-view = l_r_sql_script->execute_sql_script(        i_view         = i_view
*        i_view_ref     = i_view_ref        i_t_iobj_param = l_t_iobj_param        i_proc_name    = l_procedure_name        i_r_msg        = i_r_msg ).


If i execute the procedure without any changes to the procedure that is created via RSPLS_SQL_SCRIPT_TOOL the code of the Procedure Looks like this and the planningfunction is executeable. (Doubleing the keyfigure values of the result set):

CREATEPROCEDURE SAP<sid>.SP_YPAK_CL_DEMO_TEST( 
IN  I_VIEW      SAP<sid>.TT_YPAKA001, 
DECIMAL (000017, 000003) ,  
OUT E_T_TABLE   SAP<sid>.TT_YPAKA001 )
LANGUAGE SQLSCRIPT READS SQL DATA AS
BEGIN
e_t_table = select * from :i_view;
END

1. My first error is the following:

 

As soon as i remove the part  'READS SQL DATA'

 

LANGUAGE SQLSCRIPT AS


for example to create a local temporary table as shown in the video

 

https://www.youtube.com/watch?v=RMI71dIGt3A

 

i get the follwing error in my fronted end tool AO: (PE error 2048 : TREX Planning engine command error [38001])

pe_error_1.JPG

Properly Debugging the executed SAP code i get a slightly more detailed error:

pe_error_2.JPG

Variable RETURN_TEXT_LONG has the value:

 

column
store error: TREX Planning Engine command error:  [38001] PlanningEngine internal
error;#Condition 'aSession.is_valid(column store error: TREX Planning Engine
command error:  [38001] PlanningEngine
internal error;#Condition 'aSession.is_valid()' failed.#Session
'20140221101824_0990000' does not exist (anymore) during execution of command
PleSnapshot.#/HDB/IMP/NewDB100_RE

 

Concerning the error message [38001] i found the following at

https://db.apache.org/derby/docs/10.1/ref/rrefexcept71493.html

 

pe_error_3.JPG

So maybe there is a authorization issue? Maybe this Information is useless.

Any hints or ideas how i could get away from that error would be highly welcomed.

 

2. My second error is the following:

If i do create the HANA procedure with

 

READS SQL DATA AS

and i do any code except SELECT in combination with UNION i get Errors.

 

E.g. This Code works

 

PROCEDURE SAP<sid>..SP_YPAK_CL_DEMO(
IN  I_VIEW      SAP<sid>..TT_YPAKA001,
P_INCREASE   DECIMAL (000017, 000003) ,
OUT E_T_TABLE   SAP<sid>..TT_YPAKA001 )
LANGUAGE SQLSCRIPT READS SQL DATA AS
BEGIN E_T_TABLE = SELECT '2015' as CALYEAR,
AS YPROD,
AS YPRODGRP,
AS YKYF,
AS VTYPE,
AS YKYFA  from dummy
UNION
SELECT '2016' as CALYEAR,
AS YPROD,
AS YPRODGRP,
AS YKYF,
AS VTYPE,
AS YKYFA  from dummy;
END

 

and this doesn't:

 

CREATE PROCEDURE SAP<sid>.SP_YPAK_CL_DEMO_TEST(    IN  I_VIEW      SAP<sid>..TT_YPAKA001,         P_INCREASE   DECIMAL (000017, 000003) ,    OUT E_T_TABLE   SAP<sid>..TT_YPAKA001 )    LANGUAGE SQLSCRIPT READS SQL DATA AS  BEGIN
declare i integer;   i := '1';   e_t_table = select * from :i_view;  END

 

 

If i declare i as integer, i get the following error :

 

 

Internal PE_ERROR:
RSR_PE007.

  

Also in this regard i have no ideas how to proceed.

All helpful Information is really appreaciated.

 

 

THX for your help!

 

Jonas


Viewing all articles
Browse latest Browse all 8338

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>