Application Development and Automation 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: 
Read only

Catch EXPORTING LIST TO MEMORY

Former Member
0 Likes
672

Hello,

I am calling a ALV report by SUBMIT ZREPORT2 EXPORTING LIST TO MEMORY in my report ZREPORT1 and now I would like to catch the ZREPORT2 list information. I do not want to use LIST_FROM_MEMORY as it has a record length limitation of 1000. Any ideas please? Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
619

If ZREPORT2 is your own code too, why not just get it to return the data that it prepares for the ALV, rather than actually run it into the ALV list ... e.g. in ZREPORT1 do something like



    export l_dark = 'X' to memory id 'Z:DARK'.  "set flag to say no output wanted

    submit zreport2 and return.  "would need more parms for report screen of course

    import lt_xxxx = lt_xxxx from memory id 'Z:DATA'. "get results from ZREPORT2
    delete from memory id 'Z:DARK'.
    delete from memory id 'Z:DATA'.
   

and in ZREPORT2 have something like:


  import l_dark = l_dark from memory id 'Z:DARK'.

  if l_dark is initial.  "not set, so run ALV report as usual
    perform my_alv_report_list.
  else.
    export lt_xxxx = lt_xxxx to memory id 'Z:DATA'.  "where lt_xxxx is your ALV data table
  endif.

Jonathan

Read only

0 Likes
619

Hello,

I like your idea but the problem with it is I need the output from ZREPORT2 in a unconverted format(after you display ALV list Export -> Localfile -> Unconverted). Not sure how I can get the unconverted format with your approach. Any suggestions?

Read only

0 Likes
619

Ah, I assumed you wanted the data out of the report, not the formatted report itself... you might try using "submit ZREPORT2 to sap-spool etc etc and return" and then reading the resulting spool back in (maybe via RSPO_SPOOLDATA_TO_TEXT?).

Jonathan

Read only

Former Member
0 Likes
619

resolved myself