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

Problem generating file with Gui_download.

Former Member
0 Likes
1,802

Hi experts, I´d appreciate your help.

It seems that depending of the length of the parameter passed to destXXXXX the FM generates the file or not.

If destXXXXX = u2018C: emp’ The file is generated OK

If destXXXXX = u2018C:Documents and SettingsakramerEscritoriou2019 the file is not generated!!

Why is this happening??

************************************************

DATA: destXXXXX TYPE STRING.

CONCATENATE p_file 'B1146.DBF' INTO destXXXXX.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = destXXXXX

FILETYPE = 'DBF'

TABLES

DATA_TAB = dbf_1146

FIELDNAMES = i_fieldnames_1146.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,403

Hello Andres

No. The difference is the absence or presence of the final backslash:


CONCATENATE p_file 'B1146.DBF' INTO destXXXXX. " Results in:

p_file = 'C:\temp\B1146.DBF'.           " Or.
p_file = 'C:\Documents and Settings\akramer\EscritorioB1146.DBF'.

Assuming that "Escritorio" is a directory you should search you file in the parent directory "akramer".

Regards

Uwe

PS: For local download you should use the methods of class CL_GUI_FRONTEND_SERVICES (Unicode-compatible).

6 REPLIES 6
Read only

Former Member
0 Likes
1,403

Check the size of destXXX.

For better, change the type to STRING. This will allow you to have any length of your file path.

Thanks,

Kiran

Read only

0 Likes
1,403

destXXXXX was already declared as string, i wrote that

(DATA: destXXXXX TYPE STRING)

I debbug and I see that que rute y passed correctly, the funciotn seems to hace the problem inside... i don´t know.

Read only

Former Member
0 Likes
1,403

Welcome to SCN!

what is the error message that you get?

Rob

Read only

0 Likes
1,403

Hi rob, there´s no error message, just that the file is not created if the length of the string is too long.

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,404

Hello Andres

No. The difference is the absence or presence of the final backslash:


CONCATENATE p_file 'B1146.DBF' INTO destXXXXX. " Results in:

p_file = 'C:\temp\B1146.DBF'.           " Or.
p_file = 'C:\Documents and Settings\akramer\EscritorioB1146.DBF'.

Assuming that "Escritorio" is a directory you should search you file in the parent directory "akramer".

Regards

Uwe

PS: For local download you should use the methods of class CL_GUI_FRONTEND_SERVICES (Unicode-compatible).

Read only

Former Member
0 Likes
1,403
If destXXXXX = u2018C:\Documents and Settings\akramer\Escritoriou2019 " see '\' is missing here 
************************************************
DATA: destXXXXX TYPE STRING.

CONCATENATE p_file 'B1146.DBF' INTO destXXXXX. " after concat the string becomes C:\Documents and Settings\akramer\EscritorioB1146.DBF ====> no '\' between Escritorio and B1146

so your files name would be EscritorioB1146.DBF in folder u2018C:\Documents and Settings\akramer'

check that