Printing the file type attachment (PDF) in the report (XMLP) output
Requirement
Data Source: RDF
Layout type: RTF (XML publisher)
Requirement is to print the attachment on the sale order header of data type ‘File’. The attachment file type is PDF. Please refer the below screen shot for details.
Responsibility: Order Management Super User
Path: Orders, Returns - Sales Orders
Open sales order record, and on sales order header form choose: View - Attachments from toolbar (or click on Attachment-icon).
Attachment Data Type
Default attachment data type is defined for each attachment category. This default value can be updated, when attachment is created on a transaction.
If attachment File Type is 'File', print constant text 'See attached document' on the position defined for it on the layout. The attachment file is then printed to the end of the document (last page of the document). This additional page should contain reference to the sales order number being printed.
Is it possible to print the attachment of data type ‘File’ in the XMLP report?
Requirement
Data Source: RDF
Layout type: RTF (XML publisher)
Requirement is to print the attachment on the sale order header of data type ‘File’. The attachment file type is PDF. Please refer the below screen shot for details.
Responsibility: Order Management Super User
Path: Orders, Returns - Sales Orders
Open sales order record, and on sales order header form choose: View - Attachments from toolbar (or click on Attachment-icon).
Attachment Data Type
Default attachment data type is defined for each attachment category. This default value can be updated, when attachment is created on a transaction.
If attachment File Type is 'File', print constant text 'See attached document' on the position defined for it on the layout. The attachment file is then printed to the end of the document (last page of the document). This additional page should contain reference to the sales order number being printed.
Is it possible to print the attachment of data type ‘File’ in the XMLP report?
Similar Messages
-
Import from URL with out knowing the file types
Hello Gurus,
I am struck in a strange situation, We need to import files through URL , they may be tiff, pdf, word,excel ...
and you dont know the file type until you open the URL,
So i used both ORDIMAGE and ORDDOC for importing, if the import fails in the ORDIMAGE process due to data curropt error , it goes to ORDDOC and the error is taking way too much time to appear.
1) Is there any way we can find the file type when we open the URL to check if it is a DOC file or Image File.
2) Is there any way to reduce the time taken to show up the error.
Thank youIn Your case, you may need finer control that what import provides.
You can also use the uri types to upload the image and extract the mime type from the response. You can do the same for orddoc. orddoc may take a long time to parse since the blob must be scanned.
Larry
create table uri_imgupload(item_id number primary key, pict ordsys.ordimage);
create or replace procedure upload_uri_image(prikey_id number, url varchar2 )
as
imgobj ORDSYS.ORDImage;
ctx raw(4000):=null;
thisrowid urowid;
urityp sys.URIType;
BEGIN
urityp := SYS.URIFactory.getURI(url);
imgobj := ORDSYS.ORDImage.init();
imgobj.source.localdata := urityp.getBlob();
imgObj.setMimeType(urityp.getContentType());
begin
imgobj.setProperties();
Exception
when others then
null; -- Ignore exceptions, mimetype is enough.
end;
insert into uri_imgupload t (item_id, pict)
values (prikey_id, imgobj);
commit;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('EXCEPTION caught '||sqlcode||' '||sqlerrm);
END;
show errors;
DECLARE
Image ORDSYS.ORDImage;
ctx raw(4000):=null;
BEGIN
utl_http.set_proxy('www-proxy.us.oracle.com:80','*.us.oracle.com');
upload_uri_image(1, 'http://www.oracle.com/admin/images/ocom/oralogo_small.gif');
END;
show errors; -
How to identify the file type in a safe way
I need to identify the filetype of a file in my disc.
I watched over internet and i've found this good site:
http://filext.com/
that supplys the "magic bytes" for many kind of files.
I have also looked over internet for some ready class that identify different file types, and I have found FFident:
http://schmidt.devlib.org/ffident/index.html
Do you know any other Java package/class that is able to identify correctly the file types?
Thank you,.The OS just watch the extension of the file.Not always. If you create a word doc but name it with
some other extension, the OS still can determine that
it is a word doc.On which OS?
if i take foo.exe and i rename foo.doc so my OSwill
try to open it as a MS Word Document.Again, garbage in, garbage out.What you mean?
If I create a MS Word Document for a file .doc that is not a real .doc and it is not able to read, i will just lose cpu time and a lot of memory.
So it is important to understand if I need really to open MS Word watching what is the real file type
Either way, you're going to be doing way too much
work (and wheel-reinventing) if you're going to build
your own detection scheme.In the SDK there is not any file type checker, and if eventually really exists an OS like you say that is able to read inside the file, i prefer to have my own Java class that do that work in a safe and opensource way.
However in my first post i've given a site with some java code that do what I need, i just was asking if anyone know if there is any ready-to-work java class that is better for doing this work. -
Using an F2100 printer & can't scan to pdf there is no option in the file type menu there used be ? I'm using xp but had an hp update and have the problem tried unistalling and reinstalling the HP software and even using system restore to be the update .I hope it is just a setting or something simple. Is there another software I can use ? Many thanks
Follow steps 1 and 2 of this tutorial and you will be able to get a jpg file for each of your book's pages inported into iPhoto: 06 - Creating an iDVD Slideshow From an iPhoto Book. If you don't have the Automator workflow Save PDF to iPhoto (which should be in the HD/Library/PDF Services folder) you can download it from Toad's Cellar.
Happy Holidays -
I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.
I am not aware of a way except for photos that allows you to select multiple files in an email. I even checked settings in the Adobe Reader app, and it does not show that ability.
-
After upgrading to 5 (this worked in 4) I can not select a PDF file in the File Upload dialog that appears when I click the Browse button next to an HTML file type input element. The specific HTML element source code has the attribute: ACCEPT="image/*". I can select image files such as jpg, png, tiff, etc. But not PDF. This worked great in Furefox 4 and works in the latest version of Safari.
The HTML code for the form element is:
INPUT TYPE="file" NAME="file_1" ACCEPT="image/*" SIZE=35
The File Upload dialog lists all files with PDF extension as dimmed and not selectable in Firefox 5.
Can you help?Hi Purush
Unfortunately we couldn't solve the problem. Our IT specialist checked it with SAP directly. SAP doesn't support the SAP KW solution anymore. Therefore we checked-in the document in ".doc"-Format. -
Can we limit the file type in Attachment?
Hi,
Is it possible to limit the file types that the OAF attachment can upload?
Thanks!
Edited by: maeve on Apr 17, 2011 7:09 PMHi Maeve
You can make use of below code in pfr method of controler
if(pageContext.getParameter("FileUpload") != null)
DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Bean id of OAFileUploadBean ");
String contentType = fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
//Write logic here to limit the file type
}For more details read JavaDoc as well as refer below thread
File Upload
Hope it helps!!!
Thanks
AJ -
When I attach a JPG file in my email message and send it to a Windows friend they get the message "The file type being saved or retrieved has been blocked when they try to open it so that they can save it." Anyone know why and how to fix this problem?
Your Windows friend should ask in a Windows forum why his email client won't open attached jpg files. We have no idea what email client he is using or how his Windows security is configured.
-
How to change the file name of pdf file in html page?
Hi,
Actually my requirement is to upload 50 PDF files containing javascript in each file into flex page with the help of one html page.
i did the the javascript part by using batch processing.
now i want to call those pdf files one after another without changing the file name in html page
the code written in html page is
<html>
<body>
<object id="PDFObj"
data="http:\\localhost\pdf\20090807 - Batch 630.pdf"
type="application/pdf"
width="100%"
height="100%">
</object>
</body>
</html>
So every time i have to change that file name to acess another file.
Is there is any other way to sort this problem????
Plz anyone help me to sort out this problem with some code or some example.I once had a similar task for creating a webpage that I only use on my computer--a webpage that accesses PDF's and SWF's font previews from a list of fonts as "a href's". What you must do is utilize the power of the command line, whether on a Mac on a PC or on Linux, Linux being the most powerful (although Mac IS Unix). You must utilize variables, variable replacement, and then a command to print out the results of a "for" or "while" loop to a text file which will be your HTML file with each individual link automatically built into the HTML code. You will have a list of 50 links. If you are simply looking for a GOOGLE type functionality where you click on "Next" and "Previous" you will have to dig deeper into variable replacement--this I don't know how to do yet but there are books for command-line shell interpreters. One shell interpreter is called "bash" (born-again shell) and there is a book on the market which gives a detailed example of how to replace variables in a shell script. Again, I don't know how it works. I will try to learn this at a later time when I am more seasoned with the basics of shell scripting.
-
I attached multiples .pdf files to an email. Tried to attach the next file before the previous 1 finished attaching. Got error message "this "**" file cannot be attached until the files already attached are finished uploading". Was never able to attach that 1 file to the email that I received the error message for; was able to attach subsequent files to that same email & send it. Now, I often get the same error message, even if I only attach 1 file & esp. when attaching .ai or .jpeg files. What can I do to fix this problem?
It looks like nobody has an answer for this despite of the 80 something views!
And here i thought Adobe admin would be monitoring the forum, but surprisingly, they don't even have the answer for this!!! -
Issue in sending the file as attachment
I am using functional module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the email with attachment.
If the file type is 'RAW', the records are getting displayed as that of the source file. For the other file types, all the records are getting displayed in a single line in the output. Please let me know the solution for this.Hi Saranya,
Chk this example:
DATA : DS_OBJPACK TYPE SOPCKLSTI1,
DS_OBJHEAD TYPE SOLISTI1,
DS_OBJBIN TYPE SOLISTI1,
DS_OBJTXT TYPE SOLISTI1,
DS_RECLIST TYPE SOMLRECI1.
*--MAIL related Internal tables
DATA: DS_XDOCCHNG TYPE SODOCCHGI1, " document
" attributes
DT_OBJPACK TYPE STANDARD TABLE OF SOPCKLSTI1, " attachment
" table
DT_OBJHEAD TYPE STANDARD TABLE OF SOLISTI1, " objectheader
" table
DT_OBJBIN TYPE STANDARD TABLE OF SOLISTI1, " binary table
DT_OBJTXT TYPE STANDARD TABLE OF SOLISTI1, " object text
DT_RECLIST TYPE STANDARD TABLE OF SOMLRECI1. " mail
" recipients
DATA: DL_TEXT TYPE CHAR50,
DL_TABLELINES TYPE SY-TABIX,
DL_STARTDATE(10) TYPE C,
DL_ENDDATE(10) TYPE C,
DL_SUBJECT(100) TYPE C, "sin_obj_de, Subject for Mail
DL_SDATE TYPE CHAR10,
DL_DDATE TYPE CHAR10,
DL_CDATE TYPE CHAR10,
DL_DATE TYPE CHAR10,
DL_FDATE TYPE CHAR10,
DL_SYDATE TYPE CHAR10.
*subject of the mail
*if delivery date in entered
IF NOT S_CONDAT[] IS INITIAL.
WRITE S_CONDAT-LOW TO DL_STARTDATE MM/DD/YYYY.
WRITE S_CONDAT-HIGH TO DL_ENDDATE MM/DD/YYYY.
IF S_CONDAT-HIGH IS INITIAL.
CONCATENATE 'Capital FutIssue- Dtd Btn'(007)
DL_STARTDATE
DL_STARTDATE
INTO DL_SUBJECT SEPARATED BY SPACE.
ELSE.
CONCATENATE 'Capital FutIssue- Dtd Btn'(007)
DL_STARTDATE
'and'
DL_ENDDATE
INTO DL_SUBJECT SEPARATED BY SPACE.
ENDIF.
ELSE.
WRITE SY-DATUM TO DL_SYDATE MMDDYY.
CONCATENATE 'Capital FutIssue- Exectd on'(008)
DL_SYDATE
INTO DL_SUBJECT SEPARATED BY SPACE.
ENDIF.
*-- Populate mail id
CHECK S_USERID[] IS NOT INITIAL." OR P_DLIST IS NOT INITIAL.
IF NOT S_USERID[] IS INITIAL.
LOOP AT S_USERID.
CONCATENATE S_USERID-LOW '@ntmcon02.emn.com'(009) INTO
DS_RECLIST-RECEIVER.
DS_RECLIST-REC_TYPE = 'U'.
APPEND DS_RECLIST TO DT_RECLIST.
ENDLOOP.
ENDIF.
*-- Mail subject line
CLEAR: DS_XDOCCHNG.
DS_XDOCCHNG-OBJ_NAME = 'HEADING'.
DS_XDOCCHNG-OBJ_DESCR = DL_SUBJECT.
*-- Mail body
CONCATENATE TEXT-010 SPACE INTO DS_OBJTXT SEPARATED BY SPACE.
DS_OBJTXT = TEXT-010.
APPEND DS_OBJTXT TO DT_OBJTXT.
*-- Populate the attachment text.
*-- Header
CONCATENATE TEXT-036
TEXT-026
TEXT-053
TEXT-052
TEXT-037
TEXT-018
TEXT-019
TEXT-022
TEXT-021
TEXT-017
TEXT-023
TEXT-024
TEXT-025
TEXT-027
TEXT-028
TEXT-020
TEXT-029
TEXT-030
TEXT-038
TEXT-046
TEXT-047
TEXT-048
TEXT-049
TEXT-031
TEXT-032
TEXT-034
TEXT-035
INTO DS_OBJBIN
SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
APPEND DS_OBJBIN TO DT_OBJBIN.
CLEAR DS_OBJBIN.
*--Body
CLEAR: DS_FINAL.
LOOP AT DT_FINAL INTO DS_FINAL.
DG_MENGE = DS_FINAL-MENGE.
DG_CMOQTY = DS_FINAL-CMOQTY.
DG_WEMNG = DS_FINAL-RECV_QTY.
DG_BALANCE = DS_FINAL-BALANCE.
DG_DAYS = DS_FINAL-DAYDIFF.
WRITE DS_FINAL-CONSDT TO DL_DATE MM/DD/YYYY NO-ZERO.
WRITE DS_FINAL-SLFDT TO DL_SDATE MM/DD/YYYY NO-ZERO .
WRITE DS_FINAL-EINDT TO DL_DDATE MM/DD/YYYY NO-ZERO.
WRITE DS_FINAL-AEDAT TO DL_CDATE MM/DD/YYYY NO-ZERO.
Calling conversion exit to display WBS in external format
PERFORM CONV_EXIT_ABPSN_OUT CHANGING DS_FINAL-WBS.
CONCATENATE DL_DATE
DL_DDATE
DS_FINAL-DAYDIFF
DS_FINAL-EXPEDITE
DS_FINAL-FLTDT
DS_FINAL-AUFNR
DS_FINAL-CMOITEM
DG_CMOQTY
DG_BALANCE
DG_MENGE
DG_WEMNG
DS_FINAL-EBELN
DL_CDATE
DL_SDATE
DS_FINAL-EBELP
DS_FINAL-TXZ01
DS_FINAL-MATNR
DS_FINAL-MAKTX
DS_FINAL-WBS
DS_FINAL-INDOOR
DS_FINAL-FOOTPRINT
DS_FINAL-WEIGHT
DS_FINAL-STORAGE
DS_FINAL-LIFNR
DS_FINAL-NAME1
DS_FINAL-EKGRP
DS_FINAL-AFNAM
INTO DS_OBJBIN
SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
TRANSLATE DS_OBJBIN USING ', '.
CONCATENATE CL_ABAP_CHAR_UTILITIES=>NEWLINE DS_OBJBIN INTO DS_OBJBIN
APPEND DS_OBJBIN TO DT_OBJBIN.
CLEAR DS_OBJBIN.
ENDLOOP.
**-- Populate packing list for body text
DS_OBJPACK-TRANSF_BIN = ''.
DS_OBJPACK-HEAD_START = 1.
DS_OBJPACK-HEAD_NUM = 0.
DS_OBJPACK-BODY_START = 1.
DS_OBJPACK-DOC_TYPE = 'RAW'.
APPEND DS_OBJPACK TO DT_OBJPACK.
CLEAR DS_OBJPACK.
*-- Get total no.of lines of Object table(attachment)
CLEAR : DL_TABLELINES.
DESCRIBE TABLE DT_OBJBIN LINES DL_TABLELINES.
DL_TEXT = DL_SUBJECT.
*-- Packing list for attachment
DS_OBJPACK-TRANSF_BIN = 'X'.
DS_OBJPACK-HEAD_START = 1.
DS_OBJPACK-HEAD_NUM = 1.
DS_OBJPACK-BODY_START = 1.
DS_OBJPACK-BODY_NUM = DL_TABLELINES .
DS_OBJPACK-DOC_TYPE = 'XLS'.
DS_OBJPACK-OBJ_NAME = ' '.
DS_OBJPACK-OBJ_DESCR = DL_TEXT.
DS_OBJPACK-DOC_SIZE = DL_TABLELINES * 255.
APPEND DS_OBJPACK TO DT_OBJPACK.
CLEAR DS_OBJPACK.
*-- Sending the EMail document in given format
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DS_XDOCCHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = DT_OBJPACK
OBJECT_HEADER = IT_OBJHEAD
CONTENTS_BIN = DT_OBJBIN
CONTENTS_TXT = DT_OBJTXT
RECEIVERS = DT_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 SY-SUBRC NE 0 .
WRITE:/ SY-SUBRC , 'Mail document not sent'(004).
ELSE.
MESSAGE S000 WITH 'Mail sent successfully'(012).
ENDIF.
Thanks,
Keerthi. -
A pdf file is created from a word document and then posted to our dealer portal. It allows the dealer to open the pdf file and then either print and/or save off to a hard drive. The issue is the file name has + signs in between all the words. Is there a way to eliminate the file names coming up with the plus signs? It is not being saved that way. Any help you can provide would be appreciated.
Use a proper file name for the WORD document. MS decided several years ago to allow spaces, but that is not standard and is likely what the issue is. A good alternative is to replace spaces in file names with underbars, "_".
-
Setting the file type in a file field
Hi,
I wonder if any body can help i am new to web application
development, I am developing an asp application in dreamweaver 8,
A few of my pages contain a file field which has a file
browse button at the end of the field which works fine,
now i want to set the default file type to *.pdf, Currently
when i run my app in IE 7, when i click on the file browse
button, the file browse dialog box appears but the default
file type is *.* (All files), is it possible to set the default
file type
to pdf so that when the file browse dialog is displayed the
default file type is *.pdf in stead of *.*.
Thanks
FifoThe OS just watch the extension of the file.Not always. If you create a word doc but name it with
some other extension, the OS still can determine that
it is a word doc.On which OS?
if i take foo.exe and i rename foo.doc so my OSwill
try to open it as a MS Word Document.Again, garbage in, garbage out.What you mean?
If I create a MS Word Document for a file .doc that is not a real .doc and it is not able to read, i will just lose cpu time and a lot of memory.
So it is important to understand if I need really to open MS Word watching what is the real file type
Either way, you're going to be doing way too much
work (and wheel-reinventing) if you're going to build
your own detection scheme.In the SDK there is not any file type checker, and if eventually really exists an OS like you say that is able to read inside the file, i prefer to have my own Java class that do that work in a safe and opensource way.
However in my first post i've given a site with some java code that do what I need, i just was asking if anyone know if there is any ready-to-work java class that is better for doing this work. -
Mailexample.sql how do you determine the file type?
I'm using the mailexample.sql which explains how to use the demo_mail wrapper package for utl_smtp. There's a procedure for attaching text files and a procedure for attaching binary files. I've got binary files to attach to email successfully.
How can I determine the file type so that I can use the attach_text procedure when attaching text files rather than the procedure for attaching binary files?
SandyWatch out! I think there is a bug in that code :-
bug with PL/SQL Sample - maildemo.sql
To answer your question - the usual way of determining a file type is to look for 'magic numbers' in the file that indicate its type. For example, Windows exe files often (always?) begin with the two letters 'MZ'. Zip files begin with 'PK'; Rar archives begin with 'Rar!'. Text files can begin with anything, and do not have any characteristic marker, but USASCII7 (which is what the format that routine is designed for - I think), is a characterset that only uses the first 7 bits of the byte. You could read the file, and if you find any bytes > 127, then you know it is not a USASCII7 file. I have seen various programs that 'sample' the first 64 or 256 bytes of a file instead of reading the whole file, and they usually get it right.
Hope this helps.
Takmeister -
How to upload files (.doc./.pdf) to the database?
Hello,
I know this question was raised several times before but the answers don't really make me happy.
I have a table with a BLOB-column for the documents (different mime-types) and a varchar2(100)-column for the mime type.
I edited the form in navigator an told the blob-field to store mime-information in the mime-type-field.
Now, do i have to tell portal the mime-type or does it retrieve it itself?
if i have to tell, how do i do so?
How can i fill in the value for the mime-type-field with javascript, when the fieldname is something like abc.def.ghi?
Javascript then will tell me that document.forms.fieldname is not an object.
Wouldn't it be a good idea to write a howto on this subject (and other subjects too, of course)? I'll do the work if you share your knowledge with me.
And, by the way, can you share your wisdom about retrieving the blobs from tha database for displaying and download, too?
thank you very much,
Ralf SchmittHi Ralf,
see in the design time if you are
1)Interested in only one type of content in the blob column then just mention that mime-type in the
for eg.there will be text field "or type in fixed mime type" where you can mention the default type which you are interested in uploading.
2)If you intent to upload files of diffrent type of mime-types then you will have to associate a column for storing the mime types for that file and for this there will be a text field.
for eg. you will have options for "Select a column to store mime information" which will be having list of all the remaining fields in the LOV , you select which field of the table you wish to make for storing mime-type and do not set any default mime-type in the text "or type in fixed mime type" in this case.
more explaination:
=================
for this case create a table like this :
create table for_blob(id number(4),file_name blob,mime_type_of_file varchar2(400));
when you select file_name field while designing the form you will have following option.
"Select a column to store mime information" ---> select mime_type_of_file
"or type in fixed mime type" ---> delete the content of this text field.
Now when you will actually run the form you have to insert mime-types in the text "mime_type_of_file " for eg
for PDF files: Application/pdf
for msword :Application/msword
for the first case just input the mime-type which you wish to upload.
"or type in fixed mime type" ---> delete the content of this text field say for eg for PDF files:Application/pdf
so that at run time you do not have to input any mime-type info and in this case even the field need not have the column for the mime-type.
hope this help.
rahul
Maybe you are looking for
-
RH8 HTML suddently generating truncated CHMs
I typically compile a new.chm file for my project once or twice a week. Yesterday, the chm I generated came in at 1975 kb. The previous one, created three days earlier for the same project, was 47,489 KB. RH displays no error messages and does not c
-
as soon as I upgraded to the new itunes, when clicking on the icon in the dock I noticed the icon bounced up and down once but itunes never opened up. Tried it latter in the day and it still would not open. My operating system is 10.6.8and I have the
-
Hi, have any body created a report which would print a tree in Oracle Reports 10g? If so, please let me know how. Thanks in advance, Saumen.
-
Since updating my iPhone 5S to 7.0 I can't receive phone calls, but can receive texts. Why?
-
1st Website a Success Thanks to these Discussions
I want to thank all of you for helping me with my first website!! I bet I've read 1000's of these posts and have learned more than I learned through my One-to-One's at the Apple store and the iWeb tutorials. If you're new here, Bookmark the links you