How to upload a PDF file and convert it to OTF format
We have come across rquirements like converting OTF to PDF but my requirement is to read a PDF file in SAP and convert it to OTF format for printing.
Can anyone please help me with the Function Modules to do so.
Hello,
Try the following FM:
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
Hope this helps.
Reward if helpful.
Regards,
Vasanth
Similar Messages
-
How to upload a pdf file and download/open it
hi experts,
i want to upload a pdf or word format files to server and let user download or open it when user click a button, how to do that, can you post some sample codes, hunger for your advices and thanks a lot !!Hi,
We have 3 types of uploads n downloads Function Modules.in ABAP.
1. UPLOAD
2.WS_UPLOAD
3.GUI_UPLOAD
1.DOWNLOAD
2.WS_DOWNLOAD
3.GUI_DOWNLOAD
Now we r making use of only GUI_UPLOAD n GUI_DOWNLOAD in our programs.
You can go through this code which will go u an idea about the GUI_Upload n gui_download. This may lead u to understand there function modules in more detail.
REPORT zjavacreate message-id zmsgnew.
************************Creation of Internal table******************
DATA: BEGIN OF ti_record OCCURS 200,
Line(250),
END OF ti_record.
DATA: BEGIN OF ti_rec OCCURS 200,
Line(250),
END OF ti_rec.
*****************************Selection screen************************
selection-screen begin of block b1 with frame .
Parameters create radiobutton group g1.
PARAMETERS: JavaName(30) lower case.
parameters modify radiobutton group g1.
selection-screen end of block b1.
******************Calling the java program creation page**************
at selection-screen.
if CREATE = 'X'.
if javaname is not initial.
refresh ti_record[].
concatenate 'public class' javaname into ti_record-line separated by space.
concatenate ti_record-line '{' into ti_record-line separated by space.
Append ti_record.
ti_record-line = 'public static void main(String []args){'.
Append ti_record.
ti_record-line ='//enter ur code here'.
append ti_record.
ti_record-line ='}'.
Append ti_record.
ti_record-line ='}'.
Append ti_record.
EDITOR-CALL FOR ti_record .
else.
Message e001.
endif.
**************************Saving the java program********************
data tfile type string.
concatenate 'D:\Programs\' javaname '.java' into tfile.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = tfile
FILETYPE = 'ASC'
TABLES
DATA_TAB = ti_record.
endif.
data new(15).
if MODIFY = 'X'.
new = 'ZJAVAMODIFY1'.
CALL TRANSACTION NEW.
endif.
ZJAVAMODIFY:
REPORT zjavamodify.
**********************selection screen.********************
selection-screen begin of block b1 with frame .
Parameters compile radiobutton group g1.
Parameters modify radiobutton group g1.
Parameters execute radiobutton group g1.
PARAMETER : FILE(100) lower case.
selection-screen end of block b1.
DATA: BEGIN OF TI_RECORD OCCURS 1,
LINE(200),
END OF TI_RECORD.
data: st1(30),st2(30).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = '.'
MASK = ' '
MODE = ' '
TITLE = ' '
IMPORTING
FILENAME = FILE
RC =
End-of-selection.
****************************MODIFY********************************
if modify = 'X'.
data: TXT_FILE1 TYPE STRING .
txt_file1 = file.
**************FM GUI_UPLOAD
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = txt_file1
TABLES
DATA_TAB = ti_recORD[].
**********End FM GUI_UPLOAD
EDITOR-CALL FOR ti_record .
**************FM GUI_UPLOAD
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = txt_file1
FILETYPE = 'ASC'
TABLES
DATA_TAB = ti_record.
**********End FM GUI_UPLOAD
endif.
*******************end of modify*******************
*******************BAT file for compilation n
execution.****************
if compile = 'X'.
DATA: begin of itab_bat_create occurs 0,
row(500) type c,
end of itab_bat_create.
data:comp_join1(250).
concatenate 'java' 'jCompiler' file into comp_join1
separated
by space.
itab_bat_create-row = 'c:'.
append itab_bat_create.
itab_bat_create-row = 'cd Documents and Settings\127740'.
append itab_bat_create.
itab_bat_create-row = comp_join1.
append itab_bat_create.
********FM GUI_DOWNLOAD
data: st type string.
st = 'C:\Documents and Settings\127740\compile_java.bat'.
call function 'GUI_DOWNLOAD'
EXPORTING
filename = st
filetype = 'ASC'
TABLES
data_tab = itab_bat_create[]
EXCEPTIONS
file_open_error = 1
file_write_error = 2
others = 3.
********end FM GUI_DOWNLOAD
*****FM dvsvas_doc_ws_execute_50
CALL FUNCTION 'DSVAS_DOC_WS_EXECUTE_50'
EXPORTING
PROGRAM = 'C:\Documents and Settings\127740\compile_java.bat'.
*****end FM dvsvas_doc_ws_execute_50
endif.
***********************end of compile*******************************
output***********************
if execute = 'X'.
data: TXT_FILE3 TYPE STRING .
split File AT '.java' into: st1 st2 .
concatenate st1 'error.txt' into TXT_FILE3.
**************FM GUI_UPLOAD
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = txt_file3
TABLES
DATA_TAB = ti_recORD[].
**********End FM GUI_UPLOAD
if not ti_record[] is initial.
loop at ti_record.
write:/ ti_record.
endloop.
else.
data: TXT_FILE4 TYPE STRING .
split File AT '.java' into: st1 st2 .
concatenate st1 'output.txt' into TXT_FILE4.
**************FM GUI_UPLOAD
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = TXT_FILE4
TABLES
DATA_TAB = ti_recORD[].
**********End FM GUI_UPLOAD
loop at ti_record.
write:/ ti_record.
endloop.
endif.
endif.
************************end of
output**************************************** -
How to upload a PDF-file and send it by SAP Mail
Hi,
we need to attach a pdf-file to an email send by SAP. The file is stored in a SAP-directory. When I use Open dataset to get the file it works but when sent by email the file could not be opened. I guess that perhaps I have to use other parameters to get the PDF in a correct file but I don't know which ones. Here is part of the coding I use for testing:
TYPES: BEGIN OF typ_pdf,
line(255),
END OF typ_pdf.
DATA: it_pdf TYPE STANDARD TABLE OF typ_pdf,
wa_pdf LIKE LINE OF it_pdf.
v_file = '/pool//Test.pdf'.
OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
WHILE ( sy-subrc EQ 0 ).
READ DATASET v_file INTO wa_pdf.
IF NOT wa_pdf IS INITIAL.
APPEND wa_pdf TO it_pdf.
ENDIF.
CLEAR wa_pdf.
ENDWHILE.
CLOSE DATASET v_file.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
contents_bin = it_pdf
receivers = it_receivers
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.
Regards
NicolaHi Nicola,
read the pdf from dataset as binary into an XSTRING.
use function to convert xstring to table.
Do not use SO_DOC.. function but CL_BCS (see blog 'unknown thus unloved'
Regards,.
Clemens -
On Adobe Acrobat Pro, how do I take a PDF file and convert it into an excel file?
I am not sure how to take a PDF file and change it into an excel file. I have Adobe Acrobat Pro. Thanks!
Using Acrobat XI Pro.
File - Save As Other - Spreadsheet - Microsoft Excel Workbook
Be well... -
I have a large PDF that I cannot send via email because of its size, 76 MB. How do I shrink this file or convert it to another format so I can email this, less than 20MB? Thanks for your help
Open the file in Preview and select "Save as..." from the File menu. Select "Reduce File Size" from the Quartz Filter menu and save. The size probably won't be reduced enough, though. You may have to split the file into several parts and mail them separately. Or upload it to a web server and send the link.
-
How to Upload a PDF file into BLOB column in a table using Forms 9i
Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.
Hi,
please, search a bit on the forum before do a question:
Just searching by "upload blob pdf" ...
How to batch upload PDF files into database BLOB
Regards,
Jose. -
How to Upload a PDF file into BLOB column in a table using Forms 6i
Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side.
Thank´s.If you are using version 9 or 10 use webutil.... Look in webutil.pll.
Use either one these two fuctions...
FUNCTION Client_To_DB( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN;
FUNCTION Client_To_DB_With_Progress
( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
progressTitle in VARCHAR2,
progressSubTitle in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN; -
How to upload a PDF file in iCloud
Hi everybody,
I would like to know how to upload a PDF file in iCloud. I want to share some PDF files with my iPhone, MacBook and iMac.
Thank you a lot!Yes, but the problem is will iBooks remember where I left off in that pdf file? Unlikely since it was deleted. Also, what is handy about the kindle app is once you delete it an icon appears in the app to show that this file is in the cloud. I guess for reading pdfs the kindle app is better. I am not saying that the kindle app would be that great for other things but at least with syncing and such it's much better. Well, iCloud is meant for other things. It's fine because I'll just use it for those other things and stick to the kindle app for reading pdfs. Well I use endnote for reading technical pdfs, I'm just talking about novels and such on the kindle app.
-
How to open a pdf file and then attach it with images
I am new to Indesign Server.
I'm currently working on a pdf.
I have a white blank pdf template.
that I want to attach/glue it with images.
How to open a pdf file and then attach it with images.
Please, help me.
Thanks.First step would be to make yourself familiar with InDesign desktop version.
Whatever you intend to achieve, do it there manually. (see regular app docs or forums)
Then try to automate your steps with scripting (see scripting docs or forum)
If you can do it with a script in the desktop version, that script will likely also run in ID Server. (see server forum).
If you can specify missing features not achievable thru scripting or manual use, reconsider to write a plugin (this forum).
A seasoned C++ programmer will need a few months to learn the basics, wade thru tons of documentation etc. Alternatively consider to hire a consultant to do the development work for you.
Dirk -
How to upload a PDF file, zip it and download the zipped file?
Hi Experts,
I have a requirement to upload a PDF file, convert that to a ZIP file and download it. If anyone has worked on this requirement, can you please guide me on this? Thanks.
AviHere you go. Hope it helps.
REPORT zrich_0004.
DATA: lt_data TYPE TABLE OF x255.
DATA: ls_data LIKE LINE OF lt_data.
DATA: lv_zip_content TYPE xstring.
DATA: lv_size TYPE i.
DATA: lv_filename TYPE string.
DATA: lv_path TYPE string.
DATA: lv_fullpath TYPE string.
DATA: lt_filetab TYPE TABLE OF file_table.
DATA: ls_filetab LIKE LINE OF lt_filetab.
DATA: lv_rc TYPE sy-subrc.
DATA: lv_content TYPE xstring.
DATA: lo_zip TYPE REF TO cl_abap_zip.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_up TYPE string DEFAULT 'C:\upload.pdf' .
PARAMETERS: p_down TYPE string DEFAULT 'C:\download.zip' .
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_up.
REFRESH lt_filetab. CLEAR ls_filetab.
cl_gui_frontend_services=>file_open_dialog(
CHANGING
file_table = lt_filetab
rc = lv_rc
EXCEPTIONS
OTHERS = 5 ).
READ TABLE lt_filetab INTO ls_filetab INDEX 1.
IF sy-subrc = 0.
p_up = ls_filetab-filename.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_down.
CLEAR: lv_filename, lv_path, lv_fullpath.
cl_gui_frontend_services=>file_save_dialog(
CHANGING
filename = lv_filename
path = lv_path
fullpath = lv_fullpath
EXCEPTIONS
OTHERS = 4 ).
p_down = lv_fullpath.
START-OF-SELECTION.
CREATE OBJECT lo_zip.
* Read the data as a string
cl_gui_frontend_services=>gui_upload(
EXPORTING
filename = p_up
filetype = 'BIN'
IMPORTING
filelength = lv_size
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 19 ).
* convert binary to xstring
CLEAR lv_content .
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_size
IMPORTING
buffer = lv_content
TABLES
binary_tab = lt_data
EXCEPTIONS
failed = 1
OTHERS = 2.
* Get the file name of the uploaded file
DATA: lv_upfilename TYPE string.
DATA: lv_tmp TYPE char1024.
DATA: lv_tmp_file TYPE char1024.
lv_tmp = p_up.
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = lv_tmp
lang = sy-langu
IMPORTING
rstring = lv_tmp.
SPLIT lv_tmp AT '\' INTO lv_tmp_file lv_tmp.
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = lv_tmp_file
lang = sy-langu
IMPORTING
rstring = lv_tmp_file.
lv_upfilename = lv_tmp_file.
* add to zip file.
lo_zip->add( name = lv_upfilename content = lv_content ).
lv_zip_content = lo_zip->save( ).
* Conver the xstring content to binary
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_zip_content
IMPORTING
output_length = lv_size
TABLES
binary_tab = lt_data.
* download
cl_gui_frontend_services=>gui_download(
EXPORTING
bin_filesize = lv_size
filename = p_down
filetype = 'BIN'
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 24 ).
Regards,
Rich Heilman -
How to upload the pdf file to the next view?....urgent
Hi Experts,
I need to upload the pdf file( a interactive form ) using the fileupload element in the A_view and the pdf file can be displayed in the b_view.
But I don't know how to complete the function?
Action:
0. Create a adobe form (c_form)in the R/3 using sfp with a inputfield.
1. Create a adobe interactive form (A_interactive_form)in the view(display_view) of the WDA for abap.
2. Create a context attribute(upload) in the display_view.
3. Bind the c_form to the A_interactive_form, so that the data can be transfered to the c_form.
4. Bind the "pdfSourth" property to context attribute "upload" in the A_interactive_form.
4. Type code in the WDA for abap for setting data("old") to the context.
5. Active the WDA and run the WDA.
6. In the IE, the interactive form is displayed with the value "old" in the field. Save the pdf form as "test.pdf" and close the IE.
7. Open the test.pdf, and type the inputfield "new" in the form, and save the test.pdf.
8. Create a context node(Pdfsourth) in the component controller, and create a attribute("upload") that type is xstring in the Pdfsourth.
9. Create a view(C_view), mapping the context node(Pdfsourth) in the component controller.
10. Create a fileupload element in the C_view, and the "data" property is binded the "upload" attribute in the context node(Pdfsourth).
11. Create a button(Display_form) and create the action with the outplug for upload the pdf file(test.pdf).
12. Change the window and set the C_view as default view, and set the Navigation link from the C_view to B_view.
13. Type code in the wddoinit method in the display_view for transfering the test.pdf file.
method WDDOINIT .
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
DATA upload TYPE xstring.
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->getupload(
IMPORTING
upload = upload " xstring
DATA lo_nd_pdfsourch TYPE REF TO if_wd_context_node.
DATA lo_el_pdfsourch TYPE REF TO if_wd_context_element.
DATA ls_pdfsourch TYPE wd_this->element_pdfsourch.
navigate from <CONTEXT> to <PDFSOURCH> via lead selection
lo_nd_pdfsourch = wd_context->get_child_node( name = wd_this->wdctx_pdfsourch ).
get element via lead selection
lo_el_pdfsourch = lo_nd_pdfsourch->get_element( ).
get single attribute
lo_el_pdfsourch->set_attribute(
EXPORTING
name = `UPLOAD`
value = upload ).
endmethod.
15. Active the WDA and run the WDA.
In the fileupload of the C_view, I select the test.pdf from my local machine. and click the button(Display_form), the display_view is displayed with the A_interactive_form.
But in the A_interactive_form, the value "old" is in the field in the form rather than "new".
I hope to display the test.pdf in the A_interactive_form. I don't know how to change my code or configuration?
Do you give some example or some hint for this problem ?
Thanks & Regards,
TaoNow, The problem has been solved.Thanks a lot.
-
How to upload a pdf file using webdynpro abap
Hi Experts,
I need to upload pdf files using webdynpro abap.my question is where to upload this files and how to upload this files, and how to display this pdf file.
Please Provide Requried Information.
Waiting for Reply.
Thanks & Regards.
Bhushan.Hi,
There is a UI element with the type 'File Upload'.
You can use that in your view.
For further details and coding, please refer to
[http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm]
Hope this helps you.
Regards,
Dolly -
How to upload a PDF file?
How do I upload a pdf file so that I can edit it?
Hi Bmayaz,
May i know which application or service of Adobe you are using.
If you have Adobe Acrobat you can simply open PDF document and go to Tools> content editing. And choose your tools of choice and edit the pdf document.
If you have Acrobat.com, then you logon to www.acrobat.com and you will get couple of feature. Where you will be able to make some limited changes to document.
Regards,
Ajlan Huda. -
How do I open PDF files and links
How do I open PDF links and PDF files, heeelp! This is very confusing, I've tried everything (such as installing adobe reader etc) and nothing works for me, I'm very dissapointed with Apple right now, this suck! I'm studing and I really need this function to work for me!
You don't need to, and should not, install any software to view PDF's. They open in Safari from the web, or in Preview from the Finder.
-
How to upload a flat file which is saved as .html format.
hi techies,
I have to upload a flat file which is saved in .HTML format. Is there any function moudles seperately to
upload html flat file or using GUI_UPLOAD.. can we upload it ???
Please need a suggestion...
Rgds.,
subashhi gautam,
this FM is taking html string as input and giving the output, not the file...
any more suggesstions dude..
Rgds.,
subash
Maybe you are looking for
-
Process: Mail [1614] Path: /Applications/Mail.app/Contents/MacOS/Mail Identifier: com.apple.mail Version: 6.1 (1498) Build Info: Mail-1498000000000000~1 Code Type: X86-64 (Native) Parent Process: launchd [248] User ID: 501 Date/Ti
-
Yosemite and Time capsule not working?
I just started using Yosemite on my mac book pro laptop and my mac desktop. Time machine has been fine on my desktop with my external drive which is plugged into the computer. I had no problem with new backups. But, I can't get time machine to work w
-
I would like to ask BT to turn off interleaving. W...
Hello, I just got BT infinity installed last week. I would like to ask BT to turn off interleaving, so my connection would be on "Fast Path". Where or How Can I ask for this? Regards, Laszlo
-
Hi I have a Toughbook from Pansonic. We use want to use peap with acs and ap 1200. with cisco cards everything works. on the nb we use windows 2k NOT XP with the 802.1x patch from ms. and the latest intel pro set 7.1.1 there you can configure PEAP cl
-
Printing from Vista to printer connected to iMac
Wireless network (2Wire router) setup with Vista PC, NEW GREAT iMac intel pc (OS X 10.4, and Windows XP Pro pc. Epson Stylus CX3200 connected to iMac. Can print from iMac, print from XP laptop via network (after using Bonjour), but can't get very far