By
Published: 26 Jun 2003
Here's how to get the output of a standard report into an internal table without Import/Export. I wrote the code in R/3 4.5, but I am pretty sure it will work back in 4.0 and up to 4.6.
DATA: LISTOBJECT LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA: ASCII_TEMP LIKE LISTZEILE OCCURS 1 WITH HEADER LINE.
SUBMIT <prog> EXPORTING LIST TO MEMORY AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT
EXCEPTIONS
NOT_FOUND = 1.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
LISTASCI = ASCII_TEMP
LISTOBJECT = LISTOBJECT
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2.