‎2009 Dec 22 7:51 PM
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.
‎2009 Dec 23 1:24 AM
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
‎2009 Dec 23 2:01 AM
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?
‎2009 Dec 23 3:00 AM
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
‎2010 Jun 18 2:56 AM