2014 Mar 26 8:30 PM
Hi
I have a pdf form that read the employee details from the PA tables.
Usualy the pdf form displays in preview but now i have a request to automaticaly save the file in a folder.
The user will have a screen with a button "Generate Employee Form" when the user will press this button the system will generate the from in the backround and save a pdf file in the target folder.
Is there a way to do that ?
Thanks
Hi
I have a pdf form that read the employee details from the PA tables.
Usualy the pdf form displays in preview but now i have a request to automaticaly save the file in a folder.
The user will have a screen with a button "Generate Employee Form" when the user will press this button the system will generate the from in the backround and save a pdf file in the target folder.
Is there a way to do that ?
Thanks
2014 Mar 26 8:59 PM
Hi
Anyway you are getting the form in preview screen right?
You can print that form and create a spool.
convert that spool to pdf and save that in the required folder.
This is just one way may be you man get best way than this too.
Thanks,
Sreeram
2014 Mar 26 9:25 PM
Hi elad,
why not, process the form.
Use Function-stone convert_otf_to_pdf (in case of you are using a smartforms/sapscript) and create a method to save it in a serverfolder.
For that you can have a look at open dataset if you want to do it in a basic way
Regards
Florian
2014 Mar 27 5:13 AM
hi,
once you convert otf to pdf, do the code below
.
Here hard code your filepath (target folder).
w_full_path = target folder.
and then
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
tables
data_tab = T_pdf_tab
.
IF sy-subrc <> 0.
* * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards -
Makarand
2014 Mar 28 4:00 AM
Hey elad,
You can follow the procedure which Makarand has explained. Use the FM CONVERT_OTF to convert to PDF and use 'GUI_DOWNLOAD' to download the PDF to the required directory.
Regards
Anoop
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |