<?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: Local User in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763201#M37206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you flush after the call to get_user_name?  You have to call cl_gui_cfw=&amp;gt;flush( ) after most calls to the frontend services class.  The following code sample might help explain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  yes_tjung_flush_test                                        .

DATA: username TYPE string.

CALL METHOD cl_gui_frontend_services=&amp;gt;get_user_name
  CHANGING
    user_name            = username
  EXCEPTIONS
    cntl_error           = 1
    error_no_gui         = 2
    not_supported_by_gui = 3
    OTHERS               = 4.
IF sy-subrc &amp;lt;&amp;gt; 0.
ENDIF.

WRITE: / 'Test1', username.

cl_gui_cfw=&amp;gt;flush( ).

WRITE: / 'Test2', username.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Sep 2004 07:45:09 GMT</pubDate>
    <dc:creator>thomas_jung</dc:creator>
    <dc:date>2004-09-10T07:45:09Z</dc:date>
    <item>
      <title>Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763193#M37198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I need to get the local User information from the client workstation - who is signed on at the client. Is there an ABAP-function available which reads the local user-id. &lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 13:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763193#M37198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-09T13:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763194#M37199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TH_USER_LIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It returns a table of the user currently logged into the client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: RETURN TYPE TABLE OF BAPIRET2,
      user_data TYPE BAPIADDR3.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
  EXPORTING
    USERNAME = SY-UNAME
  IMPORTING
    ADDRESS  = user_data
  TABLES
    RETURN   = return.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 13:42:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763194#M37199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-09T13:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763195#M37200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL_GUI_FRONTEND_SERVICES-&amp;gt;GET_USER_NAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grx Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 13:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763195#M37200</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2004-09-09T13:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763196#M37201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas!&lt;/P&gt;&lt;P&gt;I tried the Method GET_USER_NAME --&amp;gt; without a result. sy-subrc = 0 but the returnvalue doesn't contain the login-user.&lt;/P&gt;&lt;P&gt;Any Idea ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 15:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763196#M37201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-09T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763197#M37202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typically the user that is login is kept in the value SY-UNAME in ABAP and BSP at least it is the right value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 18:31:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763197#M37202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-09T18:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763198#M37203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking for user id that login into SAP or user id that login into your PC?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2004 20:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763198#M37203</guid>
      <dc:creator>nablan_umar</dc:creator>
      <dc:date>2004-09-09T20:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763199#M37204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking for the user ID logged in into my PC. No SAP-User !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2004 05:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763199#M37204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-10T05:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763200#M37205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry for my first reply:&lt;/P&gt;&lt;P&gt;I've not tested the method before posting -&lt;/P&gt;&lt;P&gt;the method works but without result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's another solution - that works &amp;lt;b&amp;gt;with&amp;lt;/b&amp;gt; result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_GET_DESKTOP_INFO'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    TYPE          = 5&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    RETURN        = name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grx Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2004 07:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763200#M37205</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2004-09-10T07:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Local User</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763201#M37206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you flush after the call to get_user_name?  You have to call cl_gui_cfw=&amp;gt;flush( ) after most calls to the frontend services class.  The following code sample might help explain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  yes_tjung_flush_test                                        .

DATA: username TYPE string.

CALL METHOD cl_gui_frontend_services=&amp;gt;get_user_name
  CHANGING
    user_name            = username
  EXCEPTIONS
    cntl_error           = 1
    error_no_gui         = 2
    not_supported_by_gui = 3
    OTHERS               = 4.
IF sy-subrc &amp;lt;&amp;gt; 0.
ENDIF.

WRITE: / 'Test1', username.

cl_gui_cfw=&amp;gt;flush( ).

WRITE: / 'Test2', username.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2004 07:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/local-user/m-p/763201#M37206</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-09-10T07:45:09Z</dc:date>
    </item>
  </channel>
</rss>

