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

regarding alv

Former Member
0 Likes
699

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

6 REPLIES 6
Read only

Former Member
0 Likes
672

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.

Read only

Former Member
0 Likes
672

Hello,

Execute the report in Background.

Apool will created for the ALV output.

Check in SP01 Tcode.

Vasanth

Read only

varma_narayana
Active Contributor
0 Likes
672

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

Read only

Former Member
0 Likes
672

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>.

Read only

Former Member
0 Likes
672

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...

Read only

Former Member
0 Likes
672

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