Skip to Content
author's profile photo Former Member
Former Member

system fields

hello friends,

i need some help from u, is there any system variable to findout the system (workstation) name becz i have print this when i print a smartform alont with the username

so as sy-uname is there any variable exists to identify the workstation name where i am working currently

if so plz let me know otherwise please guide me how to find out this

thanks in adavanse

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Mar 24, 2006 at 02:47 PM

    Hi,

    You can us ethe method GET_COMPUTER_NAME in the class

    CL_GUI_FRONTEND_SERVICES.

    Regards,

    Suresh Datti

    Add a comment
    10|10000 characters needed characters exceeded

    • You can use the method from the class CL_GUI_FRONTEND_SERVICES. Make sure that you flush to the frontend.

      
      
      report zrich_0001 .
      
      data: name type string.
      
      call method cl_gui_frontend_services=>get_computer_name
        changing
          computer_name        = name.
      
      <b>call method cl_gui_cfw=>flush.</b>
      
      
      write:/ name.
      
      
      

      Regards,

      Rich Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:20 PM
    chk this also
    
    report ychatest .
    
    data: name(25).
    
        CALL FUNCTION 'GUI_GET_DESKTOP_INFO'
          EXPORTING
            type          = 1
          changing
            return        = name
                  .
    write : name.
    
    different options for type
    
    1:  Host name (host name of current system)
    
    2:  Windows directory
    
    3:  System directory
    
    4:  Temp. directory
    
    5:  Domain user name
    
    6:  Platform
    
    7:  Windows build number
    
    8:  Windows version
    
    9:  Program name
    
    10: Program path

    Message was edited by: Sekhar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 02:48 PM

    Hi naveenkumar,

    1.Not only the workstation name,

    u can also get the IP Address.

    2. use this FM

    TERMINAL_ID_GET

    3. In that u will have to split

    the text

    for getting ip address and computer name.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 24, 2006 at 02:57 PM
    REPORT  ZTEST_IPGET                             .
    
    DATA: BEGIN OF USR_TABL OCCURS 10.
            INCLUDE STRUCTURE UINFO.
    DATA: END OF USR_TABL.
    
    DATA:TH_OPCODE(1)  TYPE X.
    DATA: IPADDR(30).
    
    CONSTANTS: OPCODE_LIST  LIKE TH_OPCODE VALUE 2.
    
    CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_LIST
    ID 'TAB' FIELD USR_TABL-*SYS*.
    
    
    
    LOOP AT USR_TABL.
    
      CALL FUNCTION 'GWY_IPADR2STRING'
        EXPORTING
          IPADR  = USR_TABL-HOSTADR
        IMPORTING
          STRING = IPADDR.
    
      WRITE:/ USR_TABL-BNAME ,USR_TABL-TERM, IPADDR.
    ENDLOOP.

    check the above code , it will give sytem name , ip address.

    Regards

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:15 PM

    thanks alot dudes proble solved

    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.