Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

break up of inner joins

Former Member
0 Kudos

hi

i want to break below join statment to 3-4 select s tatment and combine all data into an final internal table pls suggest..

SELECT

PRT~PRTXT

  • prcon~SECGK

LEGCON~AMNT_FLT

LEGCON~AMCUR

CUIT~QUANT_FLT

CUIT~QUAUM

  • CUITDAT~RPTTS

  • CORREF~REFNO

LCLIC~LGREG

LCLIC~EXTNO

LEGCON~guid_MOBJ

LEGCON~guid_POBJ

INTO corresponding fields of TABLE gt_sagmeld

FROM LCLIC

INNER JOIN LEGCON

ON LCLICGUID_LCLIC = LEGCONGUID_LCLIC

INNER JOIN CUIT

ON LEGCONGUID_MOBJ = CUITGUID_cuhd

AND LEGCONGUID_pobj = CUITGUID_cuit

INNER JOIN PRT

ON CUITGUID_PR = PRTGUID_PR

INNER JOIn PRCON

ON CUITGUID_PR = PRCONGUID_PR

AND LCLICLGREG = PRCONLGREG

INNER JOIN CORREF

ON CUITguid_cuhd = CORREFGUID_MOBJ

inner join CUITDAT

on CUITguid_cuhd = CUITDATguid_mobj

AND CUITguid_cuit = CUITDATguid_pobj

WHERE LCLIC~EXTNO in P_extno " selection screen

AND CUITDAT~RPTTS in P_date " selection screen

AND PRT~LANGU = 'E'.

pls suggest on t his

2 REPLIES 2

former_member194613
Active Contributor
0 Kudos

why would you like to do that, a good join should be much faster than the individual statements. Even the mixing of the internal table can cause additional problems if not done optimally.

Better check the join and try to optimize it.

Run the SQL trace.

Siegfried

0 Kudos

hi Boes

i want to seperate this jons as more than three joins give performacne problems and it is six

so need to seperate it and take into different internal tables and then combine into one main table...

as it is hanging up

regards

Arora