Application Development 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: 

FILEPATH SAP directory AL11

Former Member
0 Kudos

Hello,

I use this command for get "dir_home" directory :

CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_HOME'

ID 'VALUE' FIELD dirname.

Depends of OS, the separator is '\' o '/'.

How I can know which is it ???

Thanks in advance,

2 REPLIES 2

Pawan_Kesari
Active Contributor
0 Kudos

I think the best way is

 IF sd_dirname cs '/'.
   sd_separator = '/'.
 ELSE.
   sd_separator = ''.
 ENDIF.

where sd_dirname will have dir_home. At least this is how AL11 finds out the directory separator.. see line 1355 program RSWATCH0.

FYI.. To find out the directory separator for presentation server you can use

DATA dir_sep type c .
CALL METHOD cl_gui_frontend_services=>get_file_separator
  CHANGING
    file_separator       = dir_sep .

Former Member
0 Kudos

CALL METHOD cl_gui_frontend_services=>get_file_separator

CHANGING

file_separator = dir_sep.

I can use this method for get the separator for al11 files ??