2007 Jun 22 9:23 AM
Hi all
How we can transport output of an ALV to spool?
Please Advise
Thanks & Regards
Samit
Hi all
How we can transport output of an ALV to spool?
Please Advise
Thanks & Regards
Samit
2007 Jun 22 9:30 AM
Hi samit,
Use this code.In the form write_summary put your code for the ALV report.The spool will be generated.You can check it in SP01 transaction
&----
*& Report ZTEST_3318 *
*& *
&----
*& *
*& *
&----
REPORT ZTEST_3318 .
tables: usr01.
perform send_report_to_spool.
&----
*& Form send_report_to_spool
&----
text
----
form send_report_to_spool.
data: loc_dest like pri_params-pdest,
wf_listname type char12,
wf_listtext like PRI_PARAMS-PRTXT,
wf_copies type i,
wf_days type i,
wf_PARAMS LIKE PRI_PARAMS, " achieving file PRI_PARAMS.
wf_valid type c.
clear : wf_listname , loc_dest , wf_listtext .
move: 'AP interface' to wf_listname .
move: 'AP interface' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
EXPORTING
destination = loc_dest
copies = 1
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = 1
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
endform. "send_report_to_spool
&----
*& Form write_summary
&----
text
----
--> p1 text
<-- p2 text
----
FORM write_summary .
data: begin of itab occurs 0,
matnr type matnr,
end of itab.
select matnr
from mara
into table itab
up to 10 rows.
loop at itab.
write: / itab-matnr.
endloop.
ENDFORM. " write_summary
If
Any problem revert back
Else
Reward Point
Endif.
2007 Jun 22 9:33 AM
Hello,
Execute the report in Background.
Apool will created for the ALV output.
Check in SP01 Tcode.
Vasanth
2007 Jun 22 9:36 AM
Hi.
You have to pass the parameter to the ALV List named IS_PRINT
dATA IS_PRINT type SLIS_PRINT_ALV.
Hope this works.
Regards
2007 Jun 22 9:46 AM
Hi Samit,
ALV by default generates the spool when the report is run in the background.
You can check the spool from transaction <b>SP01</b>.
2007 Jun 22 2:50 PM
Hi Thanks for all..
But till now i didn't go to that step..when i will go to that step will get some doubts then i will ping u agian...
2007 Jun 30 11:35 AM
Hi All Thanks for Reply
I have Another Doubt that is I am displaying all the output fields in ALV grid.
And I am calculating Totals for all Costing fields.
My doubt is I want to display Totals Text 'TOTAL' in that totals line.
Please help me out regarding this..
And one more thing is how to add different colors to ALV GRID output fields.
Please help me
Thanks & Regard
Samit
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |