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

long text uploadin problem

abdulgaffarmohd
Participant
0 Likes
768

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.

6 REPLIES 6
Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
729

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

Read only

0 Likes
729

i am taking about upload from presentation server to sap .

Read only

0 Likes
729

Convert to CSV, upload data, use SPLIT command to separate the columns.

Read only

Former Member
0 Likes
729

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

Read only

0 Likes
729

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...

Read only

abdulgaffarmohd
Participant
0 Likes
729

solved by my self with using string and using the offset i placed the long text into ID.