on 2011 Aug 09 3:57 PM
Hi Gurus
Is there any way to save a smartform output as a file (preferably pdf) from the print preview screen?
The customer wants to save the file from that screen itself and want to avoid multiple steps.
To Add on to it, I am using HRFORMS. That means, I would not be able to write any code in the driver program as it is system generated on each server whenever you activate the HRFORMS.
Hence, although I know about the function module "HR_IT_DISPLAY_WITH_PDF" which can be used to convert the output of the smartforms to pdf in print preview, I cannot use it in the driver program as it is not editable.
Any suggestions/solutions would be appreciated.
Thanks
sapper.
Edited by: d sappanese on Aug 9, 2011 5:52 PM
Request clarification before answering.
Hi,
You can use report RSTXPDFT4 to convert the spool number to a PDF file.
Regards,
Aidan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use this code
data: wa_OTF_DATA TYPE TSFOTF.
CALL FUNCTION GV_FMNAME
EXPORTING
CONTROL_PARAMETERS = wa_CONTROL
OUTPUT_OPTIONS = wa_OUTOPTIONS
USER_SETTINGS = SPACE
GS_HEAD = wa_HEAD
GS_DATA = wa_FORM
GV_COMPANY = v_COMP_NAME
GV_CHECK = wa_QMEL-MAWERK
T_MOREDEF = v_MOREDEF
GV_LANGU = T_LANGU
IMPORTING
JOB_OUTPUT_INFO = wa_JOB_OUT.
IF SY-SUBRC = 0.
wa_OTF_DATA = wa_JOB_OUT-OTFDATA[].
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
I_OTF = wa_OTF_DATA[]
EXCEPTIONS
CONVERT_OTF_TO_PDF_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
User | Count |
---|---|
96 | |
11 | |
9 | |
9 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.