‎2009 May 19 8:14 AM
Hi expert,
I have an internal table name equip which will get data from caufv view and other tables as follow:
SELECT
...
into corresponding fields of table equip
FROM caufv
join afih on afih~aufnr = caufv~aufnr
join iloa on iloa~iloan = afih~iloan
join iflos on iflos~tplnr = iloa~tplnr
join iflotx on iflos~tplnr = iflotx~tplnr
join vbak on vbak~aufnr = caufv~aufnr
join equz on equz~equnr = afih~equnr
join equi on equi~equnr = equz~equnr
join vbap on vbak~vbeln = vbap~vbeln
WHERE
...The requirement is using only one more JOIN statement to add more following fields to display in ALV list:
1. Add service event type description (field source is T356_T-PRIOKX ) where T356_T-PRIOK = QMEL-PRIOK and T356_T-ARTPR = u2018ZSu2019 and T356_T-SPRAS = SY-LANGU.
2. Add Service order type text (field source is T003P-TXT ) where T003P-AUART = AUFK-AUART AND T003P-SPRAS = SY-LANGU.
3. Add Activity type text (field source is T353I_T-ILATX ) where T353I_T- ILART = AFIH-ILART AND T353I_T-SPRAS = SY-LANGU.
Please suggest me. Points are for sure.
‎2009 May 19 9:25 AM
Hi Khanh,
Do consider another way of doing this - from the performance point of view.
Instead of joining all 10 tables, try to use the SELECT statement with the addition FOR ALL ENTRIES IN. This will have to be done multiple times.
Hope this helps.
Regards,
Nimish
‎2009 May 19 8:19 AM
Well, you are joining 9 tables already. it aint wise to join over 10 tables performancewise.
‎2009 May 19 9:05 AM
Hi Florian,
Thanks for your comment. I'm maintaining for this report because it is now a bit slow performance.
I just found a view but there are no views for these three tables.
‎2009 May 19 9:25 AM
Hi Khanh,
Do consider another way of doing this - from the performance point of view.
Instead of joining all 10 tables, try to use the SELECT statement with the addition FOR ALL ENTRIES IN. This will have to be done multiple times.
Hope this helps.
Regards,
Nimish
‎2009 May 19 9:35 AM
Hi,
It is not not advised by SAP to use multiple joins in a query by performance wise.
Hence, please split your query into different segment and output your result records into to a final internal table.
Thanks and regards,
Ramani N.