Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

open another cession by program

Former Member
0 Likes
1,740

Hello,

Is it possible by program to open a cession for another user?

I want that this program displays a popup connexion (Login/password), check the password and if it 's correct, open a login cession.

Or Is it possible to submit a transaction by specifying the user?

Thank for your answer.

Regards,

Patrice.

17 REPLIES 17
Read only

Former Member
0 Likes
1,702

Hello Pomarez,

Why don't you try : TH_CREATE_FOREIGN_MODE. This FM opens a session for another user but doesn't check the password validations.

Let me see if i can find anything new.

Read only

0 Likes
1,702

but doesn't check the password validations

This fm works only if the other user has logged in to the same client.

It will not open a session directly.

Read only

0 Likes
1,702

Thats True and one can get that from FM documentation .I never disagreed to that.

Read only

0 Likes
1,702

Thank for yours answers.

But effectively this fm works only if the other user has logged. My problem is to open a cession even if the user is not logged.

Regards,

Patrice

Read only

0 Likes
1,702

My problem is to open a cession even if the user is not logged.

How will you make sure whether the user has switched on the Computer ?????

Read only

0 Likes
1,702

We can end or kill a session if user is not logged in . But to open a session for a user who's not logged on how can that be possible?

PS: Anyone has any idea on this?

Read only

0 Likes
1,702

For you, is-it possible to call a transaction by specifying the user?

Read only

0 Likes
1,702

Only if the User is logged in.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,702

Create a SAP shortcut in your desktop

Read only

0 Likes
1,702

Did you try on hands on that?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,702

>

> Did you try on hands on that?

Yes & if you have not read SAP documentation: [http://help.sap.com/saphelp_erp60_sp/helpdata/EN/2f/6d2e42e1ef5633e10000000a155106/content.htm]

Read only

0 Likes
1,702

Oh...Thanks Suhas. What if user is not logged in?

Infact OP wants to open a session for another user via some report/programs.

Edited by: Mishra.Manas on Apr 20, 2010 3:18 PM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,702

The SAP documentation also mentions what happens if the user is not logged into the system.

If the password field is not active you can activate it as well.

In your previous post you had asked, "How to open a session for a user not logged into the system ?". I just replied to it.

BR,

Suhas

Read only

0 Likes
1,702

Hello Mishra,

If the user is logged in How can you call a transaction by specifying this user?

Thanks.

Patrice.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,702

I don't think you can specify the user name with CALL TRANSACTION. But you can do so using SUBMIT. Read the SAP documentation for details.

BR,

Suhas

Read only

Former Member
0 Likes
1,702

Hi,

Create one authorization object with the help of basis and add your specific user to that authorization group.

In the program check with the authorization object and sy-uname and proceed further.

--Naresh.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,702

Hello Guys,

2 ways of doing this:

Solution#1:

1. Create an RFC destination for the local system & using the user(the user for which you want to open the session) to logon through the RFC.

2. Call the FM 'ALINK_CALL_TRANSACTION', give the RFC name & the transaction code you want to open.

I have uploaded the [screenshots|http://img218.imageshack.us/g/rfcdestination.png/] for better understanding of how this works.

Solution#2:

1. As mentioned in my previous post, create an SAP shortcut. Give the transaction code, the user details etc. and save it. (refer to my previous post on how to create a shortcut)

2. Call the method CL_GUI_FRONTEND_SERVICES=>EXECUTE & pass the shortcut to it. It will open the transaction code for the user used in the shortcut.

Hope i am making sense.

BR,

Suhas