<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get current users SAP Working Directory in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331878#M1032069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.. you guys are great..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx Ganesh.. I just wanted the FM 'IW_C_GET_SAPWORKDIR'. The downloading process I have is a background one..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx Bert.. So dumb of me not noticing the method in the class cl_gui_frontend_services. I am a novice in using the classes and the methods..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx and regards&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2008 14:37:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-18T14:37:08Z</dc:date>
    <item>
      <title>Get current users SAP Working Directory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331875#M1032066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where I will have to download a file temporarily and open it in the front end.. Now I need to download the file to the users SAP Working directory. how do i determine the directory path?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think usually it has the path&lt;/P&gt;&lt;P&gt;C:\Documents and Settings\&amp;lt;current windows user name&amp;gt;\SapWorkDir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz suggest. I have tried using the obsolate function module REGISTERY_GET, but didnt know how to use it.. and, well the FM was suggesting me to use the methods of class CL_GUI_FRONTEND_SERVICES, but didnt know how to use it too.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 05:03:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331875#M1032066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T05:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get current users SAP Working Directory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331876#M1032067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT  ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: workdir   TYPE sdok_chtrd,&lt;/P&gt;&lt;P&gt;          errmsg    TYPE iwerrormsg,&lt;/P&gt;&lt;P&gt;          length     TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: filename    TYPE string,&lt;/P&gt;&lt;P&gt;          fullpath       TYPE string,&lt;/P&gt;&lt;P&gt;          user_action TYPE i,&lt;/P&gt;&lt;P&gt;          path           TYPE string,&lt;/P&gt;&lt;P&gt;          intd             type   string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'IW_C_GET_SAPWORKDIR'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    sapworkdir = workdir&lt;/P&gt;&lt;P&gt;    error_msg  = errmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;intd = workdir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;file_save_dialog&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    window_title         = 'Save as...'&lt;/P&gt;&lt;P&gt;    with_encoding        = 'X'&lt;/P&gt;&lt;P&gt;    initial_directory    =  intd&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    filename             = filename&lt;/P&gt;&lt;P&gt;    path                 = path&lt;/P&gt;&lt;P&gt;    fullpath             = fullpath&lt;/P&gt;&lt;P&gt;    user_action          = user_action&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    cntl_error           = 1&lt;/P&gt;&lt;P&gt;    error_no_gui         = 2&lt;/P&gt;&lt;P&gt;    not_supported_by_gui = 3&lt;/P&gt;&lt;P&gt;    OTHERS               = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0 OR user_action NE cl_gui_frontend_services=&amp;gt;action_ok.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                = fullpath&lt;/P&gt;&lt;P&gt;    filetype                = 'DAT'&lt;/P&gt;&lt;P&gt;    write_field_separator   = ','&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    filelength              = length&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                = gt_tickets&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    file_write_error        = 1&lt;/P&gt;&lt;P&gt;    no_batch                = 2&lt;/P&gt;&lt;P&gt;    gui_refuse_filetransfer = 3&lt;/P&gt;&lt;P&gt;    invalid_type            = 4&lt;/P&gt;&lt;P&gt;    no_authority            = 5&lt;/P&gt;&lt;P&gt;    unknown_error           = 6&lt;/P&gt;&lt;P&gt;    header_not_allowed      = 7&lt;/P&gt;&lt;P&gt;    separator_not_allowed   = 8&lt;/P&gt;&lt;P&gt;    filesize_not_allowed    = 9&lt;/P&gt;&lt;P&gt;    header_too_long         = 10&lt;/P&gt;&lt;P&gt;    dp_error_create         = 11&lt;/P&gt;&lt;P&gt;    dp_error_send           = 12&lt;/P&gt;&lt;P&gt;    dp_error_write          = 13&lt;/P&gt;&lt;P&gt;    unknown_dp_error        = 14&lt;/P&gt;&lt;P&gt;    access_denied           = 15&lt;/P&gt;&lt;P&gt;    dp_out_of_memory        = 16&lt;/P&gt;&lt;P&gt;    disk_full               = 17&lt;/P&gt;&lt;P&gt;    dp_timeout              = 18&lt;/P&gt;&lt;P&gt;    file_not_found          = 19&lt;/P&gt;&lt;P&gt;    dataprovider_exception  = 20&lt;/P&gt;&lt;P&gt;    control_flush_error     = 21&lt;/P&gt;&lt;P&gt;    OTHERS                  = 22.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 08:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331876#M1032067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T08:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get current users SAP Working Directory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331877#M1032068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;use the method get_sapgui_workdir of class cl_gui_frontend_services. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 call method cl_gui_frontend_services=&amp;gt;get_sapgui_workdir
      changing
        sapworkdir            = l_temp_dir
       EXCEPTIONS
         GET_SAPWORKDIR_FAILED = 1
         CNTL_ERROR            = 2
         ERROR_NO_GUI          = 3
         NOT_SUPPORTED_BY_GUI  = 4
        others                = 5.
    if sy-subrc = 0.
      call method cl_gui_cfw=&amp;gt;flush
        exceptions
          others = 1.
      if sy-subrc = 0 and not l_temp_dir is initial.
        l_dir_path = l_temp_dir.
      endif.
    endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reg,&lt;/P&gt;&lt;P&gt;Bert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 08:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331877#M1032068</guid>
      <dc:creator>b_deterd2</dc:creator>
      <dc:date>2008-08-18T08:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get current users SAP Working Directory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331878#M1032069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.. you guys are great..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx Ganesh.. I just wanted the FM 'IW_C_GET_SAPWORKDIR'. The downloading process I have is a background one..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx Bert.. So dumb of me not noticing the method in the class cl_gui_frontend_services. I am a novice in using the classes and the methods..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx and regards&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 14:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-current-users-sap-working-directory/m-p/4331878#M1032069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T14:37:08Z</dc:date>
    </item>
  </channel>
</rss>

