05-22-2018 7:34 AM
Hello Group,
The problem is that I call an ALV tree report output ( using cl_gui_alv_tree) from my program with a SUBMIT sentence. The output of the report should not be displayed but it should return to the called report to send it as an attachment by email. I have tried with this :
SUBMIT (pi_report-id_report)
USING SELECTION-SET pi_report-varianteEXPORTING LIST TO MEMORY AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_abap_list[]EXCEPTIONS
not_found= 1
OTHERS= 2.
But ‘lt_abap_list[]’is empty.
Thanx in advance.
05-22-2018 9:46 AM
Hello Miguel,
the attachment should be... what? A PDF?
If so, you can submit the report with spool option and read the spool back instead of LIST_FROM_MEMORY.
So your spool can be converted easily in PDF
05-22-2018 2:13 PM
Hello Miguel,
You can try using CL_SALV_BS_RUNTIME_INFO class.
This blog gives a nice explanation along with code samples.
BR,
Aashrith.
05-22-2018 3:58 PM
Tree <> List. Tree usually kind of assumes an interactive report, so I'm rather confused why a choice was made to use the tree report in such a way...
Another possibility is that the report simply comes up blank and does not provide any results based on the parameters supplied.