Hi everybody,
i created one text file that contains two kinds of records.
my selection screen contains two fields
first one is logical path and second one is printer name
when i am giving values to this fields and execute, the file should save on logical path and directly print on printer.
plz guide how to proceed for achieving this.
Regards,
siri.
one hint for you :
to transfer files from presentation server to applicaiton server use the transaction : CG3Z
AND from Application server to presentation server use CG3Y.
If you want to do this in program ;
use GUI_UPLOAD function module to read the contents from the file to the internal table.
then use the below code.
OPEN DATASET <FILENAME> FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
loop at itab.
transfer itab to <FILENAME>
endloop.
close dataset <FILENAME>
regards
srikanth
Message was edited by: Srikanth Kidambi
Use:
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = logical_filename
IMPORTING
file_name = file.
OPEN DATASET file FOR INPUT IN TEXT MODE .
the below code is to SEND the text directly to the printer
call function 'GET_PRINT_PARAMETERS'
exporting
immediately = 'X'
no_dialog = 'X'
importing
out_parameters = x_params
valid = v_valid.
if v_valid <> space.
new-page print on parameters x_params no dialog.
perform display_report.
new-page print off.
endif.
form display_report.
*
write the total text which you want to print in this *
FORM
endform.
regards
srikanth
hi
good
go through these links, i hope these will help you to solve your problem.
http://help.sap.com/saphelp_nw2004s/helpdata/en/e2/88393de3bb752de10000000a114084/content.htm
http://www.sappoint.com/abap/files.pdf
thanks
mrutyun
Add a comment