I am currently working on an application which requires all equipments from the EQUI table. When I look at the table via SE11, there are 225 entries.
When I try to select the equipments through a function module, I get a very different result.
SELECT E~EQUNR, E~EQART, I~BEBER, Q~IWERK, I~TPLNR, K~EQKTX, K~SPRAS, E~GERNR, X~PLTXT
FROM EQUI AS E
INNER JOIN EQKT AS K ON K~EQUNR EQ E~EQUNR
INNER JOIN EQUZ AS Q ON Q~EQUNR EQ E~EQUNR
INNER JOIN ILOA AS I ON I~ILOAN EQ Q~ILOAN
INNER JOIN IFLOTX AS X on X~TPLNR EQ I~TPLNR
WHERE E~EQUNR LIKE @P_EQUNR
AND I~BEBER LIKE @P_BEBER
AND I~TPLNR LIKE @P_TPLNR
AND Q~IWERK LIKE @P_IWERK
AND E~GERNR LIKE @P_GERNR
AND K~SPRAS EQ @IV_SPRAS
AND X~SPRAS EQ @IV_SPRAS
INTO TABLE @ET_EQUIPS.
When I query them with this select statement, I do get the same amount of results as the EQUI table, but without the other data I require.
SELECT E~EQUNR, E~EQART
FROM EQUI AS E
INNER JOIN JEST AS J ON J~OBJNR EQ E~OBJNR
INNER JOIN TJ02T AS T on T~ISTAT EQ J~STAT
WHERE INACT NE 'X'
AND J~STAT NE 'I0320'
AND J~STAT NE 'I0076'
INTO TABLE @ET_EQUIPS.
Any help on how to get the same amount of results with all the other data as well?
LEFT OUTER JOIN. Simple! - Suncatcher