on 07-29-2009 9:29 AM
Hi,
My requirement is as follows :
we are using BAPI which gives the details of expense reports .one of the input parameters for the BAPI are USERNAME(SY-UNAME) .
Once user log into the mobile ( we are develoing the application in BlackBerry) it has to give the reports for that particular user only. how can we handle username webdynpro side?
Regards,
Pavani
Hi pavani,
U need to write code before executing the bapi.
IUser user=clientuser.getSAPUser();
pass "user" as input parameter to that bapi and execute the bapi.
Regards,
Sunaina Reddy t
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i am using following code before calling the BAPI.:
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sap.tc.webdynpro.services.sal.um.core.IClientUser;
IWDClientUser clientuser = WDClientUser.getCurrentUser();
IClientUser user = clientuser.getSAPUser(); ** here if i give IUser it is not accepting and giving error .
String id = user.getUniqueID().toUpperCase();
pls help me on this.
Regards,
Pavani
Hi,
Hi are you using the webdynpro DC (or) normal webdynpro project..
If you are using a develeopment component you can add com.sap.security.api.sda jar as a used dc in your project.Build the DC and check
If you are using a webdynpro project, RightClick on project>properties> java build path--> add the com.sap.security.api jar to your project and build the project and check.
Regards,
Saleem
Hi,
Check the IUserFactory class which has helpful methods.
IWDClientUser clientuser=WDClientUser.getCurrentUser();
IUser user=clientuser.getSAPUser();
And ofcourse using IUserSearchFilter class you can get all Users with same firstName and LastName.
ISearchResult searchResult = IUserFactory.searchUsers(IUserSearchFilter filter);
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavani,
Make the Authentication property of your application true so that when the user access the application should enter the username and password.
In wdInit() write the code to capture the usernamer.
try {
IWDClientUser clientuser=WDClientUser.getCurrentUser();
IUser user=clientuser.getSAPUser();
String id=user.getUniqueID().toUpperCase();
// pass this value as input to the Bapi.
}
catch(UMEException e){}
U need to add com.sap.security.api.jar file to access UME api.
Regards,
srikanth
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.