Uploading a JPG File into a Blob problem
Hi everyone
I'm using Forms10G
Oracle Databse 11G
Right now I'm uploading JPGs images into a blob column using webutil which is implemented in the app. But something weird happen. It seems the file is using more space that it would. For example: I just upload an 800Kb image, and when I try to download it the size is like 1.12Mb (I'm using Reports10g to accomplish this, converting the image to a PDF file) and even the size in the DB is bigger too.
Is this normal?
Hope you could help me!
Thank you!
If you upload a file using webutil_filetransfer, the blob in the database should have the same size as the file on the client. If you generate a pdf including the image, the pdf-filesize will likely be different as pdf stores images in a different way.
Similar Messages
-
Upload an .doc attachment into a blob field in Oracle
sir i have to upload a .doc file into a blob field in the oracle database.
help with any code, or code links
The code i am having,pls suggest if any changes...
String QUERY_ENHANCEMENT = "INSERT INTO EKMIS_ENHANCEMENT(USER_ID,ENH_TYPE,MODULE,DESCRIPTION,ATTACHMENT)";
QUERY_ENHANCEMENT = QUERY_ENHANCEMENT+"VALUES(?,?,?,?,?)";
PreparedStatement preparedStatement = connection.prepareStatement(QUERY_ENHANCEMENT);
preparedStatement.setString(1, enhancementTO.getUserid());
preparedStatement.setString(2, enhancementTO.getType());
preparedStatement.setString(3, enhancementTO.getModule());
preparedStatement.setString(4, enhancementTO.getDescription());
try
File anyFile = new File(enhancementTO.getPath());
InputStream is = new FileInputStream(anyFile);
preparedStatement.setBinaryStream( 5, is, (int)(anyFile.length()));
catch(FileNotFoundException fnfe)
System.out.println("Exception while archiving to BLOB/CLOB");
fnfe.printStackTrace();
return preparedStatement;the html form is like this..
<table width="780" cellpadding="2" cellspacing="0" border="0">
<tr>
<td colspan="6" class="SectionHeader">USER COMMENTS/SUGGESTIONS/COMPLAINTS</td>
</tr>
<tr>
<td height="18" class="boldLabel_RA">
User Id
</td>
<td height="18" class="value_LA">
<input name="userId" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserID}"/>
</td>
<td height="18" class="boldLabel_RA">
User Name
</td>
<td height="18" class="value_LA">
<input name="userName" type="text" class="big" readonly="true" value="{sessionAttributes/ekmis.UserName}"/>
</td>
<td height="18" class="boldLabel_RA">
Select Type
</td>
<td height="18" class="value_LA">
<select class="big" name="type">
<option value="0"/>
<option value="E">Enhancement</option>
<option value="S">Suggestion</option>
<option value="B">Bug</option>
</select>
</td>
</tr>
<tr>
<td height="18" class="boldLabel_RA">Select Module</td>
<td colspan="5" height="18" class="value_LA">
<select name="mod" class="extralong">
<option value="0"/>
<xsl:call-template name="getModules" >
<xsl:with-param name="modules" select="requestParameters/param[@name='sat']" />
</xsl:call-template>
</select>
</td>
</tr>
<tr>
<td colspan="6" class="SectionHeader"/>
</tr>
<tr>
<td height="18" class="boldLabel_RA">Description</td>
<td colspan="5" height="18" class="value_LA">
<textarea name="description" class="big"/>
</td>
</tr>
<tr>
<td height="18" class="boldLabel_RA">Add Attachment</td>
<td colspan="5" height="18" class="value_LA">
<input name="path" type="file" class="big"/>
</td>
</tr>
</table> -
Is it possible to upload a xls file into an application and store in table.
Hello,
I just want to know whether its possible to upload a xls file into application in Oracle 10g .
i.e. have a separate xls file stored in computer then in the application just have a browse button to upload that xls file and that data should be inserted into a new table.
ThanksGood morning,
You can upload the .XLS file into a BLOB field in a table and then download that back to the local PC. Look in the APEX Advanced Tutorial for "Create an Upload Item", Page 9-3 (PDF Page: 109). There it will explain how to upload to a BLOB and then how to download that again.
Don.
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! :) -
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 insert a JPG file into a Table from a Form?
I create a Schema and a Table as follows:
SQL> create user myphoto identified by myphoto;
User created.
SQL> grant connect,resource to myphoto;
Grant succeeded.
SQL> create table myphoto.photo_table
2 (photo_id varchar2(10) primary key,
3 photo_content blob);
Table created.
I would like to build an Oracle Form with a Text Item to enter the full path and filename to be uploaded and inserted into the photo_table; and a Push Button to insert the jpg file into the photo_table.
Can any one give me details on how this could be done?Hi,
have a look at webutil on otn.oracle.com/products/forms ---> Webutil
Webutil has the capability to load files into the database.
Frank -
When I upload a single file into a production in FCS, I can access all the fields in a metadata set. When I upload a batch of files into the same production in FCS, I can all access part of the fields in the metadata set. Does anyone know why this happens?
dredcomm,
Great answer, and it led me to where to solve the problem. In the field definition screen there is a category drop down list. If you choose something other than none from the category drop down list then that field won't appear in the list of fields when you attempt to batch import a group of files.
Thanks,
Dave -
To upload a flat file into BW using a variable entry in web application
hi guys,
how to upload a flat file into the web browser using a
a variable entry in the wad application.
Thanks,
your help will be duly appreciated
Message was edited by:
Vj.R Tthanks arun
but is it not possible to load the flat file at bex level which
might be the same at wad level
and also what do you mean the load package
triggered from the backend and how do i
manipulate the data is it at bex level or wad level
please elaborate.
thanks
your help will be rightly acknowledged. -
Getting an Error while uploading a WSDL file into ServiceRegistry
Hi,
I am trying to uploading a WSDL file into ServiceRegistry with following URL:
file://PEPWUL32116/D:/shared/ORDER.wsdl
but I am getting the error below:
com.sap.esi.uddi.sr.api.exceptions.SRExceptionerror code: null detail message: java.lang.IllegalArgumentException: Unsupported protocol. Supported protocols are http and https->java.lang.IllegalArgumentException: Unsupported protocol. Supported protocols are http and https
Is there a way to upload a local WSDL into registry.
ThanksRama ,
Look into the error...
file://PEPWUL32116/D:/shared/ORDER.wsdl
but I am getting the error below:
com.sap.esi.uddi.sr.api.exceptions.SRExceptionerror code: null detail message: java.lang.IllegalArgumentException: Unsupported protocol. Supported protocols are http and https->java.lang.IllegalArgumentException: Unsupported protocol. Supported protocols are http and https
> not the right way of registering a service ...Use HTTP or HTTPS...protocol rather than file . It is not a FTP site
more over D: should not be used..
Regards , -
Upload an XML file into the Internal table
Hi Guys,
I want to know, how to upload an xml file into the Internal table through ABAP programmingyou just wanted to load the xml file into internal table (as a table of binary strings)or load the xml data mapped to itab row columns
for the first one you can simply use gui_upload
and for the second one you need to load the xml file using gui_upload and use XLST program to transform into an itab
Regards
Raja -
How to upload an XML file into another system
Hi friends,
I have a requirement where I need to upload an XML file into one system
which has been downloaded using another system.
I have tried using the method ' cl_gui_frontend_services=>gui_upload'
to upload the file but it is going for dump.
I have used the method ' w_xml->import_from_file' also,
but it is also going for dump ,because both methods are using the same FM
' GUI_UPLOAD'.
Can any one suggest on this.
Regards,
Bhargavi.D"Here is the Explaination for uploading the XML Format file to sap " through ABAP Program ....
1. Basically you simply have to convert the XML file into the proper IDoc format. There are many ways to achieve this. One solution would be to convert it externally to SAP, e.g. via VB Script or with an XSLT transformation. Or you use the built in SAP functions for importing an IDoc from an XML stream.
2. Uploading a file is either done via GUI_UPLOAD or via the usual way of reading a file from the application server (Open dataset. Read dataset) But what do you mean by "send to external system"? Do you want to convert an IDoc into XML? Then you simply define an XML port with WE21 to send the IDoc out.
Here is an example of code that loads an XML from file and posts it as an IDoc. Please keep in mind that the XML has to be in its canonical format as described in the interface repository: ifr.sap.com (choose the template of the desired IDoc from there as an example).
data: data_tab type table of char1024.
data: XML_STREAM type string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'D:test.xml'
* FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = DATA_TAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
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 'CONVERT_TABLE_TO_STRING'
EXPORTING
I_TABLINE_LENGTH = '1024'
IMPORTING
E_STRING = XML_STREAM
TABLES
IT_TABLE = DATA_TAB[].
write: / xml_stream color col_total.
data: CONTENT_LENGTH type string.
data: CONTENT_TYPE type string.
data: REMOTE_ADDR type string.
CALL FUNCTION 'IDOC_INBOUND_XML_VIA_HTTP'
EXPORTING
XML_STREAM = XML_STREAM
CONTENT_LENGTH = content_type
CONTENT_TYPE = content_type
REMOTE_ADDR = remote_addr
EXCEPTIONS
NO_IDOCS_SAVED = 1
TAG_ERROR = 2
NO_DATA_RECEIVED = 3
NO_IDOCS_RECEIVED = 4
SEGMENT_ERROR = 5
IDOC_WAS_SEND_SECOND_TIME = 6
OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
write: / sy-subrc color COL_NEGATIVE.
ENDIF.
reward points if it is usefull.......
Girish -
Upload Attachements(Doc File) into SAPand Read The same in BADI
Hi All,
I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
Class name : PICTURES
Class type : OT
Object key : CAPA.
I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
Regards,
Nagesh Kumar.
Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AMHi All,
I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
Class name : PICTURES
Class type : OT
Object key : CAPA.
I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
Regards,
Nagesh Kumar.
Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AM -
Upload a .CSV File into an Internal table
Hi,
What are the parameters to be filled into the Function Modules "GUI_UPLOAD" and "ALSM_EXCEL_TO_INTERNAL_TABLE" to Upload a .CSV File into an internal table.
Please send a sample code to support this....
Regards,
Aadhi.Hi,
Check the below code.
TYPE-POOLS: truxs.
TYPES:
BEGIN OF ty_line,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
END OF ty_line.
*data: ty_Lines TYPE STANDARD TABLE of ty_Line WITH DEFAULT KEY.
DATA: itab TYPE STANDARD TABLE OF ty_line WITH DEFAULT KEY.
DATA: itab1 TYPE truxs_t_text_data.
SELECT
vbeln
posnr
UP TO 10 ROWS
FROM vbap
INTO TABLE itab.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = itab
CHANGING
i_tab_converted_data = itab1
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'd:\TEMP\test1.txt'
TABLES
data_tab = itab1
EXCEPTIONS
OTHERS = 1.
IF sy-subrc eq 0.
WRITE: 'Data downloaded successfully'.
ENDIF.
DATA: BEGIN OF IEXCEL OCCURS 0.
INCLUDE STRUCTURE ALSMEX_TABLINE.
DATA: END OF IEXCEL.
PARAMETERS: FILENM LIKE rlgrap-filename MEMORY ID M01,
NOHEADER AS CHECKBOX.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = FILENM
i_begin_col = 1
i_begin_row = 1
i_end_col = 100
i_end_row = 30000
tables
intern = IEXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'EXCEL UPLOAD FAILED ', FILENM, SY-SUBRC.
endif. -
How to upload a Flat file into sap database if the file is in Appl'n Server
Hello Sap Experts , Can you tel me
" How to upload a Flat file into sap database if the file is in Application Server.
what is Path for that ?
Plz Tel Me its Urgent
Thanks for allHi,
ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
*& Report ZUPLOADTAB *
*& Example of Uploading tab delimited file *
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
DATA: ld_file LIKE rlgrap-filename.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 like pa0002-VORNA,
name2 like pa0002-name2,
age type i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: begin of t_uploadtxt,
name1(10) type c,
name2(15) type c,
age(5) type c,
end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) type c.
constants: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
APPEND wa_upload TO it_record.
ENDIF.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
* Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop. -
How to upload an rtf file into a table? (without using UNIX box)
Hi All,
Our requirement is to upload a rtf file into table in database.
Later that rtf is used to generate a report.
Is it possible to upload the file directly into a table by using SQL developer?
our requirement is to upload the files without placing them in a particular path in unix box.
Thanks in advance
Regards
SudeepIf you are in EBS
When you upload Template in Application
I guess It'll get stored in apps.XDO_LOBS table, in FILE_DATA Column
select * from apps.XDO_LOBS
where lob_code=<'con. program short name'>
and file_name= <'your.rtf'>
Thanx
Rahul -
Upload an Excel file into an Internal Table
Hi,
I want to upload an Excel file into an internal table but it doesn't work. I'd appreciate if someone could tell me what is wrong.
My excel file has the following format:
Col1 Col2
Row1 1 2
Row2 2 3
Row3 3 4
And the report code is the following one:
REPORT ZFI_PROKON_PROCESOS.
DATA: BEGIN OF itab OCCURS 0,
num1(1),
num2(1).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename obligatory.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
CHANGING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 2
I_END_ROW = 5
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
LOOP AT itab.
WRITE: / itab-num1, 10 itab-num2.
ENDLOOP.
Thanks in advance,
GerardTry function module
ALSM_EXCEL_TO_INTERNAL_TABLE
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_path
i_begin_col = 1
i_begin_row = 2
i_end_col = 70
i_end_row = 10000
tables
intern = i_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
P_PATH is file name with path.
I_EXCEL is internal table to store data.
declaration is "i_excel like structure alsmex_tabline"
then loop at i_Excel and populate your table
for eg
loop at i_excel.
case i_excel-col.
when '0001'.
i_data-compcode = i_excel-value.
when '0002'.
i_data-rcpttyp = i_excel-value.
when '0003'.
i_data-pocimpro = i_excel-value.
when '0004'.
i_data-tranno = i_excel-value.
when '0005'.
i_data-msrpo = i_excel-value.
when '0006'.
i_data-mporel = i_excel-value.
endcase.
at end of row.
append i_data.
clear i_data.
endat.
endloop.
Maybe you are looking for
-
[o] Tour de Japan - Summer 2011
Dear Sony fans, This summer we plan do tour de Japan. It will be green / mobile tour on bicycles - like solar charger, mini laptops, Sony HD sport cam to daily upload on YouTube. We also want to document rising Japan after earthquake. We are searchin
-
Bex Query - Show rows from another characteristic
Hi Guys, I have a problem, I need to create a query to be displayed in Excel that shows accounting informacion by number, like this: Account Balance 12110201 1 USD 12110202 1 USD 12110204 1 USD That works so far, the problem
-
Hello everyone, We are an Algerian drilling company with a ECC6 SAP information system with 6 modules. We are currently under study for the integration of BI platform. Note: for our version EHP6 FOR SAP ERP 6.0 has two types: 1- SAP NETWEAVER 7.3 (Mi
-
Delete master file & versions fromhard drive ... completely!!!
I just bought a new iMac yesterday and imported 12,000 pictures on the hard drive. Strarted my clean up using delete master image and all version ... files gets transfered into the aperture trash! ... i empty the trash ... files STILL REMAIN ON MY HA
-
Converting .avi files to iDVD
First time using anything like this and I'm pretty lost in the dark. I downloaded some .avi files off of limewire. I'm planning to burn them to a dvd, or have them in at least something that quicktime can play. Is there anyway to do this? Basically I