filedirectorypathsap

Could you tell me the difference between double slash paths and single slash paths in SAP?


I don't really know if C:\usr\sap\ZINTERFASES_SII means the same than \\Svsapet2\sapmnt\\ZINTERFASES_SII or this second path is a different one. Is it like an alias or something? If it is an alias, is it defined somewhere?

Thanks in advance.


Solution

  • As far as I know in SAP it doesn't matter. For example in BW if you use single or double backslashes for an extraction path it is exactly the same. So I guess SAP anticipated this and probably handles it itself when it knows that it is retrieving a path. If you want to be sure in SAP that it is correct use the single backslash.

    A double backslash is used for 2 things. First if the double backslash is at the beginning of a path it's for Universal Naming Convention you can read about it here: https://en.wikipedia.org/wiki/Path_(computing)#Universal_Naming_Convention.

    Second they are used as an escape character. This is because some programming languages already use special characters to perform a task when being used in order to not trigger this task an escape character being for example '\' is used before the special character indicating that the special character following the '\' is to be used as a string. https://en.wikipedia.org/wiki/Escape_character

    So in other programming languages you'll often see the '\\' in a path but it will translate to '\'.