‎2010 Mar 25 9:34 AM
Hi all,
I am working with service master data upload.In that one i need to upload the LONG TEXT.
In Excel file i am using text wrap but using the ALSM_EXCEL_TO_INTERNAL_TABLE i am uploading
the data but after using this i am getting only 40char data of the long text cell.
does any other function module to upload the long text.
Regards,
MOHD.
‎2010 Mar 25 9:47 AM
Hi try GUI_DOWNLOAD
data: lv_file type string.
concatenate full_path '.xls' into lv_file.
call function 'GUI_DOWNLOAD'
exporting
filename = lv_file
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
confirm_overwrite = 'X'
tables
data_tab = gt_main ---> internal table
fieldnames = i_final ---> fieldheading in excel
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.
if sy-subrc <> 0.
write: 'Error: The records are not downloaded to the specified file'.
else.
write: 'The records are downloaded to the specified file in the path', lv_file color col_key.
endif.
form xl_heading .
types:
begin of type_final,
string(50) type c, " String Value for Title
end of type_final.
data: wa_final type type_final.
data: i_final type standard table of type_final.
wa_final-string = 'Document Type'.
append wa_final to i_final.
wa_final-string = 'Document Date'. append wa_final to i_final.
wa_final-string = 'Company code'. append wa_final to i_final.
Thanks & Regards,
Vallamuthu.M
‎2010 Mar 25 10:09 AM
‎2010 Mar 25 10:51 AM
Convert to CSV, upload data, use SPLIT command to separate the columns.
‎2010 Mar 25 11:35 AM
Hi Abdul,
Are you sure you are retreaving LONG TEXT ,I doubt you might be retreaving SHORT TEXT instead. Please check your code.
Regards,
Smart Varghese
‎2010 Mar 25 11:54 AM
I think Smart is on the right track... In some transactions, the first 40 characters of text appear on screen, then there's a button or something that navigates to the long text... and there's an indicator in the table that long texts exist.
So, yes, one would populate the 40-characters, then use the appropriate TEXT function modules to store, update, etc., long texts, and then one must get that long-text indicator switch turned on.
Check and see if this is the case for the data to be loaded...
‎2010 Apr 12 12:28 PM
solved by my self with using string and using the offset i placed the long text into ID.