Upload the excel file in oracle db through oracle forms
Hi all,
I want to upload the excel file in oracle db through oracle forms...I am new to oracle forms .
I have searched a lot but not getting exact solution
Is there anyone who will help me out with this .....
Any help will be appriciated
I'm trying to move data from excel into an Oracle forms field. This involves coping 2 columns of data cells in excel and pasting it into an Oracle forms field. I can get the date pasted into the Oracle forms field but there is a invisible character that separates the 2 columns of data coming from Excel. I do not know what this character is but it is causing the error 'Line 1 is invalid. Check forms'.
Any ideas how to get pass this?
Thank you
Similar Messages
-
FM to upload the Excel file to internal table
Hi
Is any FM available to upload the Excel file to internal table.
Thanks
AnbuHi
se this code
EXCEL to INTERNAL TABLE and then to APPLICATION SERVER
*& Report ZSD_EXCEL_INT_APP
REPORT ZSD_EXCEL_INT_APP.
parameter: file_nm type localfile.
types : begin of it_tab1,
f1(20),
f2(40),
f3(20),
end of it_tab1.
data : it_tab type table of ALSMEX_TABLINE with header line,
file type rlgrap-filename.
data : it_tab2 type it_tab1 occurs 1,
wa_tab2 type it_tab1,
w_message(100) TYPE c.
at selection-screen on value-request for file_nm.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ' '
CHANGING
file_name = file_nm
EXCEPTIONS
MASK_TOO_LONG = 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.
start-of-selection.
refresh it_tab2[].clear wa_tab2.
file = file_nm.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '10'
i_end_row = '35'
tables
intern = it_tab
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 it_tab.
case it_tab-col.
when '002'.
wa_tab2-f1 = it_tab-value.
when '004'.
wa_tab2-f2 = it_tab-value.
when '008'.
wa_tab2-f3 = it_tab-value.
endcase.
at end of row.
append wa_tab2 to it_tab2.
clear wa_tab2.
endat.
endloop.
data : p_file TYPE rlgrap-filename value 'TEST3.txt'.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*--- Display error messages if any.
IF sy-subrc NE 0.
MESSAGE e001(zsd_mes).
EXIT.
ELSE.
*---Data is downloaded to the application server file path
LOOP AT it_tab2 INTO wa_tab2.
TRANSFER wa_tab2 TO p_file.
ENDLOOP.
ENDIF.
*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
loop at it_tab2 into wa_tab2.
write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.
endloop. -
Need to upload the excel file having extension .XLSX
Hello,
I am not able to upload the excel file having extension .XLSX But i can upload the excel file having extension .XLS .
Please Guide me what are the changes i need to do... for uploading the excel file".XLSX".
Thanks.Hi,
What issue you are facing? Refer this document: Upload/Read .xlsx file in SAP Web Dynpro . You need to on Netweaver 712 to use the classes mentioned in this document.
Regards,
Kiran -
Uploading the EXCEL file in transaction QM02
Hi SAP Gurus,
I am uploading the EXCEL file in transaction QM02 >services for object >Create attachment. But after uploading it I am not able to find where it is stored
Best Regards,
Parag Save.hi
kindly refer [HERE |http://help.sap.com/erp2005_ehp_04/helpdata/EN/be/3fe63659241157e10000009b38f889/frameset.htm] for more details
regards
thyagarajan -
To upload a excel file to dB table through webdynpro ABAP
HI,
I am unable to upload a excel file directly by using func module "HR_KR_XSTRING_TO_STRING".
If file is in tab delimited then only, I am able to upload.
Suggest me if there are any other options to upload a excel file.Hi,
The below link gives you an explanation of how you can upload an excel file to web dynpro.
http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm
Kindly read go through the below link, as this issue have been brought up before
http://forums.sdn.sap.com/thread.jspa?threadID=1831838
Thanks and regards.
Edited by: Suraj Ravindran Nair on Feb 24, 2012 6:24 AM -
HI,
In my requirement i want to upload excel file and then i have to validate the belnr value present in the excel.How to do it.Can somebody help me with a sample codeHi,
Please use following FM,
TYPES : BEGIN OF t_text,
field(255) TYPE c,
END OF t_text.
DATA : lt_table TYPE TABLE OF t_text,
ls_table TYPE t_text,
p_file1 TYPE string.
PARAMETERS : p_file LIKE ibipparms-path OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
file_name = p_file
START-OF-SELECTION.
p_file1 = p_file.
CONDENSE p_file1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_file1 " File Path Name
filetype = 'ASC'
TABLES
data_tab = lt_table.
Thanks & Regards,
ShreeMohan -
Upload the excel File to the Internal Table
Hello Friends,
i wrote the source code like this,
iam getting the run time error can u tell where iam going wrong.
data : begin of itab occurs 3,
a type i,
b type i,
end of itab.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'D:\Siemens\asd.xls'
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 2
I_END_ROW = 3
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
write : / 'this is not executed'.
exit.
ENDIF.
loop at itab.
write : / itab-a,itab-b.
endloop.
and in excel file the data is
1 2
3 4
5 6Hi,
Currently in ur program, FM is returning the value but on getting the value 'EXIT, command is executed. This might be the cause of the problem.
Try like this:
data : begin of itab occurs 3,
a type i,
b type i,
end of itab.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'D:\Siemens\asd.xls'
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 2
I_END_ROW = 3
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC 0.
If sy-subrc ne 0.
write : / 'this is not executed'.
else.
loop at itab.
write : / itab-a,itab-b.
endloop.
ENDIF.
Thanks,
Parul. -
Problem in uploading xls/csv file with Email address through oracle forms
Dear all,
I've created an interface to upload data from xls
and csv files to database tables.
I'm sucessed in this. Now i'm facing an issue.
If the xls/csv file having Email address,the
upload activity is not working..junk characters is
getting stored.
I came to know that, xls .csv file having email
address with hiperlink. so this may cause the
issue (just guessing)..
we can't restrict users to upload email without
hiperlink.. so what is the alternative to do
this..
Email address
[email protected]
[email protected]
[email protected]
etc...Can you give some more information:
What versions of Forms, database, Java, browser are you using?
How are you uploading data? Please show us your code.
What do you mean by "email with a hyperlink"? -
Upload a excel file on the server
Hi
I am developing a Software and in that software in one module we have to upload the excel file on the serverand then loading in to the server Database.But i dont know howt to upload it on the server as i dont get any help from the net also...
Thanks in advance.....
Thanks
Sandeep Bhalwalhi
http://forum.java.sun.com/thread.jspa?threadID=518038&messageID=2471953love google
http://www.oop-reserch.com/index.html
http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=G2l&q=upload+file+and+store+into+database+in+jsp+with+example&btnG=Search&meta= -
I would like to upload a excel file using jsp
Hi,
I would like to upload the excel file using jsp in my netbeans ide. Please help.
I don Know what is the error in this jsp file. It is not showing any thing and the file is also not getting uploaded.
Please gothru the code below.
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="java.io.*" errorPage="err.jsp"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<html:rewrite page="/design.css" />" rel="stylesheet" type="text/css">
<title>Upload Page</title>
</head>
<body onKeyDown="DisablingBackFunctionality()" onLoad="DisablingBackFunctionality()">
<html:form action="download" >
<div style="position:absolute; left:100;top:200;">Select an excel File :<input type="file" name="uploadfile"></div>
<div style="position:absolute; left:190;top:250;"><input type="submit" name="Submit" value="Read"></div>
<div style="position:absolute; left:336;top:250;"><input type="reset" name="Reset" value="Clear"></div>
mainmenu
</html:form>
</body>
</html>
<%
String contentType = request.getContentType();
if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
DataInputStream in = new DataInputStream(request.getInputStream());
int formDataLength = request.getContentLength();
byte dataBytes[] = new byte[formDataLength];
int byteRead = 0;
int totalBytesRead = 0;
while (totalBytesRead < formDataLength) {
byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
totalBytesRead += byteRead;
String file = new String(dataBytes);
//out.println("<br> file :"+file);
String saveFile = file.substring(file.indexOf("filename=\"") + 10);
//out.println("<br> savefile :"+saveFile);
saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
//out.println("<br> now file1 :"+saveFile);
saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\""));
//out.println("<br> now file2 :"+saveFile);
//out.print(dataBytes);
String ext = "";
if (saveFile.indexOf(".") != -1) {
ext = saveFile.substring(saveFile.lastIndexOf("."));
int lastIndex = contentType.lastIndexOf("=");
//out.println("<br>lst index of"+lastIndex);
String boundary = contentType.substring(lastIndex + 1, contentType.length());
//out.println("<br> boundary"+boundary);
//out.println("<br> file :"+file);
int pos;
pos = file.indexOf("filename=\"");
//out.println("<br> now 0 :"+pos);
pos = file.indexOf("\n", pos) + 1;
//out.println("<br>now 1 :"+pos);
pos = file.indexOf("\n", pos) + 1;
//out.println("<br>now 2 :"+pos);
pos = file.indexOf("\n", pos) + 1;
//out.println("<br>now 3"+pos);
int boundaryLocation = file.indexOf(boundary, pos) - 4;
int startPos = ((file.substring(0, pos)).getBytes()).length;
int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
FileOutputStream fileOut = new FileOutputStream("D:\\" + saveFile);
//FileOutputStream fileOut = new FileOutputStream(saveFile);
//fileOut.write(dataBytes);
fileOut.write(dataBytes, startPos, (endPos - startPos));
fileOut.flush();
fileOut.close();
session.setAttribute("fil", saveFile);
//out.println("File saved as " +saveFile);
%>
<script type="text/javascript" >
function DisablingBackFunctionality()
var URL;
var i ;
var QryStrValue;
URL=window.location.href ;
i=URL.indexOf("?");
QryStrValue=URL.substring(i+1);
if (QryStrValue!='X')
window.location=URL + "?X";
</script>
Please let me know the result as soon as possible. Its my very urgent.
Thanking Yu,
Muthu Kumar.RNo.
Mylenium -
Hi All , validating the overlapped periods ,Uploading the xml file to sap
Hi All,
please provide me the logic for the following requirement: Its an urgent .
Upload Global exception periods via File:
A customized transaction will be created for uploading the global exception periods using
an excel file. User has to maintain the global exception periods in an excel sheet with the
below mentioned format and upload the file manually into the system. The global
exceptions are maintained at step of half hourly period with a factor value.
Please find the format followed for maintaining the global exception periods in the
excel sheet.
Date From Period From Date To Period To Factor value
06.02.2008 12 06.02.2008 14 1.2
07.02.2008 1 07.02.2008 2 1.4
07.02.2008 3 07.02.2008 4 1.2
07.02.2008 5 07.02.2008 6 1.6
07.02.2008 7 07.02.2008 8 1.1
Once user uploads the excel file and press execute button, file contents are downloaded
and the global exception periods are updated into ZLF_GEXCEPTION table. Please refer
the necessary table format for details.
During the upload of global exception periods, the periods are checked if it is overlapping
with the previously uploaded periods. For those overlapping periods, below method is
followed.
1. For e. g, If a below exception period is already uploaded,
Date From Period From Date To Period To Factor value
06.02.2008 12 06.02.2008 16 1.4
The new file contains the period which gets overlapped with the previous global
exception period.
Date From Period From Date To Period To Factor value
06.02.2008 14 06.02.2008 15 1.6
The overlapped periods are split accordingly,
Date From Period from Date to Period To Factor value
06.02.2008 12 06.02.2008 13 1.4
06.02.2008 14 06.02.2008 15 1.6
06.02.2008 16 06.02.2008 16 1.4
2.For e.g., Already existing period,
Date From Period From Date To Period To Factor value
06.02.2008 12 07.02.2008 16 1.3
New period,
Date From Period From Date To Period To Factor value
07.02.2008 5 07.02.2008 8 1.7
The Global exception periods are split into,
Date From Period From Date To Period To Factor value
06.02.2008 12 07.02.2008 4 1.3
07.02.2008 5 07.02.2008 8 1.7
07.02.2008 9 07.02.2008 16 1.3
If any error occurs while updating the global exception periods into ZLF_GEXCEPTION
table, then display LF-001 message given below the Error messages section. For the
successful updating of global exception periods to ZLF_GEXCEPTION table, then
display the message Successfully completed.
User will be provided an option to download the global exception periods into an excel
file. User has to provide the necessary location details where to download the file while
downloading.
Thanks&Regards.
BkHi All,
please provide me the logic for the following requirement: Its an urgent .
Upload Global exception periods via File:
A customized transaction will be created for uploading the global exception periods using
an excel file. User has to maintain the global exception periods in an excel sheet with the
below mentioned format and upload the file manually into the system. The global
exceptions are maintained at step of half hourly period with a factor value.
Please find the format followed for maintaining the global exception periods in the
excel sheet.
Date From Period From Date To Period To Factor value
06.02.2008 12 06.02.2008 14 1.2
07.02.2008 1 07.02.2008 2 1.4
07.02.2008 3 07.02.2008 4 1.2
07.02.2008 5 07.02.2008 6 1.6
07.02.2008 7 07.02.2008 8 1.1
Once user uploads the excel file and press execute button, file contents are downloaded
and the global exception periods are updated into ZLF_GEXCEPTION table. Please refer
the necessary table format for details.
During the upload of global exception periods, the periods are checked if it is overlapping
with the previously uploaded periods. For those overlapping periods, below method is
followed.
1. For e. g, If a below exception period is already uploaded,
Date From Period From Date To Period To Factor value
06.02.2008 12 06.02.2008 16 1.4
The new file contains the period which gets overlapped with the previous global
exception period.
Date From Period From Date To Period To Factor value
06.02.2008 14 06.02.2008 15 1.6
The overlapped periods are split accordingly,
Date From Period from Date to Period To Factor value
06.02.2008 12 06.02.2008 13 1.4
06.02.2008 14 06.02.2008 15 1.6
06.02.2008 16 06.02.2008 16 1.4
2.For e.g., Already existing period,
Date From Period From Date To Period To Factor value
06.02.2008 12 07.02.2008 16 1.3
New period,
Date From Period From Date To Period To Factor value
07.02.2008 5 07.02.2008 8 1.7
The Global exception periods are split into,
Date From Period From Date To Period To Factor value
06.02.2008 12 07.02.2008 4 1.3
07.02.2008 5 07.02.2008 8 1.7
07.02.2008 9 07.02.2008 16 1.3
If any error occurs while updating the global exception periods into ZLF_GEXCEPTION
table, then display LF-001 message given below the Error messages section. For the
successful updating of global exception periods to ZLF_GEXCEPTION table, then
display the message Successfully completed.
User will be provided an option to download the global exception periods into an excel
file. User has to provide the necessary location details where to download the file while
downloading.
Thanks&Regards.
Bk -
Can anybody help how to upload an excel file into sap-crm urgent
hi guys,
i need the right function module to upload the excel file from the presentation server in to sap-crm.
1) I know we use the function module 'ALSM_EXCEL_TO_INT_TABLE' in sap-r/3 but this function module is not exist in sap-crm.
2) i tried with the function moduel 'GUI_UPLOAD' but its not uploading correctly i am gettting hases(#).
Please can any one provide the right function module to upload the excel into sap-crm with an sample code.
thanks
viswa gunthaHi Visma,
Please check this link for sample custom FM.
Re: function mudule for MS excel file to sap crm
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful as away to say thanks. -
Storing an Excel File in the Oracle Table through Oracle Form (10g)
Hi,
We have the below requirement in the Oracle Forms (10g).
Database: 11g
Application: R12
We need to provide an upload functionality to the user, so that he can upload an excel file into the form (from the local system), this is achived.
Now what we need to do is that we need to capture the path of the document (in the local system) and we need to store the document in a Oracle table.
Next we need to validate the records that are being loaded and the error records should be written into one more file and that file also we need to store in an Oracle table, this is because, i need to query this error file from the table later and need to send to the user as an e-mail.
Basically i started off with the below code just for the POC. but iam facing the error. Please help. I did not put this code in my form.
Create Table Email_Attachments(Id_Pk Integer Primary Key,Fname Varchar2(50),Image Blob);
Create Or Replace Directory Temp As 'C:\';
Create Or Replace Procedure Load_File(Pi_Id In Integer, Pfname In Varchar2) Is
Src_File Bfile;
Dst_File Blob;
Lgh_File Binary_Integer;
Begin
Src_File := Bfilename('TEMP', Pfname);
Insert Into Email_Attachments (Id_Pk,Fname,Image)
Values (Pi_Id,Pfname, Empty_Blob())
Returning Image Into Dst_File;
Dbms_Lob.Open(Src_File, Dbms_Lob.File_Readonly);
Lgh_File := Dbms_Lob.Getlength(Src_File);
Dbms_Lob.Loadfromfile(Dst_File, Src_File, Lgh_File);
Dbms_Lob.Close(Src_File);
Commit;
End;
begin
Load_File(1,'test.txt');
end;
ERROR
ORA-22288: file or LOB operation FILEOPEN failed
No Such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 1014
ORA-06512: at "SYS.LOAD_FILE", line 10
ORA-06512: at line 2
How to capture the Path from which he has loaded the file?
How to Write the error records it to the file and store it in an Oracle table?
Will the below table be of use to me?
fnd_lobs_document
fnd_lobs
fnd_documents
Please share your ideas as to how to acheive this.
Thanks and Regards
SrinivasWhen you want to process the file, them it depends on the format. "Excel file" is a term that is used for a variety of file formats, mostly simple CSV, binary (true) XLS and XLSX.
So to get help you have to give us more information. Since the file is already in the db you might get better answers at {forum:id=75}. The forum has a FAQ that has a whole section {message:id=9360007}.
Regards
Marcus -
How to Upload the excel flat file in LSMW
Hi all,
Can any one plz Help me,
How to Upload a excel file format by suing the lsmw .
Regadrs.
[email protected]
Upender..
Edited by: Upender Reddy on Sep 12, 2008 8:37 AMHi,
In 7 th step of LSMW we need to specify the file ie flat file.
In this step you describe all files to be used in the following steps:
· Your legacy data on the PC and/or R/3 server
· The file for the read data
· The file for the converted data.
As your legacy data is on the PC: ie your excel file that is tab delimited or comma delimited.
here give ur file name, description , click data from one src structure, then delimiter is tabulator if so, in file structure click both check boxes if in ur flat file ur first row is column, file type is record end indicator, code page ASCII and conitnue that's it.
you can go through this link very useful :
****************/Tutorials/LSMW/LSMWMainPage.htm.
thanx. -
After uploading an excel file from Windows XP, impossible to read the file anymore
Hello,
I uploaded an excel file from my Imac to the Icloud. I could use it on my Ipad through Numbers without problem. I went on my laptop running with Windows XP, I didn't see the plugin to install, so I didn't do it. I download this excel file and worked on it. When I uploaded again this file, I could see the letter E written on the file on the Icloud, but impossible to download it and work on it anymore from any of my devices. I installed the missing plugin on the laptop but still, no improvements.
Any suggestions ?
Best regards.Hi Stephan,
You can do this using OLE technology. Bu you will have performance issues.
Can you check the below demo programs? It has similar functionality. I am able to create excel sheet from sap and also able to save the data in the sap.
SAPRDEMOEXCELINTEGRATION
SAPRDEMOEXCELINTEGRATION2
Please also check the below rograms for more help.
SAPRDEMOACTIVEXINTEGRATION
SAPRDEMODOCUMENTCONTAINER
SAPRDEMODOCUMENTCONTAINER2
Thanks
Ramakrishna
Maybe you are looking for
-
Kernal Panic on hard drive sleep after upgrade to OS X 10.7.5 Macbook Pro 2012
After I installed the update to OS X 10.7.5, there is a kernal panic whenever my hard drive goes to sleep. I have reinstalled the OS, reset the NVRAM, run permissions and disk repair from internet recovery mode and am still having the problem. Any su
-
Purchased AAC, unprotected, 128 kbps
iTunes 11 tells me some of my iTunes purchases are unprotected 256 kbps (Purchased AAC audio file), some are protected 128 kbps (Protected AAC audio file), and some are unprotected 128 kbps (Purchased AAC audio file). I thought all the unprotected tr
-
Restriction for the use of last_record in 10g forms
Hi, When I was working on Forms 6i with the query in the trigger When_new_form_instance: go_block('ABC'); execute_query; last_record; first record; go_block('DEF'); execute_query; last_record; first record; It worked and gave correct data on frontend
-
I am having problem in sending text SMS to Japan mobile phone while I am in Japan. I have tried to send a message to my own Singapore registered phone number and it is working well. Anyone out there can help me? The phone number which I do like to se
-
Mac mini G4 will not reboot after Onyx upgrade
DURING UPGRADE OF ONYX INSTRUCTED TO RUN REPAIR DISK FROM MAC OSX INSTALL DISK. SYSTEM WILL NOT REBOOT. ANY SUGGESTIONS?