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

Abap list

Former Member
0 Likes
749

Hi all,

What can I do to print an abap list without displaying it?

Thanks.

Deniz.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
715

using the NEW-PAGE Print on option you can do that.

First get the Print parameters using the Function GET_PRINT_PARAMETERS function. then call that.

REPORT  ztest_print line-size 100
 line-count 10.
data: valid type c.
DATA: out_parameters TYPE pri_params.
 
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    destination            = 'LOCA'  "Replace with your Dest.Printer
    immediately            = 'X'
    release                = 'X'
    NO_DIALOG              = 'X'
  IMPORTING
    out_parameters         = out_parameters
    VALID                  = valid
  EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params   = 2
    invalid_archive_params = 3.
 
 
NEW-PAGE PRINT ON PARAMETERS out_parameters NO DIALOG. .
 "here you need to call your output statements
"if it is normal list then it should be write statements.
WRITE 'this is for testing'.
 
NEW-PAGE PRINT OFF.

Run it in background.

4 REPLIES 4
Read only

rainer_hbenthal
Active Contributor
0 Likes
715

Run it in background.

Read only

Former Member
0 Likes
716

using the NEW-PAGE Print on option you can do that.

First get the Print parameters using the Function GET_PRINT_PARAMETERS function. then call that.

REPORT  ztest_print line-size 100
 line-count 10.
data: valid type c.
DATA: out_parameters TYPE pri_params.
 
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    destination            = 'LOCA'  "Replace with your Dest.Printer
    immediately            = 'X'
    release                = 'X'
    NO_DIALOG              = 'X'
  IMPORTING
    out_parameters         = out_parameters
    VALID                  = valid
  EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params   = 2
    invalid_archive_params = 3.
 
 
NEW-PAGE PRINT ON PARAMETERS out_parameters NO DIALOG. .
 "here you need to call your output statements
"if it is normal list then it should be write statements.
WRITE 'this is for testing'.
 
NEW-PAGE PRINT OFF.

Read only

Former Member
0 Likes
715

hi

use this function module

instead of write statement

RSPO_GET_SIZE_OF_LAYOUT

Read only

Former Member
0 Likes
715

Hi

Good

If you run a program in background process than you can directly get the print of the output without displaying the output.

Thanks

mrutyun^