Skip to Content
0
Jun 13, 2020 at 02:51 PM

HANA XSA - Input parameter issue : with and without debugging mode

279 Views Last edit Jun 13, 2020 at 03:01 PM 3 rev

Hi Experts,

I have a weird issue in the execution of calculation view with input parameter which is mapped to derive its value from a procedure.

Background of the view :

  • We have BSEG table replicated in 2 different schema : SAPEPR and SAPEPR_COPY.
  • We have created a view to fetch the records for a particular schema based on the filter expression value.

  • we have a column in union node which is mapped to constant value as below:

  • now we intend to filter the source table based on value passed in the input parameter $$IP_ACC_DATA_SLT_SRC$$.
  • Details on parameter mapping

  • $$IP_ACC_DATA_SLT_SRC$$ derives its value from procedure . The mapped procedure is a simple procedure which just gives the output as SAPEPR when $IP_ENV_VAR_SLT_SCHEMA_NAME$ is passed as 'ACC_DATA_SLT_SRC'

Resulting Query of calculation view:

SELECT TOP 5
	"MANDT",
	"BUKRS",
	"BELNR",
	"GJAHR"
FROM "SL"."sl.access.views.abstr.accDoc::CV_BSEG"
	(placeholder."$$IP_ENV_VAR_SLT_SCHEMA_NAME$$"=>'ACC_DATA_SLT_SRC');

Issue:

We running the query without debugging we get the results successfully and parameter is correctly determined as SAPEPR , this is visible in query plan as well:


Here we see step 3 has column table and SAPEPR / BSEG

Running the query when debugger is active

We don't get any results as the parameter values is not determined

If we see in explain plan


Here in step 3 we see schema name as SL.

1. I am not able to understand why is there a difference in this behavior when debugger is active.

2. Due to this issue , if anytime we want to debug any procedures where this view is queried we get different results when normal execution and different results when we debug.

Sorry for the long explanation. Any pointers on this would be helpful.

BR,

Tanmay

Attachments

cv-bseg.png (19.4 kB)
parameter.png (30.6 kB)
ondo7.png (11.4 kB)
mapping.png (26.7 kB)
gjrtq.png (14.8 kB)
mapping.png (26.7 kB)
without-debug.png (45.3 kB)
pln.png (20.0 kB)
with-debug.png (31.7 kB)
pln1.png (20.7 kB)