How can I upload a pdf file into the application server?
Hi,
I have the otf data, which i have converted into pdf using the funcation module "Convert_otf". Is it possible to upload the pdf file in application server?
Dear Srishti,
Use OPEN DATASET in BINARY MODE.
following link will help you.
http://scn.sap.com/thread/1480434
thanks,
vidyasagar
Similar Messages
-
How can I embed a pdf file into the body of an email?
How can I embed a pdf file into the body of an email?
The problem is defining what it even means to “embed” a PDF file in the body of an e-mail, especially if you are dealing with a multiple page PDF file.
E-mail is either pure text, rich text (something akin to RTF in Word), or HTML. PDF is not compatible with any of these. Thus, to embed a PDF file, something has to be converted and that means the PDF would be converted to a less graphically rich raster format. But is that what you would really want?
I think that the MacOS and iOS e-mail clients do under some circumstances place an attached PDF file within HTML segments and by clicking on same, you get the equivalent of extracting the full PDF file, but I have no real experience with that.
Another alternative is HTML with a proxy image with a hyperlink to an external PDF file that is invoked when you click on the hyperlink.
Perhaps you can explain what you are really trying to accomplish and what the recipient of such an e-mail's actual experience would be?
- Dov -
How can you convert a PDF File into a picture format for uploading?
How can you convert a PDF File into a picture format for uploading?
If you have Acrobat 11, you'd select: File > Save As Other > Image
and select one of the available image formats. -
How can I convert a pdf file into a usable xcel file
how can I convert a pdf file into a xcel file. the pdf file file is layed out in colums, justified and separated in various types - i need to be able to set colum limits manualy, thanks for your input/
Without further information, I would suggest using either Acrobat or the Export PDF service.
-
How can I split a pdf file into smaller files using Acrobat XI
How can I split a pdf file into smaller files using Acrobat XI?
Hi laforcej
Open the PDF In Acrobat ...
Go to Tools -> Pages -> Extract
Now Select the Page Number you Want to Extract and Save them -
How can I import a pdf file into numbers so it will open with a click
How can I import a pdf file into a spreadsheet so that it will open with a click?
You can link to a webpage or an email in Numbers-- that's it.
The best way I found to do this is to enable websharing on your machine (see this article if you are running 10.8: http://lowendmac.com/crews/12lc/web-sharing-mountain-lion.html)
You can then place your pdf files in the folder /Users/<your user name>/Sites/<somefolder>
Then link to this using the url "<your machine name>.local/~<your user name>/<somefolder>/<pdf Name>
My machines name is "Proton" (you can get this from the System Preferences > Sharing pane)
My user name is "wayne"
so I stored a pdf file (DM00027543.pdf) in the folder "/User/wayne/Sites/PDFTest"
and stored the URL "http://proton.local/~wayne/PDFTest/DM00027543.pdf" in the "URL" field of the Hyperlink inspector -
Save PDF-file on the application server
Hello experts,
I convert my Smartform to a PDF-File. I copied the code from Suresh Kumar Parvathaneni (REPORT zsuresh_test). At first, thank you Suresh Kumar for that!
Now, I would like to save the PDF-File on the application server and not local.
Could you tell me how to do this. Especially, where do I have to put the abap-code in the given code from Suresh Kumar.
I thank you very much for your help in advance.
With kind regards.
gokselinHi,
You can use the OPEN DATASET statment.
Probably you must be having an output table which you are downloading to the local machine.You can use the same and loop at it. and if the OPEN dataset returned sy-subrc 0, use the TRANSFER statment.
Remember the data will be binary for pdf. So you have to open the dataset in binary mode.
regards,
Advait -
Hi all,
I am developing an application. in this app i have to implement RMI.
My problem is this, How can a client open a files from the server.
all the html, pdf files are stored in the server's directory like C:\audit\filename.
There is a folder on the server's C directory which contains all the html , pdf files.
please tell me how can a client open a file from the server using RMI.
Please send me the solution as soon as possible.
Thanks & Regards
BhavishyaThat's doing it the hard way. Why not use HTTP or FTP?
-
Regarding the uploading the pdf file to the application server
hi,
iam getting this error while uploading the pdf file to the applicatioin server.
"There was an error while trying to parse an image"
to convert smartform into PDF file we ll use convert_otf FM.
If see that FM data ll be stored in it_tline structure ok.
For sending to application server we ll use
OPEN DATASET p_arch for OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
LOOP AT it_tline.
TRANSFER it_tline to p_arch.
ENDLOOP.
CLOSE DATASET p_arch.
Ok
For getting data from internal table we ll use
OPEN DATASET p_arch FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS
do.
READ DATASET p_arch INTO it_tline.
if sy-subrc = 0.
APPEND it_tline.
ELSE .
exit.
endif.
enddo.
CLOSE DATASET p_arch.
LOOP AT it_tline.
TRANSLATE it_tline USING '~'.
CONCATENATE wa_buffer it_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 = 'COMMERCIAL INVOICE'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'COMMERCIAL INVOICE'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'COMMERCIAL INVOICE'.
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.
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 = 'COMMERCIAL INVOICE'.
i_objpack-obj_descr = 'COMMERCIAL INVOICE'.
APPEND i_objpack.
BREAK-POINT.
IF it_adr6[] IS NOT INITIAL.
LOOP AT it_adr6 INTO wa_adr6.
CLEAR i_reclist.
i_reclist-receiver = wa_adr6-smtp_addr.
i_reclist-rec_type = 'U'.
i_reclist-com_type = 'INT'.
APPEND i_reclist.
ENDLOOP.
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.
ENDIF.
The above error I am getting.
Please give your suggestions
Thanks in advanceU can use this code
Reward if useful
REPORT ZMN_PDF_UPLOAD.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\testpdf',
length like sy-tabix,
lengthn like sy-tabix.
call function 'GUI_UPLOAD'
exporting
filename = 'c:\temp\test.pdf'
filetype = 'BIN'
importing
filelength = length
tables
data_tab = itab.
open dataset dsn for output in binary mode.
loop at itab.
transfer itab-field to dsn.
endloop.
close dataset dsn.
clear itab.
refresh itab.
*To crosscheck if it went well
open dataset dsn for input in binary mode.
do.
read dataset dsn into itab-field.
if sy-subrc = 0.
append itab.
else.
exit.
endif.
enddo.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:\temp\testn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
*Or
*Use the TCode
*CG3Z or CG3Y
*for downloading to Application Server. -
Upload tab-delimited file from the application server to an internal table
Hello SAPients.
I'm using OPEN DATASET..., READ DATASET..., CLOSE DATASET to upload a file from the application server (SunOS). I'm working with SAP 4.6C. I'm trying to upload a tab-delimited file to an internal table but when I try load it the fields are not correctly separated, in fact, they are all misplaced and the table shows '#' where supposedly there was a tab.
I tried to SPLIT the line using as separator a variable with reference to CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB but for some reason that class doesn't exist in my system.
Do you know what I'm doing wrong? or Do you know a better method to upload a tab-delimited file into an internal table?
Thank you in advance for your help.Try:
REPORT ztest MESSAGE-ID 00.
PARAMETER: p_file LIKE rlgrap-filename OBLIGATORY.
DATA: BEGIN OF data_tab OCCURS 0,
data(4096),
END OF data_tab.
DATA: BEGIN OF vendor_file_x OCCURS 0.
* LFA1 Data
DATA: mandt LIKE bgr00-mandt,
lifnr LIKE blf00-lifnr,
anred LIKE blfa1-anred,
bahns LIKE blfa1-bahns,
bbbnr LIKE blfa1-bbbnr,
bbsnr LIKE blfa1-bbsnr,
begru LIKE blfa1-begru,
brsch LIKE blfa1-brsch,
bubkz LIKE blfa1-bubkz,
datlt LIKE blfa1-datlt,
dtams LIKE blfa1-dtams,
dtaws LIKE blfa1-dtaws,
erdat LIKE lfa1-erdat,
ernam LIKE lfa1-ernam,
esrnr LIKE blfa1-esrnr,
konzs LIKE blfa1-konzs,
ktokk LIKE lfa1-ktokk,
kunnr LIKE blfa1-kunnr,
land1 LIKE blfa1-land1,
lnrza LIKE blfa1-lnrza,
loevm LIKE blfa1-loevm,
name1 LIKE blfa1-name1,
name2 LIKE blfa1-name2,
name3 LIKE blfa1-name3,
name4 LIKE blfa1-name4,
ort01 LIKE blfa1-ort01,
ort02 LIKE blfa1-ort02,
pfach LIKE blfa1-pfach,
pstl2 LIKE blfa1-pstl2,
pstlz LIKE blfa1-pstlz,
regio LIKE blfa1-regio,
sortl LIKE blfa1-sortl,
sperr LIKE blfa1-sperr,
sperm LIKE blfa1-sperm,
spras LIKE blfa1-spras,
stcd1 LIKE blfa1-stcd1,
stcd2 LIKE blfa1-stcd2,
stkza LIKE blfa1-stkza,
stkzu LIKE blfa1-stkzu,
stras LIKE blfa1-stras,
telbx LIKE blfa1-telbx,
telf1 LIKE blfa1-telf1,
telf2 LIKE blfa1-telf2,
telfx LIKE blfa1-telfx,
teltx LIKE blfa1-teltx,
telx1 LIKE blfa1-telx1,
xcpdk LIKE lfa1-xcpdk,
xzemp LIKE blfa1-xzemp,
vbund LIKE blfa1-vbund,
fiskn LIKE blfa1-fiskn,
stceg LIKE blfa1-stceg,
stkzn LIKE blfa1-stkzn,
sperq LIKE blfa1-sperq,
adrnr LIKE lfa1-adrnr,
mcod1 LIKE lfa1-mcod1,
mcod2 LIKE lfa1-mcod2,
mcod3 LIKE lfa1-mcod3,
gbort LIKE blfa1-gbort,
gbdat LIKE blfa1-gbdat,
sexkz LIKE blfa1-sexkz,
kraus LIKE blfa1-kraus,
revdb LIKE blfa1-revdb,
qssys LIKE blfa1-qssys,
ktock LIKE blfa1-ktock,
pfort LIKE blfa1-pfort,
werks LIKE blfa1-werks,
ltsna LIKE blfa1-ltsna,
werkr LIKE blfa1-werkr,
plkal LIKE lfa1-plkal,
duefl LIKE lfa1-duefl,
txjcd LIKE blfa1-txjcd,
sperz LIKE lfa1-sperz,
scacd LIKE blfa1-scacd,
sfrgr LIKE blfa1-sfrgr,
lzone LIKE blfa1-lzone,
xlfza LIKE lfa1-xlfza,
dlgrp LIKE blfa1-dlgrp,
fityp LIKE blfa1-fityp,
stcdt LIKE blfa1-stcdt,
regss LIKE blfa1-regss,
actss LIKE blfa1-actss,
stcd3 LIKE blfa1-stcd3,
stcd4 LIKE blfa1-stcd4,
ipisp LIKE blfa1-ipisp,
taxbs LIKE blfa1-taxbs,
profs LIKE blfa1-profs,
stgdl LIKE blfa1-stgdl,
emnfr LIKE blfa1-emnfr,
lfurl LIKE blfa1-lfurl,
j_1kfrepre LIKE blfa1-j_1kfrepre,
j_1kftbus LIKE blfa1-j_1kftbus,
j_1kftind LIKE blfa1-j_1kftind,
confs LIKE lfa1-confs,
updat LIKE lfa1-updat,
uptim LIKE lfa1-uptim,
nodel LIKE blfa1-nodel.
DATA: END OF vendor_file_x.
FIELD-SYMBOLS: <field>,
<field_1>.
DATA: delim TYPE x VALUE '09'.
DATA: fld_chk(4096),
last_char,
quote_1 TYPE i,
quote_2 TYPE i,
fld_lth TYPE i,
columns TYPE i,
field_end TYPE i,
outp_rec TYPE i,
extras(3) TYPE c VALUE '.,"',
mixed_no(14) TYPE c VALUE '1234567890-.,"'.
OPEN DATASET p_file FOR INPUT.
DO.
READ DATASET p_file INTO data_tab-data.
IF sy-subrc = 0.
APPEND data_tab.
ELSE.
EXIT.
ENDIF.
ENDDO.
* count columns in output structure
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
columns = sy-index.
ENDDO.
* Assign elements of input file to internal table
CLEAR vendor_file_x.
IF columns > 0.
LOOP AT data_tab.
DO columns TIMES.
ASSIGN space TO <field>.
ASSIGN space TO <field_1>.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
SEARCH data_tab-data FOR delim.
IF sy-fdpos > 0.
field_end = sy-fdpos + 1.
ASSIGN data_tab-data(sy-fdpos) TO <field_1>.
* Check that numeric fields don't contain any embedded " or ,
IF <field_1> CO mixed_no AND
<field_1> CA extras.
TRANSLATE <field_1> USING '" , '.
CONDENSE <field_1> NO-GAPS.
ENDIF.
* If first and last characters are '"', remove both.
fld_chk = <field_1>.
IF NOT fld_chk IS INITIAL.
fld_lth = strlen( fld_chk ) - 1.
MOVE fld_chk+fld_lth(1) TO last_char.
IF fld_chk(1) = '"' AND
last_char = '"'.
MOVE space TO fld_chk+fld_lth(1).
SHIFT fld_chk.
MOVE fld_chk TO <field_1>.
ENDIF. " for if fld_chk(1)=" & last_char="
ENDIF. " for if not fld_chk is initial
* Replace "" with "
DO.
IF fld_chk CS '""'.
quote_1 = sy-fdpos.
quote_2 = sy-fdpos + 1.
MOVE fld_chk+quote_2 TO fld_chk+quote_1.
ELSE.
MOVE fld_chk TO <field_1>.
EXIT.
ENDIF.
ENDDO.
<field> = <field_1>.
ELSE.
field_end = 1.
ENDIF.
SHIFT data_tab-data LEFT BY field_end PLACES.
ENDDO.
APPEND vendor_file_x.
CLEAR vendor_file_x.
ENDLOOP.
ENDIF.
CLEAR data_tab.
REFRESH data_tab.
FREE data_tab.
Rob -
How can I change a PDF file into a Word Document
Regretfully, I am Disabled and unable to watch a Tutorial video online. So, I must use this venue to ask a simply question...Is there a way to make a PDF file into a Word Document? OR, how can I type info into a PDF file? Either answer would help me IMMENSELY!
Thanks for your time and consideration.Using your Adobe ID, I believe you have one free trial on ExportPDF.
Also, Acrobat is available as a fully functional 30-day trial. -
How can I load a pdf-file into a byte[]?
Hello,
I would like to load a PDF-File into a byte-Array. How can I do this? The standard Streams shouldn't work because this can't be converted into characters. Can it? So, what does work?
Any idea?
Bye,
WolfangWhy would someone not do:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
InputStream is = new FileInputStream("foo.pdf");
byte[] buf = new byte[4096];
for(int len=-1;(len=is.read(buf))!=-1;)
baos.write(buf,0,len);
is.close();
baos.flush();
baos.close();
buf = baos.toByteArray(); // Here are you bytes!You don't need to know the exact size, let ByteArrayOutputStream do it for you. Streams are generally for bytes, Readers/Writers generally for characters. Why exactly did you say: ``The standard Streams shouldn't work because this can't be converted into characters?'' -
I know I've REALLY struggled with this before. I just don't understand why this has to be soooooo difficult.
I can very easily do a straight Data Pump of a .xlsX File into a SQL Server Table using a normal Excel Connection and a normal Excel Source...simply converting Unicode to DT_STR and then using an OLE DB Destination of the SQL Server Table.
If I want to make the SSIS Package a little more flexible by allowing multiple .xlsX spreadsheets to be pumped in by using a Foreach Loop Container, the whole SSIS Package seems to go to hell in a hand basket. I simply do the following...
Put the Data Flow Task within the Foreach Loop Container
Add the Variable Mapping Variable User::FilePath that I defined as a Variable and a string within the FOreach Loop Container
I change the Excel Connection and its Expression to be ExcelFilePath ==> @[User::FilePath]
I then try and change the Excel Source and its Data Access Mode to Table Name or view name variable and provide the Variable Name User::FilePath
And that's when I run into trouble...
Exception from HRESULT: 0xC02020E8
Error at Data Flow Task [Excel Source [56]]:SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured. Error code: 0x80004005.
Error at Data Flow Task [Excel Source [56]]: Opening a rowset for "...(the EXACT Path and .xlsx File Name)...". Check that the object exists in the database. (And I know it's there!!!)
I don't understand by adding a Foreach Loop Container to try and make this as efficient as possible has caused such an error unless I'm overlooking something. I have even tried delaying my validations and that doesn't seem to help.
I have looked hard in Google and even YouTube to try and find a solution for this but for the life of me I cannot seem to find anything on pumping a .xlsX file into SQL Server using a Foreach Loop Container.
Can ANYONE please help me out here? I'm at the end of my rope trying to get this to work. I think the last time I was in this quandry, trying to pump a .xlsX File into a SQL Server Table using a Foreach Loop Container in SSIS, I actually wrote a C# Script
to write the contents of the .xlsX File into a .csv File and then Actually used the .csv File to pump the data into a SQL Server Table.
Thanks for your review and am hoping and praying for a reply and solution.Hi ITBobbyP,
If I understand correctly, you want to load data from multiple sheets in an .xlsx file into a SQL Server table.
If in this scenario, please refer to the following tips:
The Foreach Loop container should be configured as shown below:
Enumerator: Foreach ADO.NET Schema Rowset Enumerator
Connection String: The OLE DB Connection String for the excel file.
Schema: Tables.
In the Variable Mapping, map the variable to Sheet_Name, and change the Index from 0 to 2.
The connection string for Excel Connection Manager is the original one, we needn’t make any change.
Change Table Name or View name to the variable Sheet_Name.
If you want to load data from multiple sheets in multiple .xlsx files into a SQL Server table, please refer to following thread:
http://stackoverflow.com/questions/7411741/how-to-loop-through-excel-files-and-load-them-into-a-database-using-ssis-package
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How can I make a pdf-file of the front panel?
I like to make a pdf-file of the front panel. Thus I need a vi, where I can input the printer name (as the pdf-printer is not the default one), the vi and the name of the future pdf-file.
Thanks, VerenaTry this and if you were to search the forum with "pdf" as the search parameter, you'd find several postings on the same subject. One of them is here and another is here with some email addresses of individuals with existing toolkits.
-
How can I upload a pdf file?
I am trying to set up an informational business site in which folks can hit a hyperlink and it automatically downloads a pdf, page or word file onto their screen. I want to have a page that is referencing several papers with brief descriptions of each and hyperlinked to these papers on my ??idisk?? account. Am I thinking in the correct direction and if so-how do I do it?
Thanks a big bunch in advance.
Dann
Power book Mac OS X (10.4.8)There are two ways to do this:
1) in the link tap of the Inspector, choose "file" as the link type; iWeb will ask you to find the file. When you publish the page, iWeb will copy the file to an appropriate location on you iDisk, and the link will take folks to that copy.
2) Place the files in your "Public" file of your iDisk; in iWeb, use "external page" as the link type, and enter the url for these files. (You'll have to look in Apple's knowledge base for the right url for your Public folder. I don't remember it at the moment). Make sure that your Public folder settings allow for others to access documents there.
I've usually used the second option, as that means I can edit the files in question later. (Maybe that's possible with the first option, but I wasn't sure how)
Maybe you are looking for
-
SCCM 2012 R2: does the sccm server itself need a sccm 2012 client?
Hi, The question is simple. Reason, I update my SCCM 2012 R2 forefront clients via automatic update rule. The server itself has also the forefront/SCEP client but no sccm client. So I wonder if in general it 's a good idea to install the sccm 2012 cl
-
Share an ASM disk group among multiple nodes
According to Oracle documentation: *"To share an ASM disk group among multiple nodes, you must install Oracle Cluster ware on all of the nodes, regardless of whether you install Oracle RAC on the nodes".* And if I understand it right to share the sam
-
Shadow Effect Not Publishing in Slideshow
I have set a shadow effect on the Hero image box that does show in the design mode of MUSE. But when I preview it in MUSE, preview it in the browser and when it is published, the drop shadow is gone. Any suggestions?
-
Synch pictures from Mac to iPhone
Can anybody help. I have just synched the photos from iPhoto to my iPhone. It worked great in that I now have a copy of my various "albums" the same as iPhoto but the iPhone also has another album called "Photo Library" with another copy of all the p
-
Combining multiple deliveries in to single invoice in exports
Dear All, While combining multiple deliveries in to single invoice in exports process, the invoce is getting split due to different header data.how to over come from this problem because this is client requirement. Split due to different header data