Regading smart form printpreview to pdf
<<Do not post duplicate questions. >>
i have one smart created with one custem page format . 400 * 1100 . that smart form attached to vfo3 transcation .
when iam seeing printpreviw is ok . but when iam converting this print preview to pdf . the last data missing in page .
but in print preview half page only . but not getting full data .
any one suggest me .
Edited by: Matt on Jul 20, 2010 2:05 PM
hi ,
your check with window size and Alignments
Regards,
Ansari
Similar Messages
-
To convert Smart Form output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnRefer the links -
how to convert smartform into pdf and send through mail
Smartform as PDF attachment to a mail.
smartform pdf and mail
smartform to pdf to mail
Regrads,
Amit
Reward all helpful replies. -
Sandard Smart Form output into PDF format.
Hi to all,
Any one please guide me, how to convert sandard Smart Form output into PDF format.
Regards,
Thaneshhi thanesh,
the below code may help you.
data: FM_NAME TYPE RS38L_FNAM.
DATA: W_BIN_FILESIZE TYPE I,
T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
T_PDF_TAB TYPE TLINE OCCURS 0 WITH HEADER LINE,
W_FILESIZE TYPE I,
WA_CTRLOP TYPE SSFCTRLOP,
WA_OUTOPT TYPE SSFCOMPOP,
T_OTFDATA TYPE SSFCRESCL.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = <ur form name>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
WA_CTRLOP-GETOTF = 'X'.
WA_CTRLOP-NO_DIALOG = 'X'.
WA_OUTOPT-TDNOPREV = 'X'.
call function <function module generated for ur form>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = WA_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = WA_OUTOPT
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = T_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
T_OTF[] = T_OTFDATA-OTFDATA[].
call function 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
IMPORTING
BIN_FILESIZE = W_BIN_FILESIZE
BIN_FILE =
tables
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'D:\TEST11.PDF'
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = W_FILESIZE
tables
data_tab = T_PDF_TAB
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
if sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
WRITE: / 'SUCCESSFULLY CONVERTED'.
endif. -
Hello All ,
I have created one smart form and provided option to download the same in PDF. My Problem is that is downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
I am using the following code can some one suggest me the what need to do the change after both option will work at the same time.
Please Note I have also made the use of property
SSFCOMPOP-TDNOPREV
But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
DATA :
WA_FMNM TYPE TDSFNAME, " Smart Forms: Form Name
WA_CNTL TYPE SSFCTRLOP, " FOR PDF PRINT
WA_POP TYPE SSFCOMPOP, " printer name
T_OTF_FROM_FM TYPE SSFCRESCL,
T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE,
T_OTF TYPE SSFCRESCL-OTFDATA,
W_BIN_FILESIZE TYPE I, " BINARY FILE SIZE
W_FILE_NAME TYPE STRING,
WA_FNMD TYPE RS38L_FNAM. " Name of Function Module
DATA:
W_FORM_NAME TYPE TDSFNAME,
W_FMODULE TYPE RS38L_FNAM,
W_CPARAM TYPE SSFCTRLOP,
W_OUTOPTIONS TYPE SSFCOMPOP,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
SMART FORM FUNCTION MODULE
WA_FMNM = TEXT-113.
W_FORM_NAME = TEXT-113.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = WA_FMNM
IMPORTING
FM_NAME = WA_FNMD
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END FORM
WA_CNTL-GETOTF = 'X'.
WA_CNTL-NO_DIALOG = 'X'.
WA_CNTL-PREVIEW = SPACE .
WA_POP-TDDEST = 'LP01'.
CALL FUNCTION WA_FNMD
EXPORTING
CONTROL_PARAMETERS = WA_CNTL
OUTPUT_OPTIONS = WA_POP
V_APPLN_OB = V_APPLN_OB
V_KUNNR_OB = V_KUNNR_OB
V_EBELN = V_EBELN
V_CAT_NAME = V_CAT_NAME
V_VAR_NAME = V_VAR_NAME
IMPORTING
JOB_OUTPUT_INFO = T_OTF_FROM_FM
TABLES
T_ZCNC18 = T_ZCNC18
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
T_OTF[] = T_OTF_FROM_FM-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = W_BIN_FILESIZE
TABLES
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ''
HEADER = '00'
TRUNC_TRAILING_BLANKS = ''
WRITE_LF = 'X'
COL_SELECT = ''
COL_SELECT_MASK = ''
DAT_MODE = ''
CONFIRM_OVERWRITE = ''
NO_AUTH_CHECK = ''
CODEPAGE = ''
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ''
TRUNC_TRAILING_BLANKS_EOL = 'X'
TABLES
DATA_TAB = T_PDF_TAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 .
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
Swati NamdevHi Swati,
Pls refer the below code:
TABLES: ekko.
DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
DATA: wf_name TYPE rs38l_fnam.
DATA: wf_so1.
*For PDf Conversions
DATA: int_tab_otf_data TYPE ssfcrescl,
int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
file_name TYPE string,
file_path TYPE string,
full_path TYPE string,
cparam TYPE ssfctrlop,
outop TYPE ssfcompop.
**Preview not allowed.
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = ' '.
cparam-getotf = 'X'.
GET PARAMETER ID 'EBLEN' FIELD wf_so1.
SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
int_itab WHERE ebeln = wf_so1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM_FINAL2'
IMPORTING
fm_name = wf_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION wf_name
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = int_tab_otf_data
TABLES
int_itab = int_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
int_tab_otf_final[] = int_tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = int_tab_otf_final
lines = int_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.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = full_path
filetype = 'BIN'
IMPORTING
filelength = file_size
TABLES
data_tab = int_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,
Ramneet Ahuja -
Smart Form convert to Pdf and send to email
hi,
ive dev the smart for me21n. its working fine. Standard programme is SAPLMEGUI.
now new requirement is , convert the smart form to pdf and then sending the pdf through email to customer.
Can any plz tell me is there any stadard programme or else need to custmise the print programme?
RegardsKirans belong to convert the smart form to pdf.
there is standard programme RSTXPDFT4
but after convert the form to pdf. i need to send it thorough mail.
iam checking other link one which is send by mr.naresh..
thank you
Regards -
Converting smart forms as a pdf in different languages
Hi Experts,
I have been created a smart form and later on i converted it to in pdf also, but how can i convert a smart form output into different languages (English(defualt), German, Italian, French, Spanish,). Can anyone tell me about the idea behind this or a simple demo program???????????
do i need to maintain each text on the smart form into these languages already through SE63 or somewhere any idea that can help me without translating the whole text into those languages, could be able to do pdf conversion.
Thanks and Regards,
ShakunThe OTF data needs to already be in the target language - the conversion process is a process of changing the document format only, not a translation tool.
-
Smart forms convert to pdf binary data
Dear All,
I'm working on smart forms integrations with .net and I need to send the smart forms PDF binary data though custom rfc .
For that i'm converting smart forms otf data to pdf in and pass this data through rfc but this idata is is not wokring on .net guys when they are converting this on pdf..
so is there any need of decoded smart forms otf data before passing through or i'm missing some basic step?
Please guide me?
Rg
Anujhi,
Have a look on this wiki:
[http://wiki.sdn.sap.com/wiki/display/Snippets/SmartformoutputtoPDFformat]
And maybe this one could also interest you:
[|http://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment]
regards
mickael -
How To Get The Smart Form Into The PDF File
Hello Friends,
Can Any One Tell How To Get Smart Form in PDF.
I used this RSTXPDFT4 Program.
It is asking The Spool Number.
How to get the Spool Number.the steps are
SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.
how to get spool number
The simplest method is to read the spool table directly, table TSP01
example code
REPORT zsuresh_test.
* Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
* Internal tables declaration
* Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
* Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
* Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
* This function module call is used to retrieve the name of the Function
* module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Calling the SMARTFORM using the function module retrieved above
* GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
* format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
* Printer name to be used is provided in the export parameter
* OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = w_cparam
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = w_outoptions
* USER_SETTINGS = 'X'
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
t_otf[] = t_otf_from_fm-otfdata[].
* Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
* BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
* EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILE_NAME =
* FILE_FILTER =
* INITIAL_DIRECTORY =
* WITH_ENCODING =
* PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
* presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = T_pdf_tab
* FIELDNAMES =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Do reward if helpful
Edited by: sharad narayan on Apr 4, 2008 2:14 PM
Edited by: sharad narayan on Apr 4, 2008 2:18 PM -
what are procedure shld follow to download a smartform into pdf.
i am calling directly smartform from the generated function by passing final table .go through this link, this might help you to guide about the complete process
http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/displaying-a-pdf-file-in-place-2797
Re: Smartform to PDF
Posted: Oct 10, 2006 12:37 PM in response to: Rama krishna S Reply E-mail this post
Hi,
Check this link...
http://sap4.com/wiki/index.php?title=Genera_PDF_a_partir_de_Smartforms
Please go through this link , hope you will get useful stuff from this.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450
*& Form f9100_save_to_pdf
text
-->P_WS_FORMNAME text
FORM f9100_save_to_pdf using value(ws_formname).
data: i_lines TYPE tline OCCURS 0 WITH HEADER LINE.
data: ws_bin_size type i,
ws_filename type string.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = ws_bin_size
TABLES
otf = i_otf
lines = i_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
flg_exit = 'X'.
MESSAGE i050 WITH 'Error converting to PDF format'.
EXIT.
ENDIF.
Get the download path
PERFORM get_download_path CHANGING ws_filename.
if flg_exit = 'X'.
EXIT.
endif.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = ws_bin_size
filename = ws_filename
filetype = 'BIN'
TABLES
data_tab = i_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE i050 WITH 'Error while File download'.
flg_exit = 'X'.
EXIT.
ELSE.
MESSAGE i050 WITH 'File downloaded successfully '.
flg_exit = 'X'.
EXIT.
ENDIF.
Refer the following link for more details:
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Please Refer this,
https://forums.sdn.sap.com/click.jspa?searchID=5369529&messageID=3814804
rEGARDS
VASU -
Smart form: Spool to PDF Conversion more than 100 pages.
Hi folks,
I have an issue with Function Module (FM) CONVERT_ABAPSPOOLJOB_2_PDF when the report to be converted has more than 100 pages.....i have explained this scenario as below
We have been using the FM CONVERT_ABAPSPOOLJOB_2_PDF to convert ABAP report to PDF file and then send this via mail using FM SO_DOCUMENT_SEND_API1.....
PDF conversion using FM CONVERT_ABAPSPOOLJOB_2_PDF works well if the number of report pages is less than 100....i.e the table pdf of the FM will contain the output as expected.....
If the report has more than 100 pages, the the FM CONVERT_ABAPSPOOLJOB_2_PDF will schedule the conversion job as a background job and returns with a SY-subrc eq 0 and the table parameter pdf will ne empty.
Could you suggest me a woorkaround in this situtaion...i.e how do I then get the output of the background job
And any process to convert Spool to PDF if having more than 100 pages.
Thanks in Advance............Pb,
If the report has more than 100 pages, the the FM CONVERT_ABAPSPOOLJOB_2_PDF will schedule the conversion job as a background job and returns with a SY-subrc eq 0 and the table parameter pdf will ne empty
i would suggest you to if pages are more than 100 than you need to send report output to sp01 with spool request number by using fm job_open..job_close..
than from sp01 you can convert pdf by running RSTXPDFT4 in se38.
hope this would solve your problem.
Amit. -
Hi Guys,
I have one query in the smartforms, I can able to convert the smartform to PDF and saving the PDF in my DESKTOP directly with showing the POP_UP, when i choose the print preview in the POP-UP screen.
*My Requirement is : I need to display the PDF details first and later i will chose the save option, Could you add your comments.
As of now i am using below code the PDF saving in the DESKTOP, Could any ple add your suggestion how to show the PDF with out saving the PDF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = LOC_PDF_LEN
TABLES
OTF = INT_OTF
LINES = IT_LINES
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To display File SAVE dialog window
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
CHANGING
FILENAME = LOC_FILE_NAME
PATH = LOC_FILE_PATH
FULLPATH = LOC_FULL_PATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = LOC_PDF_LEN
FILENAME = LOC_FULL_PATH
FILETYPE = 'BIN'
TABLES
DATA_TAB = IT_LINES
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi
If you mean to see the pdf file before saving it, it's possible to see the print of the sf only.
If you mean to open the pdf file after saving it:
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = LOC_FILE_NAME
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6.
Max -
hi frnds,
How to call a smartform in a ABAP program? what is the function module? give step by step process........Go through this
*& Report ZQMR_QUALITY_NOTIFICATION
REPORT zqmr_quality_notification NO STANDARD PAGE HEADING .
Table Declaration
TABLES: qmel,
prps,
proj,
afvc,
makt,
qpct,
jest,
jsto,
tj30t,
tq80_t.
Types Declaration
TYPES: BEGIN OF typ_qmel,
qmnum TYPE qmel-qmnum,
qmart TYPE qmel-qmart,
qmtxt TYPE qmel-qmtxt,
erdat TYPE qmel-erdat,
qwrnum TYPE qmel-qwrnum,
psp_nr TYPE qmel-psp_nr,
fertaufnr TYPE qmel-fertaufnr,
ebeln TYPE qmel-ebeln,
ebelp TYPE qmel-ebelp,
matnr TYPE qmel-matnr,
mblnr TYPE qmel-mblnr,
arbpl TYPE qmel-arbpl,
ekorg TYPE qmel-ekorg,
bkgrp TYPE qmel-bkgrp,
objnr TYPE qmel-objnr,
pnlkn TYPE qmel-pnlkn,
fertaufpl TYPE qmel-fertaufpl,
qmcod TYPE qmel-qmcod,
qmnam TYPE qmel-qmnam,
ernam TYPE qmel-ernam,
prueflos TYPE qmel-prueflos,
zz_short_text TYPE qmel-zz_short_text,
END OF typ_qmel.
TYPES: BEGIN OF typ_prps,
psphi TYPE prps-psphi,
END OF typ_prps.
TYPES: BEGIN OF typ_proj,
post1 TYPE proj-post1,
pspnr TYPE proj-pspnr,
END OF typ_proj.
TYPES: BEGIN OF typ_afvc,
vornr TYPE afvc-vornr,
ltxa1 TYPE afvc-ltxa1,
aufpl TYPE afvc-aufpl,
plnkn TYPE afvc-plnkn,
END OF typ_afvc.
TYPES: BEGIN OF typ_makt,
maktx TYPE makt-maktx,
matnr TYPE makt-matnr,
END OF typ_makt.
TYPES: BEGIN OF typ_qpct,
code TYPE qpct-code,
katalogart TYPE qpct-katalogart,
codegruppe TYPE qpct-codegruppe,
kurztext TYPE qpct-kurztext,
END OF typ_qpct.
TYPES: BEGIN OF typ_jest,
stat TYPE jest-stat,
objnr TYPE jest-objnr,
END OF typ_jest.
TYPES: BEGIN OF typ_jsto,
stsma TYPE jsto-stsma,
objnr TYPE jsto-objnr,
END OF typ_jsto.
TYPES: BEGIN OF typ_tj30t,
txt04 TYPE tj30t-txt04,
txt30 TYPE tj30t-txt30,
estat TYPE tj30t-estat,
stsma TYPE tj30t-stsma,
END OF typ_tj30t.
TYPES: BEGIN OF typ_tq80_t,
qmartx TYPE tq80_t-qmartx,
qmart TYPE qmel-qmart,
END OF typ_tq80_t.
Internal table Declaration
DATA: gt_qmel TYPE STANDARD TABLE OF typ_qmel.
DATA: gt_prps TYPE STANDARD TABLE OF prps.
DATA: gt_proj TYPE STANDARD TABLE OF typ_proj.
DATA: gt_afvc TYPE STANDARD TABLE OF typ_afvc.
DATA: gt_makt TYPE STANDARD TABLE OF typ_makt.
DATA: gt_qpct TYPE STANDARD TABLE OF typ_qpct.
DATA: gt_jest TYPE STANDARD TABLE OF typ_jest.
DATA: gt_jsto TYPE STANDARD TABLE OF typ_jsto.
DATA: gt_tj30t TYPE STANDARD TABLE OF typ_tj30t.
DATA: gt_text1 TYPE STANDARD TABLE OF text1.
DATA: gt_tq80_t TYPE STANDARD TABLE OF typ_tq80_t.
DATA: gt_final TYPE STANDARD TABLE OF zqms_qn.
Structure Declaration
DATA:gs_qmel TYPE typ_qmel.
DATA:gs_prps TYPE prps.
DATA:gs_proj TYPE typ_proj.
DATA:gs_afvc TYPE typ_afvc.
DATA:gs_makt TYPE typ_makt.
DATA:gs_qpct TYPE typ_qpct.
DATA:gs_jest TYPE typ_jest.
DATA:gs_jsto TYPE typ_jsto.
DATA:gs_tj30t TYPE typ_tj30t.
DATA:gs_text1 TYPE text1.
DATA:gs_tq80_t TYPE typ_tq80_t.
DATA:gs_final TYPE zqms_qn.
DATA: gv_inspt TYPE char20.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b11 WITH FRAME TITLE text-110.
PARAMETER: p_qmnum TYPE qmel-qmnum OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b11.
Start of Selection
START-OF-SELECTION.
PERFORM zf_fetch_data.
PERFORM zf_final_table.
*End of Selection
END-OF-SELECTION.
PERFORM zf_print_form.
*& Form zf_print_form
text
--> p1 text
<-- p2 text
FORM zf_print_form .
DATA: lv_form_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZQMS_QUALITY_NOTIFICATION'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = lv_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION lv_form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
gt_final = gt_final
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " zf_print_form
*& Form zf_fetch_data
text
--> p1 text
<-- p2 text
FORM zf_fetch_data .
REFRESH gt_qmel.
SELECT qmnum
qmart
qmtxt
erdat
qwrnum
psp_nr
fertaufnr
ebeln
ebelp
matnr
mblnr
arbpl
ekorg
bkgrp
objnr
pnlkn
fertaufpl
qmcod
qmnam
ernam
zz_short_text
prueflos
FROM qmel
INTO CORRESPONDING FIELDS OF TABLE gt_qmel
WHERE qmnum EQ p_qmnum.
IF NOT gt_qmel[] IS INITIAL.
SELECT vornr
ltxa1
aufpl
plnkn
FROM afvc INTO CORRESPONDING FIELDS OF TABLE gt_afvc FOR
ALL ENTRIES IN gt_qmel WHERE
aufpl EQ gt_qmel-fertaufpl AND
plnkn EQ gt_qmel-pnlkn.
SELECT maktx
matnr
FROM makt INTO CORRESPONDING FIELDS OF TABLE gt_makt FOR
ALL ENTRIES IN gt_qmel WHERE
matnr EQ gt_qmel-matnr AND
spras EQ sy-langu.
SELECT qmartx
qmart
FROM tq80_t INTO CORRESPONDING FIELDS OF TABLE gt_tq80_t
FOR ALL ENTRIES IN gt_qmel WHERE
qmart EQ gt_qmel-qmart AND
spras EQ sy-langu.
SELECT code
katalogart
codegruppe
kurztext
FROM qpct INTO CORRESPONDING FIELDS OF TABLE gt_qpct
FOR ALL ENTRIES IN gt_qmel WHERE
code EQ gt_qmel-qmcod
AND katalogart EQ 'T'
AND codegruppe EQ 'INSPTYPE'.
SELECT pspnr
psphi
FROM prps INTO CORRESPONDING FIELDS OF TABLE gt_prps
FOR ALL ENTRIES IN gt_qmel WHERE
pspnr EQ gt_qmel-psp_nr.
SELECT stat
FROM jest INTO CORRESPONDING FIELDS OF TABLE gt_jest FOR
ALL ENTRIES IN gt_qmel WHERE
objnr EQ gt_qmel-objnr
AND stat EQ 'E*'
AND inact <> 'X'.
SELECT stsma FROM jsto INTO CORRESPONDING FIELDS OF TABLE gt_jsto
FOR ALL ENTRIES IN gt_qmel WHERE
objnr EQ gt_qmel-objnr.
ENDIF.
IF NOT gt_prps[] IS INITIAL.
SELECT pspnr
post1
FROM proj INTO CORRESPONDING FIELDS OF TABLE gt_proj
FOR ALL ENTRIES IN gt_prps WHERE
pspnr EQ gt_prps-psphi.
ENDIF.
IF NOT gt_jsto[] IS INITIAL.
SELECT txt04
txt30
estat
FROM tj30t INTO CORRESPONDING FIELDS OF TABLE
gt_tj30t FOR ALL ENTRIES IN gt_jsto
WHERE stsma EQ gt_jsto-stsma
AND spras EQ sy-langu.
ENDIF.
ENDFORM. " zf_fetch_data
*& Form zf_final_table
text
--> p1 text
<-- p2 text
FORM zf_final_table .
LOOP AT gt_qmel INTO gs_qmel.
MOVE gs_qmel-qmnum TO gs_final-qmnum .
MOVE gs_qmel-qmart TO gs_final-qmart .
MOVE gs_qmel-erdat TO gs_final-erdat.
MOVE gs_qmel-qwrnum TO gs_final-qwrnum .
MOVE gs_qmel-psp_nr TO gs_final-psp_nr .
MOVE gs_qmel-fertaufnr TO gs_final-fertaufnr.
MOVE gs_qmel-ebeln TO gs_final-ebeln .
MOVE gs_qmel-ebelp TO gs_final-ebelp .
MOVE gs_qmel-matnr TO gs_final-matnr .
MOVE gs_qmel-mblnr TO gs_final-mblnr .
MOVE gs_qmel-arbpl TO gs_final-arbpl .
MOVE gs_qmel-ekorg TO gs_final-ekorg .
MOVE gs_qmel-bkgrp TO gs_final-bkgrp .
MOVE gs_qmel-qmnam TO gs_final-qmnam .
MOVE gs_qmel-ernam TO gs_final-ernam .
MOVE gs_qmel-zz_short_text TO gs_final-zz_short_text.
MOVE gs_qmel-prueflos TO gs_final-prueflos .
MOVE gs_qmel-qmtxt TO gs_final-qmtxt .
READ TABLE gt_makt INTO gs_makt WITH KEY matnr = gs_qmel-matnr.
IF sy-subrc = 0.
MOVE gs_makt-maktx TO gs_final-maktx .
ENDIF.
READ TABLE gt_tq80_t INTO gs_tq80_t WITH KEY qmart = gs_qmel-qmart.
IF sy-subrc = 0.
MOVE gs_qmel-qmart TO gs_final-qmartx .
ENDIF.
READ TABLE gt_afvc INTO gs_afvc WITH KEY aufpl = gs_qmel-fertaufnr
plnkn = gs_qmel-pnlkn.
IF sy-subrc = 0.
MOVE gs_afvc-vornr TO gs_final-vornr .
MOVE gs_afvc-ltxa1 TO gs_final-ltxa1 .
ENDIF.
READ TABLE gt_prps INTO gs_prps WITH KEY pspnr = gs_qmel-psp_nr.
READ TABLE gt_proj INTO gs_proj WITH KEY pspnr = gs_prps-psphi.
IF sy-subrc = 0.
MOVE gs_proj-post1 TO gs_final-post1.
ENDIF.
READ TABLE gt_jest INTO gs_jest WITH KEY objnr = gs_qmel-objnr.
READ TABLE gt_jsto INTO gs_jsto WITH KEY objnr = gs_qmel-objnr.
READ TABLE gt_tj30t INTO gs_tj30t WITH KEY stsma = gs_jsto-stsma
estat = gs_jest-stat.
IF sy-subrc = 0.
MOVE gs_tj30t-txt04 TO gs_final-txt04 .
MOVE gs_tj30t-txt30 TO gs_final-txt30 .
ENDIF.
READ TABLE gt_qpct INTO gs_qpct WITH KEY code = gs_qmel-qmcod.
IF sy-subrc = 0.
CONCATENATE gs_qpct-code '-' gs_qpct-kurztext INTO gv_inspt.
MOVE gv_inspt TO gs_final-insp.
ENDIF.
APPEND gs_final TO gt_final.
ENDLOOP.
CLEAR: gs_qmel,gs_jest,gs_tj30t,gs_afvc,gs_tq80_t,gs_makt .
ENDFORM. " zf_final_table -
PDF Form giving different data compare to smart form
Hi Friends,
There are few scenerion in my system where my application produce a PDF form (Smart Form Convert to PDF through OTF)
In some case when I execute/print the form it shows me all PO form represnt me a differnt PO form althought their smartform is showing up correct PO.
Please help me out what can be a issue.
-RickHi ,
Like I have print of 5-6 PO then I am getting a refrence of some other PO in all print of these 5-6 PO.
for example...I have a print of series 1000000001 to 1000000005 then I am getting the details of other PO 1000000011 into all 5 print of PO starting from 1 to 5.
Note- I have a custom program which convert smartforms to OTF and send a PDF to mail id.
-Ricky -
Smart Form as PDF within iframe
Hi all,
the problem i'm facing today is that i can't display a SMART FORM as a PDF in an <iframe> Tag.
If i call a simple PDF (which is stored on my PC as a local file) everything works fine and the PDF is
shown within the iframe Tag.
<html>
<head>
</head>
<body>
Test<p>
<iframe src="C:Test.pdf" width="90%" height="400" name="test"></iframe>
</body>
</html>
If i try to do the same with my test BSP the PDF is not shown within iframe Tag. Instead the iframe Tag
stays empty and the PDF is called directly by the Adobe Reader and not by my Browser (IE7).
<html>
<head>
</head>
<body>
Test<p>
<iframe src="https://vsapex2ci.daksap.de:44320/sap/bc/bsp/sap/zpdf_test/test.htm"
width="90%" height="400" name="test"></iframe>
</body>
</html>
On my test.htm only OnInitialization is implemented. Here's the Code:
DATA: lv_pdf TYPE xstring,
ls_output_data TYPE ssfcrescl,
ls_ctrl_param TYPE ssfctrlop,
lv_fm_name TYPE rs38l_fnam,
lt_lines TYPE TABLE OF tline,
lv_pdf_len TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTESTPDF'
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
ls_ctrl_param-no_dialog = 'X'.
ls_ctrl_param-getotf = 'X'.
CALL FUNCTION lv_fm_name
EXPORTING
CONTROL_PARAMETERS = ls_ctrl_param
USER_SETTINGS = space
IMPORTING
JOB_OUTPUT_INFO = ls_output_data
* Conversion of output format OTF into PDF format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_pdf_len
bin_file = lv_pdf
TABLES
otf = ls_output_data-otfdata
lines = lt_lines.
response->set_header_field( name = 'content-type'
value = 'application/pdf' ).
response->set_header_field( name = 'cache-control'
value = 'max-age=0' ).
response->set_header_field( name = 'content-disposition'
value = 'attachment; filename=test.pdf' ).
lv_pdf_len = XSTRLEN( lv_pdf ).
response->set_data( data = lv_pdf
length = lv_pdf_len ).
navigation->response_complete( ).
How can i display my generated PDF (SMART FORM) within an iframe Tag?
Regards
Mark-Andréhere is the code
data: cached_response type ref to if_http_response.
create object cached_response type cl_http_response exporting add_c_msg = 1.
cached_response->set_data( file_content ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = file_mime_type ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).
call function 'GUID_CREATE'
importing
ev_guid_32 = guid.
concatenate runtime->application_url '/' guid into display_url.
cl_http_server=>server_cache_upload( url = display_url
response = cached_response ).
return.
now in the layout use display_url as the src for iframe
Raja -
Sending emails in PDF & TXT format generated by SAP script/Smart forms
Hi
We have a requirement to configure SMTP node to send emails in PDF & TXT format. Currently, Output format for SAP Documents generated by SAP Script/Smart Forms configured in PDF. (Tx - SCOT - SMTP Node - Intetnet - Output Forms for SAP Documents). But, We also like to send emails in TXT format for other application in the same system. I see that you can send emails generated by SAP Script/Smart Forms either in PDF or TXT format not both.
Is it possible to send the emails in both the formats by configuring in Tx SCOT?
Your inputs will be appreciated.
Regards
ChanduHi chandu,
1. emails in both the formats by configuring in Tx SCOT ?
Scot will allow only ONE AT A TIME.
2. The other workaround is,
that using some FM
convert the OTF (sapscript/smartform)
data to TEXT,
and send it as RAW
3. Configure RAW = TEXT in scot.
regards,
amit m.
Maybe you are looking for
-
How Do You Deploy a War File to The OC4J Standalone ?
I have a .war file that contains example code and I would like to deploy it to my OC4J Standalone. I tried putting the war file in the applications directory and adding a line in the server.xml file but I received the error: Error instantiating appli
-
Home Hub 5 Firewall bug causing dropped DSL connec...
We've had infinity 2 since the start of December (2013) and have had nothing but problems with it. It frequently (5x a day atm) drops the connection, sometimes it fails to re-obtain the connection so does a full restart. We had an engineer round who
-
My iPhone 5C went completely dark then had a red screen
So about a half hour ago, I had my iPhone 5C and tried turning it back on (it was fully charged) and nothing happened. So, we tried bringing it into recovery mode by holding down the power and home button for a while. The iPhone's screen just turned
-
[SOLVED] Can't build Grub
Hey all, I'm trying to patch Grub so that it doesn't show the "Welcome to GRUB" message during startup. I have done as is explained here: http://lists.gnu.org/archive/html/grub- … 00176.html This is the diff file I came up with: --- main.c.orig 2012-
-
Hi! Are there any working configurations for ipsec with an iphone connecting to a rv220w? I don't want to set up an insecure pptp vpn... If there aren't any working configurations, will there be iphone support in future firmware releases? Best regard