‎2015 Apr 30 5:56 AM
Dear Experts,
In my system it is created 'ZPRINT' external command in SM69, and below is the code.
| Customer | ZPRINT | Windows NT | cmd /c |
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZPRINT'
additional_parameters = lv_add_parameters "
operatingsystem = 'Windows NT'
when ever program is run, Print is getting printer. Please help me where I can find the logic for the above external command.
Thank in advance.
Regards,
Kumar
‎2015 Apr 30 7:19 AM
Hi, Kumar!
I didn't get what's your problem.
You say that you have found ZPRINT in SM69 - it's the place where external commands are defined. You can find specific OS and OS command together with its parameters. What do you mean by command's logic?
You can find additional info on help portal.
‎2015 Apr 30 8:20 AM
Dear Nikolay Evstigneev,
Thank You for your Reply.
I want to know how it is getting printed after running the below code.Where I can see the logic or Print settings.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZPRINT'
additional_parameters = lv_add_parameters "
operatingsystem = 'Windows NT'
Regards,
Kumar
‎2015 Apr 30 8:22 AM
And what does SM69 say about the OS command and its parameters?
‎2015 Apr 30 8:27 AM
I'm sorry Nikolay.. I'm not under standing the actual concept.
Below is the code .. in my program.. Once we run the report it is getting printed.
Actual issue is.. it is always giving one print out, user need needs to print more than one..
I'm not sure where the logic written for this, how the ZPRINT command send the printer advice to Printer.. where will be printer settings.
REPLACE ALL OCCURRENCES OF '.pdf' IN lv_file_path WITH '.ps'.
CONCATENATE ' -S' lv_printer '-P raw' lv_file_path INTO lv_add_parameters SEPARATED BY ' '.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZPRINT'
additional_parameters = lv_add_parameters
operatingsystem = 'Windows NT'
‎2015 Apr 30 8:40 AM
I cannot guess what you're using in your system until you open SM69 and show what is written there for ZPRINT command in the field "Name of external program" as I've already asked you. It seems that it is some Windows utility that prints postscript. Maybe, Ghostscript or similar stuff (I haven't used it for ages).
‎2015 Apr 30 10:23 AM
Name of the external Program is showing as : cmd /c
Parameters of external program : lpr
lpr : Windows NT
‎2015 Apr 30 11:13 AM
So, that's the answer - you are running lpr utility through command line.
Syntax of lpr command can be found here. For more information about this utility feel free to ask Google
‎2015 May 12 6:45 AM
Dear Nikolay Evstigneev,
Thank you very muck for your Reply.
I have one final query..
If any settings needs to be changed in lpr utility,who will be the responsible team, I mean like SAP ABAP/BASIS or Microsoft team or any other..
‎2015 May 12 7:11 AM
I think as far as this external command is used in some custom development, Basis guys will say, "It's for developers" And it'll probably be maintained by developers with the help of MS team (if any) unless your teamlead finds some strong arguments against.
‎2015 May 12 7:19 AM
‎2015 May 12 7:34 AM
‎2015 May 13 6:42 AM