06-05-2006 2:52 PM
Hi friends I want printing my barcodes a laser printer (Kyocera) it isn't a barcode printer. So I think (and I look kyocera web page my model doesn't support barcode printing in sap) print my barcodes using an external system. Before SAP we are using JollyPrint application for printing barcodes. It is using an Excel file.
I can create a excel file for this application. I must execute this (JollyPrint-it is a label application) application when I press a button. How can I execute this application?
Thanks
Mehmet
P.S. I have been writing this message with details may be somebody can give me a simple way for this
06-05-2006 3:23 PM
Hi mehmet,
1. We can use the FM
GUI_RUN
2. suppose we want to open NOTEPAD,
then pass
Notepad
to command parameter of this FM.
3. For your JollyPrint
(it should be having an EXE file)
4. Pass the filename
(along with the FULL PATH)
to this FM,
and it will run / execute it.
5. Same way, u can try with other
EXE files also, and they will simply execute.
regards,
amit m.
06-05-2006 3:02 PM
Well, I can suggest you following steps. May be it works for you .
-Create an external OS command in SM69
-Test OS command in SM49 ( <u><i>about OS command if you search in SDN youll get lot of material</i></u> )
-Create a Script at your OS level, Im assuming you might have some UNIX flavor or Sun solarias.
-Create a Shell script , which execute the printer job from OS .
-Shell script will have parameters . ( e.g. printer name, destination etc )
-set the path of shell script directory in SM69 ( the command you just created )
-Execute shell script using your ABAP program ( use FM "SXPG_COMMAND_EXECUTE" )
In the ABAP program you can pass the parameters and execute the command from ABAP as a result your job will start printing on the required destination. Moreover, you can also capture the spool at OS level .
FYI
For UNIX script, if you search in www.google.com ( UNIX forums) . youll get shell script .
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
06-05-2006 3:03 PM
I assume the application can exist independently as an exe file.
In such case you can use the CL_GUI_FRONTEND_SERVICES class's method EXECUTE.
call method CL_GUI_FRONTEND_SERVICES=>EXECUTE
exporting
APPLICATION = <Path and Name of Application>
Regards,
Ravi
06-05-2006 3:04 PM
You can execute any OS command from below transaction.
SM69 is to create a comman &
SM49 is to execute the same.
You can use SXPG_COMMAND_EXECUTE fm to execute from the program.
Regds
Manohar
06-05-2006 3:05 PM
06-05-2006 3:14 PM
Hi,
You can write a script to execute in a text file.
Store the file say abc.txt in the application server.
Execute the statement in the file when the button is pressed.
DATA DSN(20) VALUE '/usr/abc.txt'.
Case 'Sy-ucomm'.
When 'Button_click'.
OPEN DATASET dsn FILTER <filt>.
Endcase
The operating system command in the field <filt> is processed when the file <dsn> is opened.
where <filt> can be 'compress' or 'uncompress'.
Here the displayed data can be read into it in compressed form or uncompressed form.
Regards,
Tanveer.
<b>Please mark helpful answers</b>
06-05-2006 3:19 PM
Hi Mehmet,
Refer the following link. It may help you.
http://www.sapsuperusers.com/forums/showthread.php?t=4861
<b>Reward points if it helps.</b>
06-05-2006 3:23 PM
Hi mehmet,
1. We can use the FM
GUI_RUN
2. suppose we want to open NOTEPAD,
then pass
Notepad
to command parameter of this FM.
3. For your JollyPrint
(it should be having an EXE file)
4. Pass the filename
(along with the FULL PATH)
to this FM,
and it will run / execute it.
5. Same way, u can try with other
EXE files also, and they will simply execute.
regards,
amit m.
01-06-2011 2:22 PM