‎2008 Aug 11 11:38 AM
Hi to everybody!!
I need help or any idea that can help me to solve my problem... I've to make an ALV with two differents infotypes, PA0002 and PA0015, I have to print from PA0002 pernr, perid, vorna and nachn and from PA0015 I have to print BETRG.
I make this with an inner join, but doesn't work well, this is my select
SELECT
PA0002PERNR PA0002PERID
PA0002VORNA PA0002NACHN
PA0015~LGART
INTO
(wa_tabla-pernr, wa_tabla-perid, wa_tabla-vorna,
wa_tabla-nachn, wa_tabla-betrg)
FROM PA0002 INNER JOIN pa0015 ON
PA0002PERNR = PA0015PERNR
GROUP BY
PA0002PERNR PA0002PERID
PA0002VORNA PA0002NACHN
PA0015~LGART.
APPEND wa_tabla TO itab_tabla.
ENDSELECT.
DOes anybody tell me what happend? Or any other idea for do this?!
Thanks very much!
‎2008 Aug 11 12:10 PM
Hi
Instead of using SELECT ...ENDSELECT you can save the records in the internal table at one go using
Array Fetch.
Try this....
SELECT
PA0002PERNR PA0002PERID
PA0002VORNA PA0002NACHN
PA0015~LGART
INTO TABLE itab_tabla FROM PA0002 INNER JOIN pa0015 ON
PA0002PERNR = PA0015PERNR.
Hope it helps.
Murthy
‎2008 Aug 11 11:54 AM
Hi ,
Take an internal table with all required fields .
SELECT
PA0002PERNR PA0002PERID
PA0002VORNA PA0002NACHN
PA0015~LGART
INTO * table itab *
FROM PA0002 INNER JOIN pa0015 ON
PA0002PERNR = PA0015PERNR
After fetching the entire data use sort . This even increases the performance
‎2008 Aug 11 12:10 PM
Hi
Instead of using SELECT ...ENDSELECT you can save the records in the internal table at one go using
Array Fetch.
Try this....
SELECT
PA0002PERNR PA0002PERID
PA0002VORNA PA0002NACHN
PA0015~LGART
INTO TABLE itab_tabla FROM PA0002 INNER JOIN pa0015 ON
PA0002PERNR = PA0015PERNR.
Hope it helps.
Murthy
‎2008 Aug 11 12:24 PM