cancel
Showing results for 
Search instead for 
Did you mean: 

ST05 Error "For SQL Statements with an ITAB, the Planviz is not supported"

Princejoshizal
Explorer
0 Kudos
186

Hi All,
We wanted to analyze the performance of below select query and we are on S4HANA OP2020 system.

SELECT
a~matnr,
a~bwkey,
a~bwtar,
a~lbkum,
a~salk3,
a~verpr,
a~zkprs,
a~timestamp
FROM mbew AS a
WHERE EXISTS ( SELECT matnr, werks FROM @LT_material AS b WHERE matnr = a~matnr ) AND bwkey IN @LT_t001w_rg AND bwtar IN @LT_bwtar
INTO TABLE @DATA(lt_mbew_tabn5).

We captured ST05 trace for above SELECT query also and when we are trying to download the plan viz file it gives error like "For SQL Statements with an ITAB, the Planviz is not supported"(PFB screenshot).

It is happening because we are using @LT_material internal table in subquery.We also tried with innerjoin to @LT_material and it give same error.  So how in such cases we can get planviz file? 
Any suggestions?
Princejoshizal_0-1724917188945.png

 



Regards,
Prince

View Entire Topic
turkaj
Active Participant
0 Kudos

Hi Prince,

For example, you can use or create fixed structures here. Then you won’t need the @ symbol (Inline declaration).

    DATA: lt_mbew_tabn5 TYPE TABLE OF mbew.

    SELECT mb~matnr
           bwkey
           bwtar
           lbkum "Not present in mbew
           salk3 "Not present in mbew
           verpr "Not present in mbew
           zkprs
           timestamp
      FROM mbew as mb
      INNER JOIN mara as ma on ma~matnr = mb~matnr
      INTO TABLE lt_mbew_tabn5
        WHERE bwkey IN lt_t001w_rg
          AND bwtar IN lt_bwtar.

It’s best to define a table type with the fields you need.


Regards,
Jim