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

I need to create new sapgui session using ABAP

Hi All

I am in a situation where we have a handheld which does not have the SAP GUI controls available which means the user cannot create a new session using the standard GUI button.

Is there any code I can use to create a new session for the currently logged on user?

Thanks in advance for any replies.

Brad

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 Mar 31, 2008 at 10:46 PM

    hi,

    Please go through the following steps:

    1) The TCODE for creating new session is 'SESSION_MANAGER'.

    2) So you put a button on the screen and call this transaction whenever you click the button.

    i hope the problem is solved.

    Rewad points if helpful.

    Thanks and Rewards

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I tried this but it does not create a "new" session but brings me back to the main menu screen inside the current window. I need to create a new window so that the user can have multiple sessions open at the same time.

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 11:31 PM

    Hi,

    Try this..

    call function 'TH_CREATE_FOREIGN_MODE'

    exporting

    client = sy-mandt

    user = sy-uname

    tcode = 'VA03'.

    Thanks

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2008 at 12:15 AM

    Hi ,

    set pf-status 'PFS'.

    at user-command.

    case sy-ucomm.

    when 'NEW'.

    CALL FUNCTION 'TH_CREATE_FOREIGN_MODE'

    EXPORTING

    CLIENT = SY-MANDT

    USER = SY-UNAME

    TCODE = 'SESSION_MANAGER'

    RETURN_ERROR = 1

    CREATE_EXCLUSIVE = 0

    EXCEPTIONS

    USER_NOT_FOUND = 1

    CANT_CREATE_MODE = 2

    OTHERS = 3

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    The code is working.

    Thank you Narendran for helping.

    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.