2016 Feb 16 9:44 AM
Hi,
I have read in multiple threads that GUI_UPLOAD allows you to upload data more than 256 chars unlike other function modules.
But when I am trying to use GUI_UPLOAD, it is fetches only characters till 256th character. I want to upload a long text which spans about 4000 characters.
Could you please help me as to how to use GUI_UPLOAD for this?
Thank you.
Regards,
Gayatri
2016 Feb 16 6:52 PM
Greetings,
In the debugger, change the mode of your table. You should be able to see all the characters, though the system will only show limited number of characters (I guess only certain number of lines).
Hope this helps.
Happy Coding!!!
Cheers
Naavy
2016 Feb 16 9:54 AM
2016 Feb 16 9:58 AM
My code works is executed properly. Just that, this FM does not upload input of more than 256 characters.
This is how I am calling it:
Input = CSV File
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = g_fname
filetype = 'ASC'
has_field_separator = 'X'
CHANGING
data_tab = i_table
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.
2016 Feb 16 10:02 AM
2016 Feb 16 10:15 AM
2016 Feb 16 10:09 AM
Try this:
You will need to parse the result in your program:
I use this code to UL XML file:
2016 Feb 16 11:50 AM
Hi Eitan,
This results in the error "bad_data_format" with sy-subrc = 8.
2016 Feb 16 11:58 AM
2016 Feb 16 3:53 PM
Hello Gayatri,
Please refer below steps for more than 256 char.
Step 1 .FM to convert String to xstring. (HR_KR_STRING_TO_XSTRING)
Step2 . FM to convert xstring to binary. (SCMS_XSTRING_TO_BINARY)
add the binary content in attachment and upload it via gui_upload
2016 Feb 16 6:52 PM
Greetings,
In the debugger, change the mode of your table. You should be able to see all the characters, though the system will only show limited number of characters (I guess only certain number of lines).
Hope this helps.
Happy Coding!!!
Cheers
Naavy
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |