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

String variable truncated - ECC6

Former Member
0 Likes
489

Hello Experts,

I'm using a string variable to save the filepath. The problem is that when the filepath is longer than 132 characters, the variable gets truncated.


DATA: baja TYPE String.
DATA: lv_path TYPE STRING,
      lv_long TYPE i,
      lv_tipo(4),
l_sel_folder TYPE String.

CLEAR baja.
lv_long = STRLEN( l_sel_folder ).

lv_long = lv_long - 4.
lv_path = l_sel_folder(lv_long).
CONCATENATE lv_path '-ERR-' sy-datum '-' sy-uzeit '.TXT' INTO baja.


CALL METHOD cl_gui_frontend_services=>gui_download
  EXPORTING
*    bin_filesize              =
    filename                  = baja

I have tried to find a solution in the forum with no luck. How can I resolve this?

Thanks in advance and regards!

2 REPLIES 2
Read only

Former Member
0 Likes
448

Since your BAJA is a string and the filename in GUI_DOWNLOAD method is a string, any truncation that is occurring would be caused by Windows. Are you certain that truncation occurs and not just a limitation on the width that you can view? Have you verified that a file with a long path/filename/extension doesn't actually get saved on the desktop target?

Read only

former_member591546
Participant
0 Likes
448

Just like BREAK-POINT said...

Try with

CONDENSE baja.

before CALL METHOD... maybe.