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

How to get the Operating System of user's PC?

Hi Expert,

I will execute some command through ABAP.

So, I want to get Operating System of User's PC.

(Windows 7 , XP, Mac and so on..)

How to get OS?

Thank you in advance and regards,

Kilnam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 03:34 AM
      REPORT  ztest.
      WRITE sy-opsys.
    
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 03:45 AM

    Hi Kilnam ,

    You can use the method GET_PLATFORM in the class CL_GUI_FRONTEND_SERVICES .

    I t will return an integer value , you can find the name of the OS based on the value of the return value in the attributes ,

    e.g for Windows XP OS it returns the value 14 , which is the value of the constant PLATFORM_WINDOWSXP.

    Hope this helps.

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 03:53 AM

    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_PLATFORM

    RECEIVING

    PLATFORM = nPlatform

    EXCEPTIONS

    ERROR_NO_GUI = 1

    CNTL_ERROR = 2

    NOT_SUPPORTED_BY_GUI = 3

    others = 4.

    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.