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: 

Submit an ALV tree report

Former Member
0 Kudos

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.

3 REPLIES 3

SimoneMilesi
Active Contributor

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

Hello Miguel,

You can try using CL_SALV_BS_RUNTIME_INFO class.

This blog gives a nice explanation along with code samples.

BR,

Aashrith.

Jelena
Active Contributor
0 Kudos

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.