‎2008 May 12 4:08 PM
Hi all,
I have a table that contains 28 fields and about 300 chars length of a record.
And when I have downloaded this table data to a excel and from excel saved it as text tab delimited, then want to upload it via Upload function but it did not do all of the fields.
What is the problem?
Thanks.
‎2008 May 12 4:13 PM
Check out the below links ... Hope these might help you ..
http://www.sapdev.co.uk/file/file_upexcelalt1.htm
http://www.sapdev.co.uk/file/file_upexcelalt2.htm
Regards,
Santosh
‎2008 May 12 4:13 PM
Which Function Module did you use?
If you have used GUI_UPLOAD, did you pass 'X' to the parameter HAS_FIELD_SEPARATOR?
Regards,
Ravi Kanth Talagana
‎2008 May 12 4:16 PM
Hi Deniz,
First check whether all the fields got downloaded to excel file and from excel to text file or not. Which FM u are using for download. U can use GUI_DOWNLOAD for downloading to excell file. Pass # in field seperator of this FM.
If u are downloading from table output then u can directly download to tab delimited file.
Use FM GUI_UPLOAD to upload the file.
Also check whether ur internal table has sufficient length to accomodate all the fields. How many fields u have in ur upload and download internal tables. It showld be 28 in both cases and field length and type should also be same.
Check these things and revert in case still u have problems.
Thanks,
Vinod.
‎2008 May 12 4:20 PM
hi check this....
REPORT ZTESTPROG003.
TYPES:
BEGIN OF ty_upload,
matnr like mara-matnr,
meins like mara-meins,
mtart like mara-mtart,
mbrsh like mara-mbrsh,
END OF ty_upload.
DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH header line.
DATA wa_upload TYPE ty_upload.
DATA: itab TYPE STANDARD TABLE OF alsmex_tabline WITH header line.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = 'C:\Documents and Settings\venkatapp\Desktop\venkat.xls'
i_begin_col = 1
i_begin_row = 1
i_end_col = 4
i_end_row = 65535
TABLES
intern = itab.
if not itab[] is initial.
loop at itab .
case itab-col.
when '0001'.
it_upload-matnr = itab-value.
when '0002'.
it_upload-meins = itab-value.
when '0003'.
it_upload-mtart = itab-value.
when '0004'.
it_upload-mbrsh = itab-value.
append it_upload.
clear it_upload.
clear itab.
endcase.
endloop.
endif.
regards,
venkat .