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

Read file from client, problem with file size.

vladimirs_semikins
SAP Champion
SAP Champion
0 Likes
414

Hello!

I have a question regarding "read file from client".

I'm using this code:


types: begin of lty_itab,
        line type string,
       end of lty_itab .
data: lt_itab type table of lty_itab.

  call method cl_gui_frontend_services=>gui_upload
     exporting
       filename                = p_pfnam
     changing
       data_tab                = lt_itab
     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.

In a result lt_itab was populated with data from file, but with limited size CString. How can I fix that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
382

Hi,

change the structure to

types: begin of lty_itab,

line(30000) type c,

end of lty_itab .

data: lt_itab type table of lty_itab.

The data will populate correctly.

regards,

nazeer

Hello!

I have a question regarding "read file from client".

I'm using this code:


types: begin of lty_itab,
        line type string,
       end of lty_itab .
data: lt_itab type table of lty_itab.

  call method cl_gui_frontend_services=>gui_upload
     exporting
       filename                = p_pfnam
     changing
       data_tab                = lt_itab
     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.

In a result lt_itab was populated with data from file, but with limited size CString. How can I fix that?

1 REPLY 1
Read only

Former Member
0 Likes
383

Hi,

change the structure to

types: begin of lty_itab,

line(30000) type c,

end of lty_itab .

data: lt_itab type table of lty_itab.

The data will populate correctly.

regards,

nazeer