Skip to Content

How to get 'My documents' directory of local pc

Hi.

I have a requirement to automatically save a .txt file in the presentation server's 'My document' folder. My question is, how will I know the directory path of the local pc's 'My documents'? Is there any FM or BAPI or method I can use for this?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 10:33 AM

    hi ,

    tcode SO21 maintain pc directory

    SAP Program: RSSOPCDR

    Default Screen No.: 1000

    SAP Transaction code documentation:

    DESCRIPTION

    Set the PC working directory via the file FRONT.INI, section file transfer and key path.

    PRECONDITION

    Windows, WindowsNT or Windows95 frontend

    OUTPUT

    The FRONT.INI file on your PC is changed. It should contain the standard directory for the functions import and export.

    SAP T code Documentation extract taken from SAP system

    thanks

    chaitanya

    Edited by: Chaitanya.M on Dec 13, 2011 11:34 AM

    Edited by: Chaitanya.M on Dec 13, 2011 11:40 AM

    Add a comment
    10|10000 characters needed characters exceeded

    • Try this:

         CALL METHOD CL_GUI_FRONTEND_SERVICES=>REGISTRY_GET_VALUE
          EXPORTING
              ROOT         = CL_GUI_FRONTEND_SERVICES=>HKEY_CURRENT_USER
              KEY          =  'Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'
              VALUE        = 'Personal'
          IMPORTING
               REG_VALUE   = my_documents_path
           EXCEPTIONS
               GET_REGVALUE_FAILED  = 1
               CNTL_ERROR           = 2
               ERROR_NO_GUI         = 3
               NOT_SUPPORTED_BY_GUI = 4
               others               = 5.
      

      If it does not work try with 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' instead of 'Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'.

      Kind regards

      Edited by: Arseni Gallardo on Dec 13, 2011 11:47 AM

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 10:31 AM

    hi ,

    that is for basis ....see this link....http://www.se80.co.uk/saptcodes/s/so21/so21.htm

    thanks

    chaitanya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 10:31 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.