2009 Aug 27 12:01 PM
Hi Friends,
I M uploading EXEL file from presentation to application server.
but in the transaction AL11 when i double click the file path ,i can not see the EXEL data. it is appearing the dump data. that way, i m finding the dump data in internal table also . what can i do for uploading EXEL file to application server.
please help me.
Thanks,
Rohini
2009 Aug 27 12:03 PM
2009 Aug 27 12:03 PM
2009 Aug 27 12:04 PM
Hi ,
What is the file format you are trying to write to the application server.?
Sudheer. A
2009 Aug 27 12:07 PM
Thanks for ur reply friend
I m using cg3z only to upload EXEL file to application server... But I M not finding proper data When double click On the file pathe in AL11 Transation.
thanks,
Rohini
2009 Aug 27 12:19 PM
Hi
I dont think you would get that. Its better to convert the excel to CSV format and then upload. It works good also when you read the same file from a program.
Thanks
Sourav
2009 Aug 27 12:21 PM
Hi
I dont think you would get that. Its better to convert the excel to CSV format and then upload. It works good also when you read the same file from a program.
Thanks
Sourav
2009 Aug 27 12:19 PM
Hi,
Use ALSM_EXCEL_TO_INTERNAL_TABLE to move from Excel to Internal table.
Work with Open DATASET , and move internal table data to application server path.
If data is there in your internal table , then this must work , check the syntax from help .
TC
Sajimon Chandran
2009 Aug 27 12:45 PM
hi,
Using tcode CG3Y, I think only two types of files can be uploaded to application server ie.BIN file format,ASC file format.
So try to save excel file into csv file format and then try uploading.
Regards,
MMJaffer.
2009 Aug 27 12:48 PM
hai rohini
To upload excel file to AL11 Please refer to the given below code:
data : if_intern type kcde_cells occurs 0 with header line.
data : vf_index type i.
data : vf_start_col type i value '1',
vf_end_col type i value '256'.
field-symbols : <fs>.* ----------- " Define Internal tables for ABAP.
data: begin of i_mat OCCURS 10,
empc(5),
name(12),
Age(3),
end of i_mat.
* ----------- " Define data variables for ABAP.
* " Define data variables for Excel Upload.
data: p_text type natxt.
data: dataset(150) type c.:* ----------- " Selection-Screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
parameters: p_file2 type rlgrap-filename,
p_brow2 type i,
p_erow2 type i.
SELECTION-SCREEN END OF BLOCK B1.
* ----------- " At Selection- screen.
at selection-screen on value-request for p_file2.
call function 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
CHANGING
file_name = p_file2.
* ----------- " Start of ABAP SQL Commands
START-OF-SELECTION.
* dataset = '/tmp/new.xls'.
dataset = '/tmp/new.xls'.
if rg1 = 'X'.
if p_file2 is not initial and
p_brow2 is not initial and
p_erow2 is not initial.
call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_filename
i_begin_col = vf_start_col
i_begin_row = p_brow2
i_end_col = vf_end_col
i_end_row = p_erow2
TABLES
intern = if_intern.
if if_intern[] is initial.
p_text = 'No Data Uploaded'.
else.
sort if_intern by row col.
loop at if_intern.
move : if_intern-col to vf_index.
assign component vf_index of structure p_download to <fs>.
move : if_intern-value to <fs>.
at end of row.
append p_download.
clear p_download.
endat.
endloop.
endif.
delete dataset dataset.
open dataset dataset for output in text mode encoding default.
loop at i_mat.
if sy-subrc eq 0.
transfer i_mat to dataset.
endif.
endloop.
close dataset dataset.
2009 Aug 27 2:55 PM
HI shelly
thanks for helping
if you dont mind please tell me ..... what is "p_download" i.e, structure , variable or internal table.
thanks ,
Rohini
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |