Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
Error rendering macro 'code': Invalid value specified for parameter 'lang'
REPORT ZCAL_ANOTHER_REP .

DATA: BEGIN OF LISTOUT OCCURS 0,
      LINE(1024) TYPE C,
      END OF LISTOUT.

* Submit the report and export list to memory

SUBMIT YTESTSTSSTS EXPORTING LIST TO MEMORY
            AND RETURN.

* Get list from memory and convert to ascii

PERFORM RETRIEVE_LIST_FROM_MEMORY TABLES LISTOUT.


LOOP AT LISTOUT.

  WRITE:/ LISTOUT.

ENDLOOP.

************************************************************************

* RETRIEVE_LIST_FROM_MEMORY

************************************************************************

FORM RETRIEVE_LIST_FROM_MEMORY TABLES REPORTLINES.

  DATA: LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
  DATA: TXTLINES(1024) TYPE C OCCURS 0 WITH HEADER LINE.


  CLEAR   : LIST , REPORTLINES .
  REFRESH :  LIST , REPORTLINES.

  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      LISTOBJECT = LIST
    EXCEPTIONS
      NOT_FOUND  = 1
      OTHERS     = 2.
  CHECK SY-SUBRC = 0.

  CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
      LISTOBJECT         = LIST
      LISTASCI           = TXTLINES
   EXCEPTIONS
      EMPTY_LIST         = 1
      LIST_INDEX_INVALID = 2
      OTHERS             = 3.

  CHECK SY-SUBRC = 0.
  REPORTLINES[] = TXTLINES[].


  CALL FUNCTION 'LIST_FREE_MEMORY'.

ENDFORM.                    "retrieve_list_from_memory