Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UPLOAD file

Former Member
0 Likes
554

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.

4 REPLIES 4
Read only

Former Member
0 Likes
511

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

Read only

Former Member
0 Likes
511

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

Read only

vinod_vemuru2
Active Contributor
0 Likes
511

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.

Read only

Former Member
0 Likes
511

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 .