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
Anuj
hi,
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
Similar Messages
-
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 -
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. -
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.
-
Convert TIF Binary data to PDF Binary data
Hi All,
I have uploaded TIF file into table in system in Binary format.
I need to create a spool from this Binary data, the spool should open in TIF format or PDF format.
Can you help me in doing this.
As I knw how to convert PDF to Spool, it would be even helpful, if you tell me how to convert TIF binary data into PDF binay data.
Thanks in advance.
AbhayHi Sandra,
Below is the requirement from Client:
1. PDF and Tif files will be attached to order (transaction CRMD_ORDER).
2. I have to pick the PDF and TIF attachments mentioned above using a batch report.
3. Then this batch report will create a spool for the PDF file and TIF file attachements.
4. Then the spool will be picked by another program and print them together in night.
I hope it is clear now?
Things I have done:
1. Created report ZPDF_TIF which is copy of RSPO0023.
1. Used the report ZPDF_TIF to pick up the PDF and TIF file in binary format from the order (transaction CRMD_ORDER).
2. Able to Convert PDF to spool.
I hve problem for:
1. I want to use the program ZPDF_TIF to work for both PDF and TIF file.
2. I have the TIF data in Binary (1022) into internal table picked using the report ZPDF_TIF.
2. I want to convert TIF to spool which is problem child for me as of now.
I hope the details are clear now. -
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 -
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 -
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 PMhi ,
your check with window size and Alignments
Regards,
Ansari -
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 -
Interactive-adobe form Converting into PDF without print dialog
Hi Friends,
I would like to convert Interactive - adobe form into PDF without print dialog.which adobe form interface type is Smart Forms-compatible Interface.I have tried for solution.but I could not succeeded.How can resolve the issue.please help me.
Thanks
Ramesh MHi Friends,
I would like to convert Interactive - adobe form into PDF without print dialog.which adobe form interface type is Smart Forms-compatible Interface.I have tried for solution.but I could not succeeded.How can resolve the issue.please help me.
Thanks
Ramesh M -
Smart form for different header level data
Hi,
I need to design a smart form,in th samart form i have 2 header records and for each header reocrd again 10 item records.
My form shd print with fst header record and its item records and after ending fst header record details it shd give 2nd header record and its item records.
For example I have Header records A and B
A have 1 2 3 4 5 item records and
B have 7 8 9 10 11 item records
My form shd be
A----
1
2
3
4
5
b----
7
8
9
10
11
Any inputs please
Regards
Rasheed
Edited by: Rasheed salman on Mar 19, 2009 5:33 PMYou can use the SORT to have different header.
You must be having some indicator in your ITEM table to distinguish different set of data.
In the TABLE node, Under the DATA tab, give your field in the Sort Criteria.
Select the check box Event on Sort Begin.
This will create a new node under the HEADER and MAIN area of your table. In this Node, you can put your Header to have it different for different set of records.
Like:
MAIN window
.. TABLE with sort of field1
.... HEADER
.... FIELD1 sort begin "use this for Header
.... MAIN
Regards,
Naimesh Patel -
Forms Service generated pdf null data
I'm using the Visual Studio project from the livecycle blog (http://blogs.adobe.com/livecycle/2008/01/invoke_livecycle_with_visual_b.html) to merge the sample purchase order (PO.pdf) with xml data.
lcFormsResult.outputContent.remoteURL comes back with a valid url, which I can open in IE to view the pdf. However, I would like to get the binary data and display that instead, but lcFormsResult.outputContent.binaryData is coming back as Nothing, likewise with blobRenderPDFForm.binaryData. Any idea why this might be or how I can get the binary data?The BLOB type is used to represent the com.adobe.idp.Document object in WSDL. The BLOB type is used to send/return the data to/from the LiveCycle server via the following ways: <br /><br />(1) Base64-encoded string passed in the BLOB.BinaryData field.<br />(2) MIME or DIME attachment with the attachment id passed in the BLOB.AttachmentID field.<br />(3) Web hosted resource addressed with HTTP URL passed in the BLOB.RemoteURL field.<br /><br />Sometime back, the default way for result BLOBs has changed from (1) to (3). The reason is that the SOAP Reply message is much smaller this way, as it doesn't include the actual Document content. <br /><br />If you still want to get the data as base64 encoded string in BLOB.BinaryData field, then you will have to update your code to enforce the base64-encoded way. <br /><br />To achieve it, the service SOAP URL must be appended with a special "?blob=base64" postfix. Here is an example of how this can be done in C#:<br /><br />EchoServiceService service = new EchoServiceService(); <br />service.Url = <br />"http://<host>:<port>/soap/services/EchoService?blob=base64";<br /> . . .<br /><br />Here is a Java example:<br /><br /> EchoServiceServiceLocator locator = new EchoServiceServiceLocator(); java.net.URL url = new java.net.URL(<br /> "http://<host>:<port>/soap/services/EchoService?blob=base64");<br />EchoServiceService service = locator.getEchoService(url); <br />. . .<br /><br />Thanks,<br />Mayank Gupta
-
Smart form - convertion of english to japanees language
Dear abaper,
i have an language conversion issue in smart forms. what all iam writting and passing in english should be converted into japaniees language .
did any one face the problem.if so pls let me know to close my issue . i will be very much thank full to u.
regards
veerayeah,
u can define SET LANGUAGE lang. in the initialisation of smartform.
here lang is the system defined language
hope this will be helpfull...
Regards,
Prashant -
PDF form with one submit button that prints form and sanves PDF with data with a unique file name
We have a long medical form that patients can fill out at kiosks as they wait to see a doctor. We want one button so that the patient can print out the form with one click (and finish filling it out by hand if it's not finished already) and the same button click will save the form with a unique file name (using last name, first name, date, and/or email address so that the identity of the person who filled out the form will be readily apparent to anyone who wants to grab the user's responses later). Is Acrobat capable of doing something like this? LiveCycle Designer maybe? And if we continue with the PDF form and add a submit button, is there a way to program the button click to print and to save?
Thank you in advance of any suggestions that might accomplish this task.I am not sure about the print, but it can probably be done -- possibly with a bit of JavaScript. As to the saving of the form, that is not reasonable at a kiosk. You would want the data submitted to a server (particularly with patient data), no e-mail or accessible drive. You can collect the data and put it in a database or import it to the form for printing yourself.
Maybe you are looking for
-
Word 2013 with text in front of a shape not converting to PDF with Acrobat XI
Hello, I have a Word 2013 document with Shapes (Insert > Shapes) in the background. Text is in front of the shape, shapes are set behind the text. I take the document to work where I have Win7, Word 2010 and Acrobat X Pro and it converts perfectly,
-
Cannot Append to Portfolio Not Created in Outlook
I am using Adobe Pro 9 and created portfolios of Lotus Note emails. Our organization has changed to Outlook and when I attempt to append new emails to the existing portfolios I get an error message "PDFMaker cannot append to the selected Adobe PDF ar
-
Setting date format for import
I have a CSV file that has approx. 600 entries in it. 2 of these fields are dates in the format mm/dd/yyy and mm/dd/yy. The problem is that the import function treats them as dd/mm/yyyy or dd/mm/yy. Is there any way to tell the import routine what
-
App store update not working! Fix?
Okay, I have a non-jailbroken iPod touch 4th generation with iOS 4.3.3. Today I was trying to update BATTLEFIELD: BAD COMPANY 2 to the latest version. I went on the updates tab of the AppStore, clicker battlefield and then tapped update. Nothing happ
-
Hi, is there anyway I can manually change the name of the song/artiste on my ipod?