‎2006 Aug 03 8:32 AM
Hi everybody,
I am creating one text file and i need to print contents of that file directly to printer .For that i am using functional module GET_PRINT_PARAMETERS.
In the FM i am passing DATA_SET = p_path as exporting parameter
for printing of that file contents do i need to write any WRITE statement or is not needed.
plz guide me.
Regards
Siri.
‎2006 Aug 03 8:48 AM
form download_and_display_report.
data: x_params type pri_params,
v_valid.
call function 'GET_PRINT_PARAMETERS'
exporting
immediately = ' '
layout = 'X_65_132'
no_dialog = 'X'
importing
out_parameters = x_params
valid = v_valid.
if v_valid <> space.
new-page print on parameters x_params no dialog.
*--what ever you write using WRITE statement will be sent to the printer but not to the console.
<b>perform display_report</b>.
new-page print off.
*--when ever you write the PRINT OFF in new-page, sending data to printer will be stopped.
endif.
endform. " download_and_display_report
<b>form display_report.
write all the data what you want to send it to the printer.
endform</b>.
revert, if you need any further help.
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 Aug 03 9:00 AM
Hi Srikanth
what we have to write PERFORM DISPLAY_REPORT
and where we to write this can u give the concept of this plz
Regards
Siri
‎2006 Aug 03 9:15 AM
in the
FORM display_report.
WRITE : 'HEADING OF THE REPORT'.
WRITE : '----
'. "Underline..
LOOP AT ITAB.
WRITE 😕 ITAB-FIELD1,
ITAB-FIELD2,
*--and so onnnn
ENDLOOP.
ENDFORM.
simply, i can say, what ever you want to print, write all of them in this form. this form should be called after that NEW PAGE PRINT ON COMMAND.
so whatever you write in this form will directly sent to the printer.
regards
srikanth