cancel
Showing results for 
Search instead for 
Did you mean: 

Passing User ID into backend ABAP system via adaptive RFC

Former Member
0 Kudos
134

I have an application that accesses a BAPI via adaptive RFC. That BAPI needs to know who the user is (they have a user account in the backend system) in order to do some processing.

The JCO connection uses a specific communications user, and when I debug the BAPI, the value of SY-USRID is the JCO communications user.

I need to do one of two things:

1) Dynamically allocate the JCO user somehow in the configuration, so that the correct user is logged in. Not sure if this is a good idea though even if it can be done, because they will then be Dialog users.

In general, how is this situation dealt with?

BR,

Tony.

or

2) Retrieve the userID from the Web Dynpro side. I can change the BAPI to accept a userID, and pass that from the Web Dynpro application. Is there then a way to take the logged on user ID from the Portal side, where the Web Dynpro is running, over to the Web Dynpro application?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

1) While creating JCO destinations if you give logon tickets , using sy-uname In RFC or BAPI you will get User ID into backend ABAP system .

2)To get the logged on user ID from the Portal side where the Web Dynpro is running,

IWDClientUser wduser = null;

try {

wduser = WDClientUser.getCurrentUser();

}

catch (WDUMException e2) {

e2.printStackTrace();

}

IUser user = wduser.getSAPUser();

String name = user.getUniqueName();

Former Member
0 Kudos

Thak you, Sunitha,

I am fairly new to the Web Dynpro world. I was on the basic course a month ago, and we did not cover logon tickets.

Do you have any idea where I can find a help link or a blog / white paper that gives a good explanation and implementation instructions for this concept?

Kind Regards,

Tony.

Former Member
0 Kudos

Hi ,

check this link

http://help.sap.com/saphelp_nw04/helpdata/en/3a/3b1b40fcdd8f5ce10000000a155106/content.htm

If we accessing information from R/3 system in WebDynpro we create JCO destination .

JCO Destinations will maintain the username,password,SystemName etc and it is responsible for connecting to the backend machine.

When we are creating a model we specify JCO destination so that the application will use connection while running the application.

Sunitha

Former Member
0 Kudos

Thanks! Is that all there is to ticket logon? I don't needto configure anything else?

I will try this later today; if it works, I'll give the rest of the points!

Thanks again,

Tony.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anthony,

Refer to the following thread which discusses about the similar problem.

Regards,

Jhansi