on 2024 Aug 29 8:48 AM
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?
Regards,
Prince
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.