02-15-2008 6:10 PM
Hello,
In my ABAP program, I have a string that contains ZPL code. I'd like to send that string directly to a label printer. If I were to take that string and copy it into a text file called LABEL.TXT and then run "COPY C:\LABEL.TXT LPT1" from a command prompt, the label prints successfully. I'm looking for the same kind of functionality from within ABAP. Does anyone know how to do this?
Thank you,
02-15-2008 6:25 PM
Try this way
1. Using fm GUI_DOWNLOAD please download to C;
2. Call fm GUI_RUN with COMMAND = 'copy c:lable.txt lpt1'
PS : I am not 100% sure about this.
a®
02-15-2008 6:48 PM
I tried using GUI_RUN but I get an error saying file doesn't exist. I think it is looking for the actual COPY.EXE file and it can't find it.
Isn't there a way to print directly to the printer in ABAP using the PRINT and PRINT-CONTROL commands?
thank you
02-15-2008 7:01 PM
I tried this but nothing prints:
DATA: PARAMS LIKE PRI_PARAMS,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS PARAMS NO-DIALOG.
WRITE / MY_LABEL.
NEW-PAGE PRINT OFF.
ENDIF.
05-02-2008 9:22 AM
hi i had a requirement where when u execute the report it should directly go to the printer , can anybody help me
regards
bhanu