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

Printing internal table data

Former Member
0 Likes
1,152

Hi all,

I want to print an internal table data without displaying it via ALV. That is when clicked on a button, printing should be started.

How can I do that?

Thanks a lot.

Deniz.

4 REPLIES 4
Read only

Former Member
0 Likes
610

1) Create job

2) Submit the ALV output in back gourd with print parameters, you can get the print.

Regards,

Sadasiva.

Read only

narin_nandivada3
Active Contributor
0 Likes
610

Hi,

You can do this with SAPSCRIPT or SMARFORM..

or do you want to do only through report with out including any other thing.

Please go through this thread for printing internal table data through program

- Narin

Read only

Former Member
0 Likes
610

Hi Deniz,

Go for the following links:

[http://help.sap.com/search/highlightContent.jsp]

[http://help.sap.com/search/highlightContent.jsp]

Thnks.

Read only

Former Member
0 Likes
610

Hi,

Check the following code this is exactly what you need I guess....

FM to generate spool number for the internal table wt_final_prnt.

CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'

EXPORTING

name = gv_name

dest = gv_dest

rows = gv_rows

startrow = gv_startrow

pages = gv_pages

rqtitle = 'Z9CS - STD Search Results'

rqcopies = gv_rqcopies

rqowner = gv_rqowner

immediately = gv_immediate

IMPORTING

rqid = gv_rqid

TABLES

text_data = wt_final_prnt

EXCEPTIONS

OTHERS = 1.

CLEAR : wa_final_prnt, wt_final_prnt[].

FM to set the print attributes.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

IMPORTING

out_parameters = wv_pripar

out_archive_parameters = wv_arcpar

valid = wv_val

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

FM to submit to the printer

CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'

EXPORTING

spool_request_id = gv_rqid.

Regards,

Ram.