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 of Path

Former Member
0 Likes
532

Dear All,

I am trying to execute a file having path as " C:\Document and Settings\Sapworkdir ".

The problem is SAP does not recognize the space. I tried using "C:\Docume~1\Sapworkdir" and it worked.

but what if the path is different and has space eg

C:\Docume~1\varun j\Sapworkdir

please help.

Regards,

Varun

Dear All,

I am trying to execute a file having path as " C:\Document and Settings\Sapworkdir ".

The problem is SAP does not recognize the space. I tried using "C:\Docume~1\Sapworkdir" and it worked.

but what if the path is different and has space eg

C:\Docume~1\varun j\Sapworkdir

please help.

Regards,

Varun

3 REPLIES 3
Read only

Former Member
0 Likes
482

Hi,

Can you please give more details about your problem.

What is the code or FM used to get the file path? Where you are exactly getting the problem?

Can you please post the part of your code for verification.

Thanks and Regards,

Senthil Kumar Anantham

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
482

>

> I am trying to execute a file having path as " C:\Document and Settings\Sapworkdir ".

> The problem is SAP does not recognize the space.

Hi Varun,

You observation is incorrect. I checked with any random method of the CL_GUI_FRONTEND_SERVICES & it shows the correct results.

BR,

Suhas

PS: I think your filepath is not correct. Should be "C:\Documents and Settings\Sapworkdir". You missed the "s"

Read only

Former Member
0 Likes
482

Dear Suhas,

i am using the method

CL_GUI_FRONTEND_SERVICES=>GET_SAPGUI_WORKDIR(

CHANGING

SAPWORKDIR = W_SAPWORKDIR

EXCEPTIONS

GET_SAPWORKDIR_FAILED = 1

CNTL_ERROR = 2

ERROR_NO_GUI = 3

NOT_SUPPORTED_BY_GUI = 4

OTHERS = 5

).

now what this does is that it returns the file path of sapwork directory.

now using this file path i am creating a batch file for printing in MS-DOS.

when i execute it using a function CL_GUI_FRONTEND_SERVICES=>EXECUTE

here it checks the path and finds the space in my path, so it is not executing.