Smartforms to file .PDF and download in Background
Hi
Actually i´m converting a smartforms in PDF file and doing a download in line , but i need to do the same in background.
How can i do it??
Regards
Gregory
*& Report ZSMARTFORM_SPOOL_G
REPORT zsmartform_spool_g.
*************Types Declaration ****************************
TYPES : BEGIN OF gty_tab, " Spool Requests
rqident TYPE tsp01-rqident, " Spool request number
rqdoctype TYPE tsp01-rqdoctype, " Spool: document type
rqo1name TYPE tsp01-rqo1name, " TemSe object name
END OF gty_tab.
*********Work Area ****************************************
DATA: form_name TYPE rs38l_fnam, " Used to get the function module of Smartform
wa_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer (transfer) options
gs_tab TYPE gty_tab. " Spool Requests
*******Internal Table Declarations ************************
DATA: gt_tab TYPE STANDARD TABLE OF gty_tab, " Spool Requests
gt_pdf TYPE STANDARD TABLE OF tline, " SAPscript: Text Lines
gt_spoolid TYPE tsfspoolid, " Table with Spool IDs
gt_otfdata TYPE ssfcrescl. " Smart Forms: Return value at end of form prnt
*********Variable Declarations ****************************
DATA: gv_bytecount TYPE i, "#EC NEEDED " PDF Byte Count
gv_file_name TYPE string, " File name
gv_file_path TYPE string, " File Path
gv_full_path TYPE string, " Path
gv_binfilesize TYPE i, " Bin File size
gv_rqident TYPE tsp01-rqident, " Spool request number
gv_name TYPE tst01-dname, " TemSe object name
gv_objtype TYPE rststype-type, " TemSe: Object type name
gv_type TYPE rststype-type. " TemSe: Object type name
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPDF_G'
IMPORTING
fm_name = 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.
*Get Spool IDs
wa_outopt-tdnewid = 'X'.
wa_outopt-tddest = 'LP01'.
CALL FUNCTION form_name
EXPORTING
output_options = wa_outopt
user_settings = 'X'
IMPORTING
job_output_info = gt_otfdata
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.
*Assign the spool id
gt_spoolid = gt_otfdata-spoolids.
Generate spool and pdf for the output of the form
PERFORM sub_generate_spool_pdf.
END-OF-SELECTION.
*& Form sub_generate_spool_pdf
Generate Spool and PDF output
FORM sub_generate_spool_pdf .
DATA: ls_spoolid LIKE LINE OF gt_spoolid.
*----Get the Spool Number
CLEAR ls_spoolid.
READ TABLE gt_spoolid INTO ls_spoolid INDEX 1.
IF sy-subrc = 0.
gv_rqident = ls_spoolid.
ENDIF.
CLEAR gt_tab.
SELECT rqident rqdoctype rqo1name INTO TABLE gt_tab
FROM tsp01 WHERE rqident = gv_rqident.
IF sy-subrc = 0.
CLEAR gs_tab.
Get the TemSe: Object name into variable gv_name
READ TABLE gt_tab INTO gs_tab INDEX 1.
IF sy-subrc = 0.
gv_name = gs_tab-rqo1name.
ENDIF.
ENDIF.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = sy-mandt
name = gv_name
part = 1
IMPORTING
type = gv_type
objtype = gv_objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 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.
Check if temse object name type is 'OTF' or 'LIST'
IF gv_objtype(3) = 'OTF'.
PERFORM get_otf_spool_in_pdf.
ELSE.
PERFORM get_abap_spool_in_pdf.
ENDIF.
Generate F4 functionality from spool to pdf
PERFORM write_pdf_spool_to_pc.
ENDFORM. " sub_generate_spool_pdf
*& Form get_abap_spool_in_pdf
Generate the Spool number
FORM get_abap_spool_in_pdf .
REFRESH gt_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gv_rqident
IMPORTING
pdf_bytecount = gv_bytecount
TABLES
pdf = gt_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
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.
ENDFORM. " get_abap_spool_in_pdf
*& Form get_otf_spool_in_pdf
Generate OTF data from the Spool Number
FORM get_otf_spool_in_pdf .
REFRESH gt_pdf.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gv_rqident
IMPORTING
pdf_bytecount = gv_bytecount
TABLES
pdf = gt_pdf
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
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. " get_otf_spool_in_pdf
*& Form write_pdf_spool_to_pc
Generate PDF format
FORM write_pdf_spool_to_pc .
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = gv_file_name
path = gv_file_path
fullpath = gv_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.
----DOWNLOADING THE PDF DATA***
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = gv_binfilesize
filename = gv_full_path
filetype = 'BIN'
TABLES
data_tab = gt_pdf
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.
ENDFORM. " write_pdf_spool_to_pc
Rewards if useful..............
Minal
Similar Messages
-
File Upload and Download in Oracle iAS PL/SQL Gateway
i'm using the example 113471.1 to "File Upload and Download in
Oracle iAS PL/SQL Gateway"
when i press the submit button after i select a file to upload
i get the next message in the browser "No se puede mostrar la
pagina" HTTP 404 file not found.
I think the problem is in ctnsample.upload_form in the line
htp.formOpen(curl => 'cntsample.upload', cmethod => 'POST',
cenctype => 'multipart/form-data');
The ctnsample.remove work fine.
Could you,help me...There is a document in the Oracle 9iAS 1.0.2.2 Library titled "Using the PL-SQL Gateway" Part Number A90099-01.pdf that explains file upload and download through modplsql. In particular there is a section there titled "Direct BLOB Download" which explains how one can easily download a blob utilising the wpg_docload package.
I am still concerned that there exist duplicate copies of my blob content. One copy in the wwdoc_document$ table, and one in my custom table.
Dmitry/Oracle can you confirm this? -
File upload and download through web Dynpro2.0.9.
Hai All,
File upload and download through web Dynpro "IWDResource" package is used.But in web Dynpro 2.0.9. this package is not possible.How to uplolad and download files through web Dynpro2.0.9.
Anyone can help me?
Thanks in Advance,
Kindly Regards,
K.Saravanan.Hi Saravanan,
You can go through these links,
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/63/9c0e41a346ef6fe10000000a1550b0/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/63/9c0e41a346ef6fe10000000a1550b0/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/5a/90ff4cd0c8cd48a69b836e5e550880/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/5a/90ff4cd0c8cd48a69b836e5e550880/frameset.htm</a>
So, apart from putting FileUpload UI on your view, you have to implement a method which will do the actual uplod for you.
Hope this helps.
Regards,
Mausam -
How to solve Fusion ADF file upload and download?
Now we are building web application with Fusion ADF (JDeveloper 11.1.2.0.0). We want to downloading and uploading from tables.Is there any special tool in Fusion ADF or should I going with traditional java coding. Thanks
Actually ADF Provide Components for file upload and download
Download :
<af:fileDownloadActionListener/>
See tagDoc: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_fileDownloadActionListener.html
Upload
<af:inputFile/>
See tagDoc: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_inputFile.html
Edited by: -CHS on Jul 6, 2011 9:52 AM -
Using CSA to filter MSN Messenger file upload and download
How would i go about filtering out the file upload and download functionality in messenger ?
I've already disallowed the possibility of uploading or saving from Messenger by not allowing the program the read or write files. But when a PC without this policy on it uploads to a CSA protected host. The CSA will download the entire file but then refuse to save the file.
I'd rather disallow this functionality alltogether ? my guess are that i would hae to do some COM filtering ?
I'd be greatfull for any hints you might have.
Best Regards,
LasseThe document Blocking Peer-to-Peer File Sharing Programs with the PIX Firewall has more information on blocking file sharing applications.
http://www.cisco.com/en/US/tech/tk583/tk372/technologies_tech_note09186a00801e419a.shtml -
Please help me on file upload and download
Dear all..
i am new in this i try to apply the tutorial for file upload and download but it is old i work on net weaver 7.1 and many proery has change and i cant applyb this tutorial...Thanks. If you can provide some more details about where - some application, or a web page - are you trying to upload or download a file we can discover to documentation you need. Also, it will be of help if you tell what is the name of the outdated guide you mentioned.
Best regards,
Rossen -
Hi all,
I am going to build a form and run on the web. I am going to do a form which intend to do the file upload and download (any type of file). How can I achieve it?
Also, once I put it on the web, I would like to do a 'web-like' function: when the user click on the file name, it can open it with the association with the browser (For instance, when I click on the *.doc file, it opens the word automatically). Is it poosible to do so and how to do so? Thanks first.
PatrickGo to Utilities>more Utilities>upload/download is there.
Amresh. -
Tracking file upload and download details
Hi All,
We are using TMG in our place,all users/servers are used to connect the internet with TMG server..
is there a way to track the information of file upload and download details in TMG..
KJSUBBUHi,
Please check the blog below. I haven't try it.
Live monitor for TMG server
Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee
the accuracy of this third-party contact information.
Best Regards,
Joyce
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
File upload and download through web Dynpro2.0.9. with Java
Hai All,
I am working in web Dynpro2.0.9 with Java.For file upload and download "IWDResource" is used.But this package is not available in web Dynpro2.0.9.How to download and upload files through using this version?
Anyone can help me?
Thanks in Advance,
Kindly Regards,
S.V.Selva Bala.Hai Noufal,
I successfully upload the files to the database.
For file download i create two views.
In the first view files are fetched from the database(datatype for the file is image in the database)and it is converted to byte from image.Afterthat the byte is converted to string by using the following code.
byte source[]=new byte[1024];
if(rs.next()){
source=rs.getBytes("cv_document_file");
String sourcestr=source.toString();
wdContext.currentContextElement().setDownloadfile(sourcestr);
Now i put the converted string into the second view.In the second view i try to convert the string value into bytes by using the following codes.
String sourcestr=wdContext.currentContextElement().getDownloadfile();
byte bs[]=new byte[1024];
bs=sourcestr.getBytes();
wdContext.currentDownloadElement().setDownloadfile(bs);
But it doesn't work and no error.
Now i am expecting the valuable suggestions from you.
Thanks in Advance,
Kind Regards,
S.V.Selva Bala. -
Where are the buttons gone File upload and Download in New ABAP Editor
Where are the buttons gone of File upload and Download in New ABAP Editor in ECC 6.0.
Or some new utility added for this feature.
Kindly guide.
Thanks,
pradeepGo to Utilities>more Utilities>upload/download is there.
Amresh. -
How to archive smartform output as PDF and store in External server
Hi,
I have requirement on archiving smartform output.
1.need to archive smartform output as PDF and need to store the PDF in FileNet server.
2.These iPDF need to link to SAP transaction FEBA_LOCKBOX at service for object level.
I know that it can possible through SAP ArchiveLink feature , also aware that i have to enable Archive and Archive print button in the smartform output.
If any body can give me some solutions it will be a great help.
Regards,
Ratheesh BSHi,
DATA: T_SSFCTRLOP TYPE SSFCTRLOP. "FOR SMART FORMS
DATA: T_SSFCRESCL TYPE SSFCRESCL.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Smart Form Name'
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.
T_SSFCTRLOP-NO_DIALOG = 'X'.
T_SSFCTRLOP-GETOTF = 'X'.
T_SSFCTRLOP-LANGU = 'E'.
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = T_SSFCTRLOP
IMPORTING
JOB_OUTPUT_INFO = T_SSFCRESCL
TABLES
G_T_PERNR = G_T_PERNR. "(Internal Table).
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 'HR_EFI_SHOW_PDF_FORM'
EXPORTING
TOP_EDGE = 10
LEFT_EDGE = 15
TABLES
OTF_TABLE = T_SSFCRESCL-OTFDATA. -
Smartform (otf) as pdf and sending as email-attachment
Hello everybody,
when trying to convert a smartform to pdf and sending it with the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' i get an error when opening the pdf-file. It says ' a non identified Token w62.10 was found' and the pdf is all empty.
The problem seems to be somewhere between getting the pdf output data from the FM 'convert_otf' and trying to create a bin-object for the attachment.
Here is the code:
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
* max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
* Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
* Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
******* Create Message Body
**** Title and Description
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
* wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt ).
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
**** Attachment
* (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
* Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = ( v_lines_bin - 1 ) * 255 + strlen( i_objbin ).
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = receiver.
i_reclist-rec_type = RECEIVER_TYPE.
append i_reclist.
if not receiver is initial.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.Hi,
I just observed the following.
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132 IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
I just tried with your coding and then changed to the below coding.Now I am able to open the PDF in mail.
* Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
* Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
* Work Area declarations
wa_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,"To convert from 132 to 255
* Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZZZ_TEST1'
importing
fm_name = v_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.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
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.
i_otf[] = w_return-otfdata[].
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
* Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
* Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
******* Create Message Body
**** Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text
* wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
**** Attachment
* (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
* Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
If your problem is solved,kindly close the thread and reward points.If you need clarifications,get back. -
Two issues with firefox (pdf and downloads)
Hi,
two points bother me since a long time:
1. Reading pdf: In most cases I'm unable to read pdf-files in the browser. When I click on a link to a pdf a new tab opens and firefox loads. After some seconds the statusbar says finished (? in German it's fertig) but the window stays empty. Switching thorugh the tabs and back to the pdf results in not seeing anything but the last active tab.
I already went to the preferneces and changed the pdf viewer for "\application\pdf" from acroread to evince but this didn't solve the problem.
I'm on x86_64 so I have installed lib32-acroread from AUR. Currently I have to save the pdf and because of issue #2 I have can't open it directly and some for some pdf in the web this isn't possible.
2. Downloads: Both, double click on the downloaded file and chosing "open containig folder" don't do anything. I tried the suggested sulution here but with no success: http://rubylution.ping.de/articles/2007 … nder-linux
Thanks in advance
Barghest.
P.S.: My WM: awesomeUnfortunately there is no "save as.." in their online service.
These instructions may give back the right-click "Save Page as..." menu.
From Preferences select the Content tab and have the Enable Javascript button checked (true). Then click on the button labeled "Advanced..." From the next box that opens, uncheck "Disable or replace context menus."
I run with all the boxes unchecked and have "Open new windows in a new tab instead" set, so I almost always have the full Firefox menus available. There are a few web pages that still defeat this setup partially -- some images won't save. -
Printing large pdf and download to power point error message
Dear experts,
We ran into the issue that we get an error message when printing to pdf or download to power point, the report is very big.
Error message:
A fatal error occurred while processing the request. The server responded with: Error while executing PDFRpcCall.processMessage com.siebel.analytics.utils.InputStreamWithLimit$ReadOverTheLimitException at com.siebel.analytics.utils.InputStreamWithLimit.incTotalBytes(InputStreamWithLimit.java:58) at ...............
On the internet, i thougt i found a solution and set this
<JavaHost>
<PDF>
<InputStreamLimitInKB>0</InputStreamLimitInKB>
</PDF>
</JavaHost>
in the instanceconfig.xml and restarted bi server, java host server and presentation server. Unfortunately, nothing helped; error still exists, cannot download to ppt or print to pdf.
Any help is really appreaciated, many thanks in advance.
regards,
ThomasHi,
Go through reply in this...Will solve your issue...http://software.itags.org/enterprise-application/62968/
In C:\OracleBI\web\javahost\config\config.xml
{<PDF>
<!-- Size limit for PDF request message -->
<InputStreamLimitInKB>0</InputStreamLimitInKB>
<!-- Path to PDF userconfig.xml file. -->
<!-- <UserConfigFile/> -->
</PDF>
<XMLP>
<InputStreamLimitInKB>0</InputStreamLimitInKB>
</XMLP>}
By default they are 2048 and 8192 change them to 0
Restart BI Server and Java host server.
Regards,
Srikanth
Edited by: Srikanth Mandadi on Oct 29, 2010 2:08 AM -
Apex application file -upload and download a file.
hi
im having an issue with an application i created,its about uploading and downloading a file in application.the application is working and was able to upload and download a file but i have not idea there the file is stored in the application database,try to search for the file,its something dealing with the apex_application_file and i cant find it.
Any idea where the file is stored?
thnx
niveshDear nivesh!
If you upload a file into an APEX application the file is temporarily stored in the APEX_APPLICATION_FILES table. If you close your current application page the APEX_APPLICATION_FILES table will be cleared. You should create your own table to store files in a BLOB column. I've create an example for uploading images into an APEX application on apex.oracle.com. If you want to have a look at it please use the following credentials:
Workspace: flo_demo
Username: dev_null
Password: password
Application: 61811
Yours sincerely
Florian W.
Maybe you are looking for
-
Hi guys, I have built a Query on a Multiprovider which is based on a Remote Cube and Basic Cube. I can see Data for my filters via ListCube in both Multi Provider and Remote Cube. The Query is showing Data when Restrict to Value Range [First Value,
-
Access MySite Document Library of User Who has shared a document.
Hi Team, I am just confused as we are facing the issue from past two days, We have SharePoint 2013 on premise and are using Mysite Application. Suppose there are two users A and B. If A share a document from his personal document folder to B. B recie
-
Passing a variable from a non DB block to a DB block
Im getting the error FRM-41003 when I try to pass a variable from a search screen i created to a results screen which is tied to a DB block. Ive searched this error and nothing seemed to match exactly what Im dealing with. Is it possible to do this?
-
Partial update occassionally hangs during wget - admin-op-update
Since we upgraded our ITL and MDEX Windows servers to 2008 R2 Enterprise, once in a while our Partial updates will hang during the wget admin-op-update process. When this happens, the lock is not released and the next Partial update fails to start be
-
Call to Arms for the dreaded U052 Wrong Printhead Error
This is a "call to arms" for all of you Canon customers who have had this problem and have had their printers disabled because of it. Please respond with the model of your printer and if you were able to fix it, what you did to fix it. We need to p