2009 Apr 30 10:00 AM
Hi Gurus,
I'm trying to automaticaly archive a SmartForm into KPRO. My code will simulate the manual user action of attaching a file.
In order to do that, I need somehow to temporary put a file on the client frontend, but I don't want the user to know the file was downloaded to his workstation.
I know that, for example, if you open an attached file from a SAP transaction, such as ME22N for example, that the file is downloaded to your PC then opened. Internet Explorer does the same also.
How can I reproduce that mecanism ? Any method/FM I should know of ?
Thx in advance,
N.H.
Hi Gurus,
I'm trying to automaticaly archive a SmartForm into KPRO. My code will simulate the manual user action of attaching a file.
In order to do that, I need somehow to temporary put a file on the client frontend, but I don't want the user to know the file was downloaded to his workstation.
I know that, for example, if you open an attached file from a SAP transaction, such as ME22N for example, that the file is downloaded to your PC then opened. Internet Explorer does the same also.
How can I reproduce that mecanism ? Any method/FM I should know of ?
Thx in advance,
N.H.
2009 May 04 4:32 AM
Hi,
check methods of class CL_GUI_FRONTEND_SERVICES. For example you can use method GET_SAPGUI_WORKDIR to get SAP working directory, download your file (method GUI_DOWNLOAD) to this folder and then upload it back to SAP. You can use method FILE_DELETE to delete it after successful upload. You can also use temp directory (method GET_TEMP_DIRECTORY) instead of SAP working directory.
Cheers
2009 Jul 08 6:11 PM
Hi Martin,
thx for your reply!
It's been a month since I faced this issue and I was hoping for a while these methods would solve my pb, but I've been told I won't be able to use FrontEnd for my issue...
I want to create attachment during the Print Process, from the Spool, the Smartforms, or the original itab, doesn't really matter actually.
But apparently, the Print process is sorta scheduled, then processed in background with some kind of "job user".
Do you think I still can use the FrontEnd method? There should be no Client when Print is processed, right?
Or do you know of a work-around which would do similar things on the Server, not the Client?
Nota: I plan to use ArchiveLink with the Generic Object Services code from common transactions. But the code just remember the location of the to-be-uploaded file (with the path), then do a lot, lot, lot of things, to eventually set up a link between the file and the SAP document, and then upload the file, at the very end of the archive-process. It looks lilke very hard to use the Server instead...
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |