Skip to Content
0
Jun 01, 2020 at 03:29 PM

Query - Question

85 Views

Hello All,

I am writing a query and link it to a TCode. The issue I am running into is the length of time the query takes to run (almost 5 min).

My Table join is AFPO- AUFNR > (Left Outer Join) RESB - AUFNR / RESB - MATNR > MARA - MATNR / RESB - STLNR > STPO - STLNR

I am attempting tp use the Sales order number, the first 2 digits of a part number (BT* for this) and the first 2 digits of the component used to make the material BT (PT*). I want this to bring back the Material, Material Description, the Component used to make that Material and how much of that material is used to make it.

i.e.

Material: BT-000001 - Bent Tube 1

Component: PT-00001 100 Inches

When I run the same query without STPO table it runs quick, 3 seconds,

My question is, is there a Logical database that may have this or is there any other way to get this data or to speed up my query?