05-02-2013 5:34 PM
Hello ,
i am attached an attachment in ME22N tcode,
my requirement is when i click the print in it the print goes to spool as well as the attachment is also created in spool.
Please help me out guys,
Thanks and regards
Sudhakar
05-02-2013 6:32 PM
Can you be a little more clear with what you need? What do you need to convert and to what does it need to be converted to?
05-02-2013 10:33 PM
05-03-2013 11:46 AM
Hello Vikram \ Shandrakanth,
my Question is when ever i give a print of Purchase order the relevent Smartform is printed and after the my attachment is printed. but it works fine its printed.
But the attachment is downloaded to the presentation system and then it goes to the printer after print it was deleted from the presentation system fine. for reading of attachment i used some function module are mentioned below.
BDS_GOS_CONNECTIONS_GET
SO_OBJECT_READ
SO_OBJECT_DOWNLOAD
so now my requirement is, i need to generate a spool request for the attachment for printing not to download the into presentation system. how can i do that? Help me out of it
Thanks and Regards
Sudhakar
05-03-2013 12:51 AM
Hi,
Check the Class CL_GOS_DOCUMENT_SERVICE method EXPORT_ATTACHMENT. You can export the attchement to a temp folder in your frontend and then read it and send it for printing which will create the spool for the attchement.
You can delete the file after your over with the processing from the temp folder using a EXTERNAL COMMAND.
Cheers,
Arindam
05-03-2013 4:20 PM
Hi Arindam,
It will be great, if you offer us the sample code for this class. And procedures to make it happen.
05-03-2013 5:45 PM
He's given you enough information. It is not permitted to ask for sample code here.
05-05-2013 1:46 PM
But I kind find way of deleting the file from the temp folder by an EXTERNAL COMMAND, what external command. And what processing.
05-05-2013 5:11 PM
Hi,
For deleting file from presentation server use FM:
GUI_DELETE_FILE
For deleting file from app server you can use external command. Check the link to know more on same.
http://help.sap.com/saphelp_nw70/helpdata/en/c4/3a8023505211d189550000e829fbbd/content.htm
Cheers,
Arindam
05-06-2013 4:22 PM
hi Hai Wang,
Use the Class CL_GUI_FRONTEND_SERVICES it will help you so many ways to work with folder and files in the presentation System. read documentation as well as every method description of this class you can understand better, all most all are static methods you can use them very easily wang.
Thanks And Regards
Sudhakar