2005 Aug 05 9:20 AM
Hi,
How to upload Outlook Addressbook into SAP?
any sample code is appreciated.
Thanks for your reply,
cg
2005 Aug 05 9:30 AM
Hi!
FM GUI_UPLOAD is a good start - just where would you like to store the data?
Regards,
Christian
2005 Aug 05 9:30 AM
Hi!
FM GUI_UPLOAD is a good start - just where would you like to store the data?
Regards,
Christian
2005 Aug 05 9:47 AM
some where in database...
it would be great if u provide some sample code...
thanks
cg
2005 Aug 05 10:17 AM
Hi,
define a structure like you expect the fields (and here might be the problem), then just do
call function 'GUI_UPLOAD'
exporting
filename = 'D:downloadaddress.csv'
filetype = 'ASC'
has_field_separator = 'X'
tables
data_tab = gi_address
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
others = 17.
if sy-subrc <> 0.
message e398(00) with sy-subrc.
endif.
Then you have the file in SAP - it's just a question of data preparation in beforehand.
Regards,
Christian
2005 Aug 05 2:20 PM
Ok,
then for downloading outlook to SAP?
should i use "GUI_download" function?
if you have ,can u send me some sample code..
Thanks
cg
2005 Aug 09 12:03 PM
Hi,
if it is of some help:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:downloadaddress.csv'
filetype = 'ASC'
write_field_separator = 'X'
write_lf = 'X'
TABLES
data_tab = gi_address
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.
I still think, your main problem is to bring the data into a simple format, which can be saved as table. Looks like this part makes you no problems.
Regards,
Christian