on 01-03-2006 7:12 AM
Hi Armin Riechert,
I need your help and guidelines.
Please help me.
I have created a View and calling a BAPI that displays some records.
In this senario how to get the Portal login user and how to send from webdynpro context to bapi input.
Please guide me what are the steps i have to follow.
I know you people are good to respond.
Thanks in advance.
Any code snippests appreciate.
Regards
nageswara.
hi Nageshwar,
Check this link for catching portal user id
In the webdynpro application go to
Java build path -> Libraries -> Add external jars ->
com.sap.securities -> lib -> com.sap.security.api.
try {
IWDClientUser wdUser = WDClientUser.getCurrentUser(); IUser user = wdUser.getSAPUser();
if (user != null)
{
IUserAccount[] acct = user.getUserAccounts();
if(acct[0] != null)
{
String strUserid = acct[0].getLogonUid();
wdContext.currentContextElement().setAssoid(new String(strUserid));
}
}
}
Also organise imports for the code
for passing the value to the bapi
<model node name> input = new <model node name>();
wdContext.node<model node name>().bind(input);
input.setUsername(wdContext.currentContextElement().getAssoid());
For more info on passing values to bapi see the tutorial
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/cr... a web dynpro application accessing abap functions.pdf
hope this helps you
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.