Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to import and export the report

Former Member
0 Kudos

how to import and exprot the report for phrases and subsatnces

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos

Hi,

look here

or use abap command read report / read textpool

Andreas

former_member188685
Active Contributor
0 Kudos
  SUBMIT zTEST
         WITH s_vbeln  =  p_vbeln
         WITH s_posnr  =  p_posnr
         WITH p_create = 'X'
         EXPORTING LIST TO MEMORY
           AND RETURN.
after that 
  PERFORM get_results.

FORM get_results .
  DATA:it_list LIKE abaplist OCCURS 0.
  DATA:BEGIN OF it_asc OCCURS 0,
        txt(100),
       END OF it_asc.

*-Get the report output from memory
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = it_list
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.

  IF sy-subrc = 0.
*-Get the report output from memory in ascii format
    CALL FUNCTION 'LIST_TO_ASCI'
      TABLES
        listasci           = it_asc
        listobject         = it_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    LOOP AT it_asc.
      IF sy-tabix > 2.
        WRITE:/ it_asc-txt.
      ENDIF.
    ENDLOOP.
  ELSE.
    WRITE:/ p_vbeln, p_posnr, 'No data found for selection'.
  ENDIF.


ENDFORM.                    " get_results

in this way you can export and import from memory..

vijay