on 06-23-2014 3:23 PM
Hi,
i'm facing the following Problem: i need to convert a smartform into zpl format.
I don't need to print the smartform on a ZPL printer by using SAP standard procedure, i need the Smartform in ZPL as a "string" to send it by RFC to a specified destination (where the ZPL will be printed, finally).
Thanks for your support,
greeting Hannes
Dears,
when I trying to run RSPO_PROCESS_DIALOG_JOB by SE37, input the spool number then it returns the filename, I can see the ZPL code by this file path and name. the issue is when I embedded this FM into a customized FM, the standard FM return a result code 8( should be 5 then can get the file name). and with error message: Missing parameter: FILENAME. does anyone know what's the reason of this? we checked the import parameters are same with what we did in direct calling, also we cannot see the detailed logic of the standard FM, so really sufferring on this...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, great! thanks, sounds good, i will try,
greetings
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hannes,
there is actually a Smart Forms driver for Zebra label printers built into SAP. Device types LZEB2, LZEB3, LZEB6 use it (there are also other LZEBx device types, check out SAP notes for the differences).
You should first try if you can generate suitable output for your Zebra label printer from the Smart Form, via "normal" printing from SAP (i.e. via the SAP spooler and a connected Zebra printer).
If this works, then there is a way to solve this. What you need to do is: create the spool request from your print program via SMart Forms, but not print it (i.e. immediate print = FALSE). Remember you do need a valid printer definition in SAP for this, because Smart Forms needs one to generate the spool request.
Function module RSPO_PROCESS_DIALOG_JOB allows you to have your current ABAP program process the spool request (as if it was an SPO spool process), but not send anything to the printer but instead write the print data into a file on the application server. You can then use OPEN DATASET ... READ DATASET...CLOSE DATASET to retrieve the print data (make sure you use binary mode, so as to not modify the print data) and do whatever you want with it.
Best regards,
Alexander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander,
The function module demands a print request, but if we do not print the smartform( immediate print = FALSE ), a print request will not be created.
If I understand you correctly, the RSPO_PROCESS_DIALOG_JOB allows you to process the spool request without a print request.
Can you please give me more details how to call the function module with a spool request, because I always get the error message "Printjob not found".
Thanks for the Help,
greetings Hannes
Hi Hannes,
you are right. You need to have an output request (PJNUMMER). To avoid "real" printing, you need to define your printer in SPAD in such a way that the spool work process will never try to process jobs for this printer. The easiest way to do this is to specify a non-existing application server (spool server) for the printer in SPAD (the same way LP01 is defined).
Regards,
Alex
Ok, thank you both for your recommendations. I will think about it, but unfortunately it's not that what i exactly needed.
Do you know, if i could use the OTF data to print the Smartforms? Is it also a Printing Language like ZPL oder PCL?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Hannes,
I'm not sure if the converting works what vm suggested.
My way would be to create a virtual ZPL-Printer and write the result to a specific folder.
Afterwards you read the folder and you got your ZPL-Output...
~Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hannes,
Just a thought, i think you can develop a wrapper function module(remote enabled) around the generated smartform function module. With in the wrapper function module, set the control parameters so that smartform FM returns OTF content. convert this OFT content to XString using CONVERT_OTF function. Internal table of type Xstring will be the o/p of the wrapper FM.
Since the wrapper function is remote enabled can be called from outside, or you can also create a web service for this.
Hope this helps,
Thanks,
-VM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.