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

Query in Function Module!!!!

Former Member
0 Likes
680

Hi all,

Can anyone please tell me any Function Module in CRM which would help me in uploading data from an Excel sheet into an Internal Table.

I used the FUnction Module 'GUI_UPLOAD" but ia m able to upload data into the Internal Table only from a Notepad and not from an EXCEL sheet .

Kindly guide me on the above immediately as this is bit urgent.

Regards,

Vijay

5 REPLIES 5
Read only

Sm1tje
Active Contributor
0 Likes
660

did you use BIN format instead of ASC???

Read only

Former Member
0 Likes
660

Hi Micky Oestreich ,

Thanks a ton for your reply. I tried using BIN as suggested by you but I am getting some data into the Internal table which I am not able to read.

Please find my code below:

CALL METHOD cl_gui_frontend_services=>gui_upload

EXPORTING

filename = l_filename

filetype = 'BIN'

has_field_separator = space

CHANGING

data_tab = itab_upload

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

not_supported_by_gui = 17

error_no_gui = 18

OTHERS = 19.

itab_upload contains seven fields which are all characters.

Kindly help me to resolve the above issue.

Please reply immediately as this is bit urgent.

Regards,

Vijay

Read only

Former Member
0 Likes
660

Hi,

Try after converting the XLS file to a CSV format and pass the export parameter "has_field_separator " with value "," (comma).

Thanks,

Greetson

Read only

Former Member
0 Likes
660

hi use the function module ALSM_EXCEL_TO_INTERNAL_TABLE

regards,

venkat.

Read only

0 Likes
660

That's the one I used in the past as well, but now I always get a pop-up (since Windows Vista and New office version), saying that the version differs??? So I try to avoid using this function module. But normally it should work the way you are saying.