How to get Requester Login information into the request dataset validator

Friends,
I need to check whether the requester is part of a group or not before submitting the request. If not I need to throw an error.
Can you please let me know how to get Requester information.login into the request validator?

Hi Thiago,
I am getting the requester id from the requestData in the request data validator. Here is my full code for your reference.
Bikash - I even tried with RoleManager service but still same error.
public void validate(RequestData requestData)
throws InvalidRequestDataException {
tcUserOperationsIntf UserOppsIntf =Platform.getService(tcUserOperationsIntf.class);
try
tcResultSet result=UserOppsIntf.getSelfProfile();
result.goToRow(0);
String requesterID = result.getStringValue("Users.User ID");
String userKey=result.getStringValue("Users.Key");
System.out.println("Request Login:"+requesterID);
if (isMemeber(getOIMGroupKey("testGroup"),userKey))
System.out.println(requesterID+" is a Member");
else
System.out.println(requesterID+" is not a Member");
String reason = "Note[REQUEST_SUBMISSION_ERROR].text:You are not authorized to submit this request.";
throw new InvalidRequestDataException(reason);
catch(Exception e) {
e.printStackTrace();
private String getOIMGroupKey(String GroupName) throws Exception
String groupKey="";
tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
HashMap searchFor = new HashMap();
searchFor.put("Groups.Group Name", GroupName);
tcResultSet results = groupInstanceOps.findGroups(searchFor);
for (int i = 0; i < results.getRowCount(); i++) {
results.goToRow(i);
groupKey = Long.toString(results.getLongValue("Groups.Key"));
System.out.println("GroupKey:"+groupKey);
return groupKey;
private boolean isMemeber(String groupKey,String userKey) throws Exception
boolean member=false;
try
tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
long grpLong = Long.parseLong(groupKey.trim());
tcResultSet grpResultSet = groupInstanceOps.getAllMembers(grpLong);
for(int i=0;i<grpResultSet.getRowCount();i++)
grpResultSet.goToRow(i);
long usrKeygrp = grpResultSet.getLongValue("Users.Key");
if (usrKeygrp==Long.valueOf(userKey))
member=true;
break;
catch(Exception e) {
e.printStackTrace();
member=false;
return member;
}

Similar Messages

  • How to get an RSS feed into the phone using Nokia ...

    Is it possible to get an RSS feed into the phone using the Nokia PC Suite? RSS is mentioned in several places in the help files, but I can't find a place that describes how to set it up.

    just as they said in the help:
    "On the Bookmarks section, you can define bookmark and RSS feed synchronisation details. Bookmarks and RSS feeds can be synchronised between a Nokia mobile phone and a supported web browser. Note that bookmark and RSS feed synchronisation is not available for all phone models. "
    What's the law of the jungle?

  • How to get last login date of the user

    Hi,
    I have an application where i need the last login date of the user and if the differance between the last login date and the system date is greater than a certain range the user account should be locked automatically.Please suggest me how resolve the problem as early as possible.
    Thanks and Regards
    Aniruddha

    Hi,
    We have faced the same issue earlier. Some attributes are available in SAP API, but they are depricated by sap due to some performance issue.
    Below solution will be helpful:
    So we have implmented custom code in our application. We have developed one webdynpro application which will retrieve update & retrieve logon time from portal database(custom table). And we have integrated this application in desktop inner page. So this application will be invisible to the user and will executed first time when user logs into the portal.
    Regards,
    Charan

  • How to get a long text into the SapScript

    Hi.
    I need to read text from header field from ME21N. I use to this READ_TEXT function module, which is called from SapScript but the problem is, that this function returns me just about 80 chars and trim rest of string.
    First idea was use loop in form, but is impossible, how to solve this problem.
    Thanks

    Problem was solved :
    INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01 LANGUAGE &EKKO-SPRAS&
    Edited by: Daniel Duras on Apr 23, 2008 10:51 PM

  • How to get audio book files into the audio books library?

    I have recently imported some of my own audio books from cd to iTunes. They are now located in the music library, but I would like to have them in the audio book library. But no matter what I try I can't move them. Can anyone help me?
    I have tried dragging the files and the folders, creating playlists and dragging them, importing files and folders, but nothing works. Is it impossible to do?
    Homebuild     Uses Windows Vista

    It's easy to make audiobooks so long as you start off with AAC files (.m4a). If your books are in MP3 format, either rerip the book from CD into AAC or else convert MP3 to AAC. In iTunes there is an AAC choiced called "Spoken Podcast" that's great for making audiobooks (Edit > Preferences > Advanced > Importing).
    Step-by-step instructions for making an audiobook are here:
    http://discussions.apple.com/message.jspa?messageID=4218783#4218783

  • How to get gmail contacts "groups" into the Touch

    In gmail I have my contacts organized into in groups. When I sync, all the contacts show up but the gmail groups structure is not there. The groups page on the Touch lists "All Contacts", "All from my PC", etc. This is completely useless. Is there a way to preserve Google groups on the Touch? thanks

    How are you accessing gmail on the iPhone?
    If you are simply going to the mobile site, there is no way to accomplish what you want.
    If you have it set up as POP3 or IMAP4, these only pull email, not contacts.
    You can set up Gmail as an exchange account and sync contacts, calendar, and mail.
    http://www.google.com/support/mobile/bin/answer.py?answer=138740&topic=14252

  • How do I get my tabs back into the main window?

    I've had a problem with an add-on displaying a small extra window every time I open a session for some months now: I know you're supposed to try disabling and re-enabling every add-on you've got to find out which one is responsible, but this is a work computer and with all the add-ons I have, it would take too long, so I've just closed the extra window every time and got on with my work. However, for some reason today my forty-odd tabs have all opened in the small extra window, which has no tab bar, navigation bar or menu button. How do I get my tabs back into the main window of Firefox, or alternatively get that window to behave like a normal Firefox window so I can use it?

    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    *http://kb.mozillazine.org/Multiple_profile_files_created
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder

  • My PC doesn't see my iPad via iTunes, and I'm getting a message "iPad is disabled / connect to iTunes".  How do I get a login screen on the iPad?

    My PC doesn't see my iPad via iTunes, and I'm getting a message "iPad is disabled / connect to iTunes".  How do I get a login screen on the iPad?

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. If you did not do step 4 properly, start all over again.

  • I have Downloaded albums that break up into each and every song or artist and I cannot get them to combine into the one album that they actually are. How can I do that?

    In My itunes library some of the albums I have downloaded  to my computer are being separated into each song or broken up into groups of separate artists on the album. I cannot figure out how to combine them all back into the one album they actually are from so when I open the library under Albums the album in question is just one album and not 10 or 15 albums because of this fracturing. I can make them into one album by making a playlist but that does not take care of the Album list page. Any ideas?

    Generally setting a common Album title and Album Artist will fix split albums.
    For compilations of tracks by different artists set the album artist to Various Artists and also tick Album is a compilation of songs by various artists if using the new version of Get info or set Part of a compilation to Yes on the Options tab if using the old dialog box (which you can invoke by holding down shift as you right-click > Get Info).
    For deeper problems see Grouping tracks into albums.
    tt2

  • How to get values/data stored in the database into a list-item.

    how to get values/data stored in the database into a list-item.
    i tried to make a list item without any values assigned to it...but i got the below error.
    FRM-30191: No list items defined for required poplist.
    or
    FRM-32082: Invalid value for given item type.
    List EMPNO
    Item: EMPNO
    Block: EMP
    Form: MODULE5
    FRM-30085: Unable to adjust form for output.
    then according to some docs, i tried the the following for the trigger
    when-new-form-instance
    declare
         rg_name varchar2(40) := 'emp_rec';
         status number;
         groupid recordgroup;
         it_id item;
    begin
         it_id := Find_Item('empno');
         groupid := create_group_from_query(rg_name, 'select empno from emp');
         status := populate_group(groupid);
         populate_list(it_id, groupid);
    end;
    but yet didnt work... :(
    so how the heck do i get values fetched from the database table into the list item?

    for list items you need to values in the record group, one is the shown value and one is the returned value.
    Check out the online help for the populate_list built-in.
    You'll need something like select ename,ename from emp as the record group query.

  • How to get structure of IDOC into xi in the scenario is IDOC - XI - File

    hi XI Guys,
          When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI, As we will define Data types in File -> XI -> File. Please send Step by Step process as i am new to Netweaver(XI)
    ThankYou,
    B.Pushparaju.

    When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI
    >>>>
    import the IDoc under the imported object in your SCV. Note that import should be allowed for the SCV.
    As we will define Data types in File -> XI -> File.
    >>>>
    Ref. these blogs to help you out ..
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

  • TS1702 I have downloaded and attempted to purchas the app "ForeFlight HD" for the iPad 2, however, when I put my credit card information into the app for purchase, I am told to contact iTunes support to complete the transaction. Can you tell me how to fix

    I have downloaded and attempted to purchas the app "ForeFlight HD" for the iPad 2, however, when I put my credit card information into the app for purchase, I am told to contact iTunes support to complete the transaction. Can you tell me how to fix this?

    Contact iTunes Support:
    http://www.apple.com/support/itunes/contact/

  • How can I get my Nook purchases into the NOOKBOOK Library area on my IPAD mini?

    How can I get my Nook purchases into the NOOKBOOK Library area on my IPAD mini?

    Not possible. iBook will not read or even be aware of the
    Nook books.
    Also answered in your other post
    https://discussions.apple.com/thread/2738595?tstart=210

  • CCMS information into the solution monitoring

    Hi, All
    In Soulation Manager 4.0 I created RFC connection using SMSY, in R3 System CCMS alerts (auto-reaction method) has been defined and getting alert e mails...
    My Question is how to I pull the CCMS information into the solution monitoring component?
    is anyone tell me step by step procedure....
    Thanks

    Thanks...
    I tried that but it show me that screen shot...
    basically earlywatch report is fine....
    you can check this url please
    http://www.flickr.com/photos/25222280@N03/2545315527/sizes/o/
    thanks

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for

  • Upgrade of Integation Services (Windows 2012 R2) on Windows 2008 R2 with Exchange 2013 SP1 DAG fails

    Here is the scenario: Legacy Host: Windows 2008 R2 Guest VM: Windows 2008 R2 with Exchange 2013 SP1 DAG cluster. After importing the VM (2008 R2 and Exchange 2013 DAG) into a 2012 R2 host (Cluster).  (copy VM files to new 2012 R2host) Everything work

  • Images FileTypes added but not shown in search results

    Hallo, I have added the Filetypes, "jpg", "png" and "gif" through the central administration. I have then made an IISRESET, restart the search service and run a full crawl but the filetypes are not crawled. The architecture is, 2 WFE, 2 APP Server (o

  • Oracle says "Performance degradation is the expected behavior"

    Guys, Yes, you read the title correct. We were testing our app on a new Oracle 11g 3 node RAC (with Netapp storage) / Apex 3.1.2 and noticed poor performance. Since the environment is completely new we thought we did something wrong in the configurat

  • SOAP--- RFC best design

    Hi Experts, I have developed SOAPu2014> RFC scenario synchronous and I have used sender side SOAP adapter receiver side RFC adapter, it is working fine. But I am thinking to go with best design, I know if I replace RFC adapter with ABAP Proxy, perfor

  • FOP and oracle parser

    Hi i developed a web application that takes an xml file which the user specifies and after validating it the application uses FOP to produce a PDF file. But the problem is that by default oc4j uses oracle.xml.parser.v2 parser but FOP need xerces. How