Upload xls file issue
HI Experts , i am uploading data from xls file , the problem is that if the xls file is in edit mode , the system goes in indefinite loop or hang state , is there any way or function module to determine whether the xls file is being edited or open .
Thanks in advance.
are you using Function Module for this? If yes, just uncomment the exceptions, problem will be solved, i suppose.
Regards,
Sam
Similar Messages
-
Upload .xls file in internal table in web dynpro abap
Hi everyone,
i want to upload .xls(excel file) into an internal table.....after lots of attempts i came to a conclusion that web dynpro only supports .CSV(another format of excel file) to be uploaded into internal table....i tried many ways....is there a way i can upload .xls file...kindly help me in the same. following is the code i m using
DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
DATA ITEM_FILE TYPE WD_THIS->ELEMENT_CONTEXT-EXCEL_UPLOAD.
get element via lead selection
LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
@TODO handle not set lead selection
IF LO_EL_CONTEXT IS INITIAL.
ENDIF.
get single attribute
LO_EL_CONTEXT->GET_ATTRIBUTE(
EXPORTING
NAME = `EXCEL_UPLOAD`
IMPORTING
VALUE = ITEM_FILE ). "xstring format
DATA S_CONT TYPE STRING.
DATA CONVT TYPE REF TO CL_ABAP_CONV_IN_CE.
DATA: FIELDS1 TYPE STRING_TABLE.
1st tried this code-> using "cl_abap_conv_in_ce"
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
*encoding = c_encoding "optional
input = ITEM_FILE
RECEIVING
conv = CONVT.
CALL METHOD CONVT->read
IMPORTING
data = S_CONT.
when it didnt work out...then tried followin function module
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
IN_XSTRING = ITEM_FILE "xsrting
IMPORTING
OUT_STRING = S_CONT
TYPES: BEGIN OF TY_TAB,
NAME_CHAR TYPE STRING,
DESCR_CHAR TYPE STRING,
NUMBER_DIGITS TYPE STRING,
END OF TY_TAB.
DATA: FIELDS TYPE STRING_TABLE.
DATA: LV_FIELD TYPE STRING.
DATA: S_TABLE TYPE STRING_TABLE.
DATA: ITAB TYPE TABLE OF TY_TAB.
DATA: STR_ITAB TYPE TY_TAB.
*splits string based on new line
SPLIT S_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE S_TABLE.
FIELD-SYMBOLS: <WA_TABLE> LIKE LINE OF S_TABLE.
LOOP AT S_TABLE ASSIGNING <WA_TABLE>.
splits string on basis of tabs
SPLIT <WA_TABLE> AT ',' INTO
STR_ITAB-NAME_CHAR
STR_ITAB-DESCR_CHAR
STR_ITAB-NUMBER_DIGITS.
APPEND STR_ITAB TO ITAB.
ENDLOOP.
I am able to do the uploading if the file is in .CSV format and not .XLS format....
there are lots of forums on SDN for the same....but at the end there is no solution provided.....
experts kindly solve it this time...thanks in advanceHi,
It is not possible to upload an xls file because it will be having some binary characters. better to go with .csv file format.
Refer this [link too|Re: Excel File Uplaod] it will explain you clearly.
Regards
Arun.P -
Cannot upload xls file in a Document in SAP DMS
Hello Guru,
I have tried to upload a excel file in an existing Document AA00-0123 in both SAP Easy DMS and GUI both i was now able to upload the file having same error message telling "An error occured while creating the original attribute for" how can i upload this excel file to my DMS document? please help.
ThanksHi,
1) R U able to upload any other file type to the DIR AA00-0123 (word/ppt/pdf etc) ?
2) Can u Create a new DIR and try uploading the same excel file? does that get created?
once u do the above just let me know.
Regards
Abhishek
Edited by: AAYNI_AK on Nov 11, 2011 11:33 AM -
Upload XLS File, Loop through rows query a DB
What I would like to do is enable the user to upload an excel
spreadsheet with one column and many row of IP's. Then put the ips
in a list or array and loop through the list and query a table to
get the IPs that match the list.
Any help would be greatly appreciated.We have some similar apps except that, instead of uploading a
file, the users copy and paste the column into a text area. Then we
do this:
<!--- First, replace carraige returns (chr(13)) and line
feeds (char(10)) with commas --->
<cfset
hscnumbers=Replace(form.hscnumbers,chr(13)&chr(10),",","ALL")>
<!--- remove last comma, if commas exist (there may be
only one hsc number) --->
<cfif find(",", hscnumbers) gt 0 and right(hscnumbers, 1)
is ",">
<cfset hscnumbers = left(hscnumbers, len(hscnumbers) -
1)>
</cfif>
And then we have a list to send to the db. -
Upload xls file in application server
Dear ALL
I have a requirement in which I need to create Excel file on SAP
Application Server using OPEN DATASET command. As I have to run the program and create the file in background mode, I can't use 'WS_DOWNLOAD' or 'DOWNLOAD' functions. When I can create the file with .xls addition on the application server,
all the fields in the file appear in the same column. How can place them in different columns as one field in one Excel cell?Hi,
Yes you can try doing like,
DATA: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
itab1-f1 = 'AA'. itab1-f2 = '01'. APPEND itab1.
itab1-f1 = 'BB'. itab1-f2 = '02'. APPEND itab1.
itab1-f1 = 'CC'. itab1-f2 = '03'. APPEND itab1.
itab2-f1 = 'ZZ'. itab2-f2 = '26'. APPEND itab2.
itab2-f1 = 'YY'. itab2-f2 = '25'. APPEND itab2.
LOOP AT itab1.
CONCATENATE itab1-f1 itab1-f2 INTO objbin1 separated BY c_tab.
CONCATENATE c_ret objbin1 INTO objbin1.
APPEND objbin1.
ENDLOOP.
LOOP AT itab2.
CONCATENATE itab2-f1 itab2-f2 INTO objbin2 separated BY c_tab.
CONCATENATE c_ret objbin2 INTO objbin2.
APPEND objbin2.
ENDLOOP.
LOOP AT objbin1.
MOVE objbin1-line TO objbin_final-line.
APPEND objbin_final.
ENDLOOP.
And then you can use open dataset and transfer statements to download internal table data in AS.
Hope it helps
Regards
Mansi -
I upgraded to DW CS3 and now when I try to upload a flv file,
it says it can't complete it and the file isn't updated. I go back
to my old version of DR8 and it works just fine. When I synchronize
in CS3 it will tel me that files need to be updated, but when I try
to do it, it says it can't complete. Why? This doesn't happen EVERY
time though which makes it even harder to figure out. I tried
deleting the version on the server, but it still won't upload the
new version. How am I supposed to update my site and get the new
files up? I make a lot of changes to the site, then synchronize
it.That is the only way to be sure I haven't missed some files. Can
someone tell me why it works ok in DW8 but not in CS3? Is there a
setting somwhere I need to change? Thanks for any help.
LarryWelcome to our community, Leslie
I'm thinking that what's happening here is the LMS simply
doesn't recognize that the .FLVs should be included. So I'm
wondering if the following workaround would work for you. When you
insert the FLV reference, code an absolute path. For example, lets
say the LMS serves the Captivate up and the logical path is
http://www.somesite.com/training/CaptivateMovie.htm.
Maybe you store all the .FLV files in this locaton:
http://www.somesite.com/training/videos.
So you would then code the link to your FLV to use that explicit
path of
http://www.somesite.com/training/videos/MyVideo.FLV.
I'm not 100% sure this will work, but I can't really fathom a
reason it shouldn't.
Cheers... Rick -
Upload excel file (xls) into internal table in SRM 4.0
Hi experts!
I need upload a xls file into internal table (in ABAP report) in EBP machine for i work with data in the sheets. Can you help me?
Best Regard!Hi Zeky,
Try GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES
or FM ALSM_EXCEL_TO_INTERNAL_TABLE
Please look at this threads too:
/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table
Upload XLS file from Application server into internal table.
Regards,
Marcin Gajewski
please reward points for helpful answers -
Problem in uploading a file using Ws_upload.
Hi Experts,
I am using WS_UPLOAD for uploading .xls file into SAP Standard table T558A.
Problem is file is not uploaded to DB table.....getting error like
ERROR DURING FILE UPLOAD/DOWNLOAD as pop up message.....
can any boady please help on this issue.
Regards,
Praveena.Hi,
If you want to upload the data using EXCEL file use the function module ALSM_EXCEL_TO_INTERNAL_TABLE.
Examples for ALSM_EXCEL_TO_INTERNAL_TABLE.
http://wiki.sdn.sap.com/wiki/display/Snippets/Howtouse+FM'ALSM_EXCEL_TO_INTERNAL_TABLE' -
How to open XLS file without Authentication
Hi All,
We are using SRM and we use SAP EP for accessing the SRM Screens. When we are creating a shopping cart there is a option for uploading files and we upload xls file there. The issue we are facing here is whenwe view the shopping cart, there is a link for the uploaded XLS file. When we click on this file the portal ask for user id and password, when we click on the cancel button the xls file gets opened. But whereas the userid and password screen is not appearing for the word document.
Is there any settings which needs to be done for bypass the userid, password screen to open the xls file.
Thanks and Regards,
Saravanan
Edited by: Saravanan Sugumar on Aug 1, 2011 12:45 PMI think the only way you're going to be able to do this in
Flex is to process the file on the server side using something like
the Perl Win32::OLE module to open the file from a Perl script, and
access the data, place it in an XML structure, and deliver it to
Flex, all via HTTPService.
Here is a little sample code to get you started: -
Problem reading .xls file from App Server
Hi Everyone......
I hope this might be a common problem but i searched for similar problem......i did'nt find the solution my problem is
I'm trying to download .xls(excel file data into an internal table using OPEN DATASET FOR INPUT IN TEXT MODE ENCODING DEFUALT and read dataset for reading it).But in the read dataset syntax all stange values like **$#@&&& are getting uploaded???? I dont now why......
Is it happing because i'm trying to upload .XLS file ???
My coding is as follows...........
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
IF sy-batch IS INITIAL.
MESSAGE i001(zz) WITH 'Error opening file for upload'.
EXIT.
ELSE.
MESSAGE s001(zz) WITH 'Error opening file for upload'.
EXIT.
ENDIF.
ENDIF.
*First Uploading the data into structure
DO.
READ DATASET p_file INTO l_wa_tab. "My internal table work area
IF sy-subrc = 0.
APPEND l_wa_tab TO l_tab.
ELSE.
EXIT.
ENDIF.
ADD 1 TO count.
ENDDO.
CLOSE DATASET p_file.
Any solution for above problem.........Hi,
Check whether path ur providing to the open data set stmt is correct or not in debugging mode.
* File upload to internal table from UNIX Directory
IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.
CONCATENATE p_path p_i1file INTO v_file.
CONDENSE v_file.
OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
IF sy-subrc EQ 0.
WRITE: / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
DO.
CLEAR tbl_input.
READ DATASET v_file INTO tbl_input.
IF sy-subrc NE 0.
EXIT.
ELSE.
APPEND tbl_input.
ENDIF.
ENDDO.
* Close Input File
CLOSE DATASET v_file.
ELSE.
WRITE:/'Error uploading file: '(008),v_file.
STOP.
ENDIF.
ENDIF.
It should work.check the sy-subrc value and file value in debug mode.
Thanks
Parvathi -
Converting '.xls' file to '.txt' in BDC Session method
Hi gurus,
Happy DIWALIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII------',','
Please help me in converting '.xls' file to '.txt' in BDC Session method. Is there is any method or function module for this conversion. Please help me with coding.
Thanks and regards,Hi
File->save as -> Save as type ( text tab delimted.txt) ->Click on yes .
Now open .txt file -> here data will be tab delimted.
genrally i use tab delimted file to upload the data.
Even if you want to programtically then get the data from xls file to Internal table,now use concatenate with comma ,now download it.
Check the below program :
Upload xls file and you can see .txt file ( with comma delimted)
Input ( XLS file )
aaa 1245 2344 233 qwww
233 2222 qwww www www
Output ( .txt file with comma delimted)
aaa,1245,2344,233,qwww
233,2222,qwww,www,www
REPORT ZFII_MISSING_FILE_UPLOAD no standard page heading.
data : begin of i_text occurs 0,
text(1024) type c,
end of i_text.
Internal table for File data
data : begin of i_data occurs 0,
field1(10) type c,
field2(10) type c,
field3(10) type c,
field4(10) type c,
field5(10) type c,
end of i_data.
data : begin of i_download occurs 0,
text(1024) type c,
end of i_download.
data : v_lines type sy-index.
data : g_repid like sy-repid.
data v_file type string.
data: itab like alsmex_tabline occurs 0 with header line.
data : g_line like sy-index,
g_line1 like sy-index,
$v_start_col type i value '1',
$v_start_row type i value '1',
$v_end_col type i value '256',
$v_end_row type i value '65536',
gd_currentrow type i.
selection-screen : begin of block blk with frame title text.
parameters : p_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
g_repid = sy-repid.
at selection-screen on value-request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = g_repid
IMPORTING
FILE_NAME = p_file.
start-of-selection.
Uploading the data into Internal Table
perform upload_data.
download the file into comma delimted file.
perform download_data.
*& Form upload_data
text
--> p1 text
<-- p2 text
FORM upload_data.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = $v_start_col
I_BEGIN_ROW = $v_start_row
I_END_COL = $v_end_col
I_END_ROW = $v_end_row
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
write:/10 'File '.
ENDIF.
if sy-subrc eq 0.
read table itab index 1.
gd_currentrow = itab-row.
loop at itab.
if itab-row ne gd_currentrow.
append i_data.
clear i_data.
gd_currentrow = itab-row.
endif.
case itab-col.
when '0001'.
first Field
i_data-field1 = itab-value.
second field
when '0002'.
i_data-field2 = itab-value.
Third field
when '0003'.
i_data-field3 = itab-value.
fourth field
when '0004'.
i_data-field4 = itab-value.
fifth field
when '0005'.
i_data-field5 = itab-value.
endcase.
endloop.
endif.
append i_data.
ENDFORM. " upload_data
*& Form download_data
text
--> p1 text
<-- p2 text
FORM download_data.
loop at i_data.
concatenate i_data-field1 ',' i_data-field2 ',' i_data-field3 ','
i_data-field4 ',' i_data-field5 into i_download-text.
append i_download.
clear : i_download,
i_data.
endloop.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME =
'C:\Documents and Settings\smaramreddy\Desktop\fff.txt'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = i_download
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " download_data
Regards
Pavan -
Webutil - issue with uploading text files with client_get_file_name
Hi,
I'm using webutil client_get_file_name to upload files from the client machine to the server.
It works fine for xls,pdf,doc files etc. but not for txt files it seems.
It doesn't display any error at all either.
Has anyone seen this type of issue before?
Kind regards,
Tom
Windows XP
Forms v10.1.2.0.2Hi Sarah et al,
The code that I'm using to upload any file type format is:
vfilename := client_get_file_name('c:\',file_filter => 'All files (*.*)');
it works for doc/pdf/xls/rtf/csv etc.
but not for text files i.e. .txt
Also, could someone tell me how to open a .msg (Outlook message) file
as it gives the output:
'Cannot read item' upon the opening of the Outlook application.
I'm using the following to try and open it:
CLIENT_HOST( 'cmd /C start '||p_filename);
Your help would be appreciated.
Kind regards,
Tom -
Upload a .xls file in web dynpro abap
Hello,
I want to upload a .xls file into a internal table in web dynpro abap (Netweaver 7.31).
The file is not delimited, is not an csv file.
In my view I have an fileUpload UI Element with the attribute data is un attribute type XSTRING and the following function module are not in my system:
HR_KR_XSTRING_TO_STRING
ALSM_EXCEL_TO_INTERNAL_TABLE
How can I upload the file with this format?.
Thanks in advance.
XaviUnless the files are zipped together into one archive file, you have to do them one at a time. Furthermore with the normal browser based fileUpload UI element, you must do them one at a time and the user must manually select each one (browser security limitation).
If you are on 7.01 you can use ACFUpDown to perform multiple file uploads, but there is no file dialog or directory scan so file selection is difficult.
If you are on 7.02 you can use ACFUpdown and it has a multiple file open/save dialog.
If you are on 7.01 you could use FlashIslands to perform the multiple file upload. I have a tutorial and source code sample for this on SCN.
If you are on 7.01 you could also use ACFExecute to run a batch script on the client side that zips all the files and then upload the zip archive. -
Urgent: Issue with the size of an xls file generated from a rtf template
Hi all,
I have a template.rtf
In BI, when I get the file in excel format and save it, the size of the report is 32 MB. When I just "save as" the same report, without changing anything, the size of the report is 8 MB.
Do you know how to get directly the report with the size 8 MB or would you have some guidelines to avoid this issue.
Thank you in advance,
Sonia.Thank you Kurz for your answer. I'm going to try to be more precise.
Actually I'm not in EBS. I generate the output (xls format) direclty from BIP.
The DB of my application can't be requested directly, then I use HTTP request.
From BIP, I launch the report choosing excel as output - the template is an rtf template.
I have been requested to open or save the xls file that I save (32 MB).
I open the excel file, save it again and the size of the file is now 8 MB.
Regards,
Sonia. -
iTunes Match has stopped uploading - every file errors and says waiting - I have tried to delete the files and use other formats etc. I have had the service since Day 1 and NEVER had an issue. It didn't start until the Delete from Cloud switch to Hide from cloud - the files that do not upload show grayed out on my other devices.
Have you confirmed that you successfull purged iTunes Match by also looking on an iOS device? If so, keep in mind that Apple's servers may be experiencing a heavy load right now. They just added about 19 countries to the service and I've read a few accounts this morning that suggests all's not running perfectly right now.
Maybe you are looking for
-
Need help!!!!!! I've forgotten my security questions. My rescue address is not available anymore. So I can't get the instructions to reset my security questions. <E-mail Edited by Host>
-
Hi all, Urgent - Issue -XI upgrade to NW2004s - PI 7.0 reg,
-
Error in Posted document of Depreciation.
Hi Before running the depreciation with no error in test run, after the deperciation run. when we are checking the same in AFBP (Posted Log), it is showing error in some posted document. If anyone have some idea of it please share with me. thanks in
-
Solaris Container Manager 3.6.1 , unable to select newly plumbed interfaces
Hi everyone, I was wondering if anybody experienced this with SCM.. For a new zone I want to have a dedicated network interface qfe0. The manual says you have to plumb it first or else you won't be able to select it when you create a new zone via SCM
-
get an unknown error message when i try to make purchases with my apple ID. How can I fix this?