Retrieve account privilege

Hello,
I would like to retrieve accounts privileges for the current external user
(and in option, for an internal user) when he is logged in.
How to do that in Idoc script ?
Thank you in advance

Hi AspnetDeveloper,
Thanks a lot for posting the exact steps.
I was actually using WebServices 2.0 and that is why these examples were not working for me. I have the webservice up and running now with 1.0
There is 1 more thing I need to ask.
I have 4 files that I am compiling in a single DLL (which becomes the Assembly in SQL Server)
1- File having Login/Logout code
2- SourceCodeFile that was generated by WSDL.exe for Accounts --<<<<<< this is has namespace ClrWebservices.Accounts
3- SourceCodeFile that was generated by WSDL.exe for Opportunities --<<<<<< this is has namespace ClrWebservices.Opportunity
4- File having my code that calls the QueryPage methods to get data and then INSERTs into SQL Server table.
As I read and tried that SQL Server doesn't support dynamically generated libraries, one has to do SGEN to generate serialization code. I did it and it was going perfect for only Accounts data. By the time I added code for retrieving opportunity data, the sgen.exe started giving error:
Error: The top XML element 'Opportunity' from namespace ' ' references distinct types ClrWebservices.Accounts.Opportunity and ClrWebservices.Opportunity.Opportunity1. Use XML attributes to specify another XML name or namespace for the element or types.
Even if I comment out all of my code that extracts Opportunity data, the error is same ..... but the error GOES AWAY if I don't compile the 3rd file in above list.
Looks to me as if there is some conflict between Opportunity as a separate entity and as a child of Account.
WSDL generated code for Accounts says:
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:/crmondemand/xml/account")]
public partial class Opportunity {
WSDL generated code for Opportunity says:
[System.Xml.Serialization.XmlTypeAttribute(TypeName="Opportunity", Namespace="urn:/crmondemand/xml/opportunity")]
public partial class Opportunity1 {
Can anyone please pass on some pointers regarding the mistake I am making ...
Thanks in advance

Similar Messages

  • Retrieving Accounts Payable Documents with entries in the notes Field

    I am having trouble trying to pull all documents that have entries in the "Notes Tab" field in FB60.  I would like to run a report that shows all invoices which have entries in the notes field.

    Hi
    Normally for retrieving accounting documents we use T.code FB03.
    I Think this is a special requirement. Not sure though.
    Regards
    Aravind

  • Fails to upload to Picasa " Failed to retrieve account information"

    Every time I try to upload a picture from my gallery to Picasa I get and message " Failed to retrieve account information" . I have full strength 4g and data connection is good, my Picasa albums show up in my gallery, but I can't add a photo to an album for the life of me.  Ideas? 

    It turns out that if I have Drop Box installed on my GNex then pictures won't upload to Picasa. I have confirmed this to be a problem with a few ICS devices and even found some info on this issue on Google's forums ( http://productforums.google.com/forum/#!topic/mobile/kW1D7jt-DMw ).
    Basically until an update to ICS or Drop Box comes through the only solution is to uninstall Drop Box :-(

  • Help needed in retrieving account description present in PO distributions

    Hi All,
    I have written a query to retrieve purchase orders and it's distributions. I need to retrieve account descrption related to distributions. I have got account number from gl_code_combinations table(segment1 to segment5). I am not able to proceed further in getting account description. Please suggest which are the tables and what is the link between them.
    Thanks and Regards,
    Mahesh

    Hi,
    Please find my comments below:
    Thanks for the reply
    Welcome
    If we link with fnd_flex_values_vl and gl_code_combinations, number of records is increasing i.e records are repeating.
    add condition flex_value_set_id
    Also account number will be like 01-0101-0101-1010, so this means that account number is flex field. Then i think we have to use flex field tables. But i am not able to find out which are the tables and what is the link between them
    Account number is a combination of Segments. You cannot find total combination anywhere. You have to take Code combination id, get the segments, link the segment with fnd_flex_values_vl with particular value_set_id and display the description against that segment.
    Finally you have to concatenate all the segment descriptions.
    Regards,
    Sridhar

  • Retrieve Accounts from Remedy System

    Hi,
    I am trying to retrieve accounts from Action Remedy System. I am trying to search accounts and bring in the return list to IDM.Pleas let me know how to query Remedy from SUN IDM.
    Regards,
    flb

    have u acheived this?Please post the code.

  • How to launch an application with elevated administrator account privilege from windows service even if the account has not yet logon

    Here is the case:
    OS environment: Windows 7
    There are two user accounts in my system, standard user "S" and administrator account "A", and there is a windows service running with "Local System" privilege.
    Now i logged-in with account "S", and i want to launch an application with elevated administrator account "A" from that service program, so here is the code snippet:
    int LaunchAppWithElevatedPrivilege (
    LPTSTR lpszUsername, // client to log on
    LPTSTR lpszDomain, // domain of client's account
    LPTSTR lpszPassword, // client's password
    LPTSTR lpCommandLine // command line to execute e.g. L"C:\\windows\\regedit.exe"
    DWORD dwExitCode = 0;
    HANDLE hToken = NULL;
    HANDLE hFullToken = NULL;
    HANDLE hPrimaryFullToken = NULL;
    HANDLE lsa = NULL;
    BOOL bResult = FALSE;
    LUID luid;
    MSV1_0_INTERACTIVE_PROFILE* profile = NULL;
    DWORD err;
    PTOKEN_GROUPS LocalGroups = NULL;
    DWORD dwLength = 0;
    DWORD dwSessionId = 0;
    LPVOID pEnv = NULL;
    DWORD dwCreationFlags = 0;
    PROCESS_INFORMATION pi = {0};
    STARTUPINFO si = {0};
    __try
    if (!LogonUser( lpszUsername,
    lpszDomain,
    lpszPassword,
    LOGON32_LOGON_INTERACTIVE,
    LOGON32_PROVIDER_DEFAULT,
    &hToken))
    LOG_FAILED(L"GetTokenInformation failed!");
    __leave;
    if( !GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)19, (VOID*)&hFullToken,
    sizeof(HANDLE), &dwLength))
    LOG_FAILED(L"GetTokenInformation failed!");
    __leave;
    if(!DuplicateTokenEx(hFullToken, MAXIMUM_ALLOWED, NULL,
    SecurityIdentification, TokenPrimary, &hPrimaryFullToken))
    LOG_FAILED(L"DuplicateTokenEx failed!");
    __leave;
    DWORD dwSessionId = 0;
    WTS_SESSION_INFO* sessionInfo = NULL;
    DWORD ndSessionInfoCount;
    bResult = WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, &sessionInfo, &ndSessionInfoCount);
    if (!bResult)
    dwSessionId = WTSGetActiveConsoleSessionId();
    else
    for(unsigned int i=0; i<ndSessionInfoCount; i++)
    if( sessionInfo[i].State == WTSActive )
    dwSessionId = sessionInfo[i].SessionId;
    if(0 == dwSessionId)
    LOG_FAILED(L"Get active session id failed!");
    __leave;
    if(!SetTokenInformation(hPrimaryFullToken, TokenSessionId, &dwSessionId, sizeof(DWORD)))
    LOG_FAILED(L"SetTokenInformation failed!");
    __leave;
    if(CreateEnvironmentBlock(&pEnv, hPrimaryFullToken, FALSE))
    dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
    else
    pEnv=NULL;
    if (! ImpersonateLoggedOnUser(hPrimaryFullToken) )
    LOG_FAILED(L"ImpersonateLoggedOnUser failed!");
    __leave;
    si.cb= sizeof(STARTUPINFO);
    si.lpDesktop = L"winsta0\\default";
    bResult = CreateProcessAsUser(
    hPrimaryFullToken, // client's access token
    NULL, // file to execute
    lpCommandLine, // command line
    NULL, // pointer to process SECURITY_ATTRIBUTES
    NULL, // pointer to thread SECURITY_ATTRIBUTES
    FALSE, // handles are not inheritable
    dwCreationFlags, // creation flags
    pEnv, // pointer to new environment block
    NULL, // name of current directory
    &si, // pointer to STARTUPINFO structure
    &pi // receives information about new process
    RevertToSelf();
    if (bResult && pi.hProcess != INVALID_HANDLE_VALUE)
    WaitForSingleObject(pi.hProcess, INFINITE);
    GetExitCodeProcess(pi.hProcess, &dwExitCode);
    else
    LOG_FAILED(L"CreateProcessAsUser failed!");
    __finally
    if (pi.hProcess != INVALID_HANDLE_VALUE)
    CloseHandle(pi.hProcess);
    if (pi.hThread != INVALID_HANDLE_VALUE)
    CloseHandle(pi.hThread);
    if(LocalGroups)
    LocalFree(LocalGroups);
    if(pEnv)
    DestroyEnvironmentBlock(pEnv);
    if(hToken)
    CloseHandle(hToken);
    if(hFullToken)
    CloseHandle(hFullToken);
    if(hPrimaryFullToken)
    CloseHandle(hPrimaryFullToken);
    return dwExitCode;
    I passed in username and password of account "A" to method "LaunchAppWithElevatedPrivilege", and also the application i want to launch, e.g. "C:\windows\regedit.exe", but when i run the service program, i found it do launch
    "regedit.exe" with elevated account "A", but the content of regedit.exe is pure back. screenshot as below:
    Can anyone help me on this?

    You code is not dealing with the DACL access to Winsta0\Default.  Only the LocalSystem account will have full access and the interactively logged on user which is why regedit is not displaying properly.  You'll need to grant access to your user. 
    You also need to deal with UAC since that code is going to give you a non-elevated token via LogonUser().  You need to get the full token via a call to GetTokenInformation() + TokenLinkedToken.
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK.

  • Retrieving Accounting Document number based on PO numbers

    Hey All,
            I have a list of PO numbers(EBELN) for which I am trying to get all Accounting information from BSIS. But before going to BSIS I am trying to determine the Accounting document number(BELNR) from some other table so that my select on BSIS will be efficient.
    What I have tried uptill now is to go to EKBE with the PO numbers and get the Material document numbers. For some cases the material document number is the accounting document number and for others I have to go to BKPF with this material document number to get the accounting document number.
    Is there any other easier and efficeint way of doing this?
    Any input is highly appreciated.
    Thanks

    I am retrieving Large amounts of data, around 1.5 million from BSIS.
    The code related to our discussion looks like this:
    "First I get all related PO's for the last three years and determine the no of packets.
    DO v_no_of_packets TIMES.
          IF v_end_indx GT v_total.
            v_end_indx = v_total.
          ENDIF.
          REFRESH i_ebeln_range[].
          APPEND LINES OF t_ebeln_range FROM v_start_indx TO v_end_indx TO i_ebeln_range.
          v_start_indx = v_end_indx + 1.
          v_end_indx   = v_end_indx + p_pkjsiz.
    IF NOT i_ebeln[] IS INITIAL.
      CLEAR l_bkpf.
      REFRESH l_bkpf[].
      SELECT ebeln ebelp zekkn vgabe gjahr belnr buzei FROM EKBE INTO TABLE t_belnr
                         WHERE ebeln IN i_ebeln_range
                          AND vgabe IN ('1' ,'2').
      IF sy-subrc EQ 0.
        LOOP AT t_belnr.
        l_awkey+0(10) = t_belnr-belnr.
        l_awkey+10(10) = t_belnr-gjahr.
        IF t_belnr-vgabe = '1'.
          l_awtyp = 'MKPF'.
        ELSE.
          l_awtyp = 'RMRP'.
        ENDIF.
        SELECT SINGLE bukrs belnr gjahr blart budat
          FROM bkpf INTO l_bkpf
            WHERE awtyp = l_awtyp
            AND   awkey = l_awkey.
          IF sy-subrc EQ 0.
             APPEND l_bkpf.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
    "Then
      SELECT zuonr hkont gjahr belnr buzei budat blart wrbtr shkzg xblnr
    waers bukrs
       INTO TABLE i_bsis
       FROM bsis
       FOR ALL ENTRIES IN l_bkpf
        WHERE bukrs = l_bkpf-bukrs
                          AND  hkont IN r_hkont   "Contains all Accounts
                          AND  budat = l_bkpf-budat
                          AND  augdt = 0
                          AND  augbl = space
                          AND  gjahr = l_bkpf-gjahr
                          AND  belnr = l_bkpf-belnr
                          AND  blart = l_bkpf-blart
                          AND  gsber = c_zrl1.
      SELECT zuonr hkont gjahr belnr buzei budat blart wrbtr shkzg xblnr
    waers bukrs
       APPENDING TABLE i_bsis
       FROM bsas
        FOR ALL ENTRIES IN l_bkpf
        WHERE bukrs = l_bkpf-bukrs
                          AND  hkont IN r_hkont
                          AND  budat = l_bkpf-budat
                          AND  augdt = 0
                          AND  augbl = space
                          AND  gjahr = l_bkpf-gjahr
                          AND  belnr = l_bkpf-belnr
                          AND  blart = l_bkpf-blart
                          AND  gsber = c_zrl1.
    "Then process this data

  • How can I add account privileges to a newly created file?

    I have multipe accounts on my Mac.  Two of them need to share certain files, but not with everyone else so I can't use the Shared folder.  When I create a new text file with AppleScript it has default ownership to the account that created it, but I need to give read & write privilages to it to the other account as well.  I can do this manually, but there are lots of files sometimes.  One trick I've found is to reset privilages from the next higher folder.  This saves time, but sometimes I forget.  Also when I do this it causes Time Machine to think all the files in that folder have been updated.  If the folder is large it may cause Time Machine to purge a old backup version.  What I'd like to do is find some AppleScript code I can use to add user "A" with read & write access to the permissions of a new file at the time my AppleScript creates that file.  Any ideas?

    Thanks for the reference.  It was interesting and provided me with a direction I hadn't thought of: User Groups and Terminal commands which led to DO SHELL SCRIPT.
    The approach in your reference wasn't practical for me because I already have about 10,000 folders in a 4-deep tree structure on a 2 TB hard disk.  The inheritance method whould have taken a lot of work.
    I did some more researching and experimentation and here's what I ended up with.
    First I created a User Group and assigned the two accounts that needed to share files to it.  By the way, I have two accounts so I can run time-consuming AppleScripts in one while doing work in the other.  This way I'm not disturbed by the AppleScripts and, since some of them use System Events, they aren't disturbed by me.  Anyway, I set up a User Group.  For some reason, the first group didn't work properly.  When I assigned it to a folder or file, one of the account names appeared next to the group icon in the Get Info window of Finder.  I tried everything I could think of to make it work and failed.  Then I created a second User Group and it worked fine, so I just deleted the first group.  I wonder what went wrong the first time?
    Next I used the Finder's Get Info window to apply the new Group privilages to all items in my very large shared data folder on that hard drive.  This took about an hour.
    Finally I created the following AppleScript code taking most of it from what I found on the Internet and fixing problems using other things found on the net.  I've built the following code into a number of AppleScripts that create folders containing 20-200 files.  I've run two of the scripts and created about 200 files in a few dozen folders and it seems to work fine.  Oh, one more thing: For some reason I couldn't assign group membership by name.  I kept getting an error message.  When I substitued the group number - 505, it worked fine.  Go figure!
    tell application "Finder"
    ... lots of finder code ...
    set these_items to every item in folder (target_folder & folder_name)
    tell me
                                            set this_POSIX to quoted form of POSIX path of ((target_folder & folder_name) as alias)
                                            do shell script "chown -R  " & "Programming:505 " & this_POSIX user name "Richard" password "xxx" with administrator privileges
                                            do shell script "chmod -R 770 " & this_POSIX user name "Richard" password "xxx" with administrator privileges
                                            repeat with this_item in these_items
                                                      set this_POSIX to quoted form of POSIX path of (this_item as alias)
                                                      do shell script "chown -R  " & "Programming:505 " & this_POSIX user name "Richard" password "xxx" with administrator privileges
                                                      do shell script "chmod -R 770 " & this_POSIX user name "Richard" password "xxx" with administrator privileges
                                            end repeat
                                  end tell
    ...more finder code
    end tell
    Note: The tell me was recommended by someone on the net.  There was a caution about do shell script failing inside a Tell application "Finder".  I didn't test this.
    I'm a happy camper now.  I don't think I'd have found my way without the reference you provided.

  • Want to retrieve Account information from Siebel on demand thru web service

    Hi
    i have trial account on 'Siebel on demand' and want to retrieve the information from account or any object. There is one method mentioned in the 'OnDemWebSvcs.pdf' file as 'ContactQueryPage' ,but how to used this method is not clear.
    So can any body give any pointer on this?
    Thanks
    Yash

    Hi,
    Thanks for immd reply and it is really useful for new user like me.
    I converted the wsdl file to java. Now suppose i want to fetch all the record from User object on SOD, i wrote the following code snippet but got error as Internal Error: Session is not available. Aborting Server.
    Code : In java
    private static String mstrUrl="https://secure-ausomxega.crmondemand.com/Services/Integration";
    URL wsUrl = new URL(mstrUrl);
    Default_BindingStub defaultBindingStubObject=new Default_BindingStub(wsUrl,null);
    UserLocator []listOfUser=new UserLocator[1];
    UserLocator userLocatorObject=new UserLocator();
    //String xml ="<ListOfUser><User><FirstName /><UserLastName /><LastUpdated> (>='07/28/2004 06:30:00') AND (<='07/28/2009 06:45:00')</LastUpdated></User></ListOfUser>"
    UserWS_UserQueryPage_Input("1","1",listOfUser1,"1");
    UserWS_UserQueryPage_Input userWS_UserQueryPage_InputObject=new UserWS_UserQueryPage_Input("1","1",listOfUser,"1");
    UserWS_UserQueryPage_Output userWS_UserQueryPage_OutputObject = defaultBindingStubObject.userQueryPage(userWS_UserQueryPage_InputObject);
    Can any body provide any pointer on this, how to make a query in Siebel On Demand.
    Thanks
    Yash

  • Retrieve account members with time balance of "last"

    Hi everyone,
    I am trying to write a report scripts that will retrieve from the Accounts dimensions all members that have Time Balance of Account information of "Last". I haven't been able to get the correct syntax to do this retrieval. Is there an existing syntax what is similar to a UDA that I can use as a retireval criteria?
    Any help will be greatly appreciated!
    Thanks,
    Tom

    I dont think there is a such report script command to list out TB First/Last account members.
    so you need to give some uda to the TB members and list out the accounts based on UDA in report scripts.
    - Krish

  • Retrieving account information without Firewire?

    I had been using a first generation Mac Book until it crashed last week. The store diagnosed it as a hardware problem and told me that the hard drive was completely unreadable. (They couldn't save my data). I purchased a new MacBookPro. I didn't have internet when I set it up, so the computer couldn't access my apple ID and information. Now that I have internet I am wondering:
    1) Can I get my old account information on this computer without doing a Firewire transfer?
    2) Can I get this computer to recognize my iTunes account, which is linked to my apple ID? (As of now, it won't let me listen to my own music without authorizing it) (Also - this is off topic, but will iTunes let me redownload the music I already paid for?)

    Your iTunes account doesn't change. Open iTunes and authorize the computer. I'm not sure if you can re-download the music you've already paid for, but you can certainly give it a try. I know you can re-download iPhone apps.
    If your old computer's drive is unreadable, then you will not be able to access the drive via Target Disk Mode.
    The only information Apple keeps based on your Apple ID is your personal information you provided when you completed the Setup Assistant forms. You cannot retrieve that information from Apple via the internet.

  • Retrieve account id

    My iPad pc died.
    Replacement pc sees my iPad (separate) account only.
    How do I retrieve original iPad account and put iPad's library on new pc?

    It may be more of an issue of "authorizing" the new PC.
    Launch iTunes. From the menu bar click Store > Authorize This Computer
    If you have problems with your iTunes account, try here > Apple - Support - Apple ID

  • Retrieve Account

    I just changed my ISP and wanted to re-setup my email account.
    Not realizing that if I deleted the account, that I'd lose all my emails in the inbox.
    Is there any way of retrieving the account?

    See the following:
    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten with recovery software such as Data Rescue II, File Salvage or TechTool Pro. Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.
    If you have a backup then you can restore the data from your backup. Otherwise once you delete a Mail account it is deleted completely as opposed to being simply put in the Trash. If it's an IMAP account and you have all the mailboxes on the server, then just recreate the account. All your mail will still be on the server if you haven't deleted anything from the server.

  • Orcladmin account privilege

    We have 3 instances of portal/OID, each running the same sql procedure to create new user. This will populate the orclSAMAaccount and other oid fields. The procedure uses the orcladmin account to do the above. One one of the server, the procedure is not able to populate the orclSAMAaccount filed, as well as others.
    We think its the orcladmin account access privilege, one of the account might be missing some. How do I check the privilege for this account? Thanks.

    We have 3 instances of portal/OID, each running the same sql procedure to create new user. This will populate the orclSAMAaccount and other oid fields. The procedure uses the orcladmin account to do the above. One one of the server, the procedure is not able to populate the orclSAMAaccount filed, as well as others.
    We think its the orcladmin account access privilege, one of the account might be missing some. How do I check the privilege for this account? Thanks.

  • Can't retrieve folder privileges for a specific user

    I am trying to get the granted privilege for a specified user for a certain folder. I am using the wwsec_api.get_granted_user_privilege function. When I run my code, nothing is ever returned. Here is my code:
    l_priv_varchar := wwsec_api.get_granted_user_privilege(
    p_user_id => 0,
    p_object_type_name => 'FOLDER',
    p_name => '2889');
    p_user_id is from wwsec_person.id$
    p_object_type_name is my object type
    p_name is from wwv_corners.id
    I have looked at the properties of this folder and this user, 0, is set up as the owner. So I am expecting to see 'OWN' returned. I have another user set up to only VIEW the folder and when I put that user's id into the p_user_id parameter I still do not get any return. I can run this same code (with different parameter values) and get the privileges for a 'PAGE', but never for a FOLDER.
    Does anyone have this problem or can tell what I am missing?
    Thanks.
    null

    p_name for a folder is "sitename/parentfolder/foldername". You can see that in the syspriv_name field on the WWV_CORNERS table.

Maybe you are looking for

  • Incorrect syncing from iCal to mobile phone

    When entering events on my SE Z530i, all events are perfectly synced with iCal. When entering data in iCal, the events are badly synced: the data is correct, but the time and duration is wrong. For instance: 17:00 - 18:30 changes into 10:00 - 11:00

  • DVDSP Project strange behavior

    When I open my existing project created with DVDSP it loads the file and then the viewing and asset windows are immediately sucked into the dock and I can not get them out again, only choice is to quit the program. What is going on here? On this same

  • Credit control area to sales area

    hi sd gurus can we have credit control are setup to sales area,when it is already setup in company code,,,,.. thanks regards vivek

  • LV7 to LV8 conversion problem

    VIs converted to 8.0 compile ok and built .exes run correctly but when going to and from some sub vis, I occasionally see an annoying  vi title line flash on the screen.    What setting needs to be changed to block this (doesn't occur with LV7 versio

  • Lightroom 3 and Nikon D5100

    Hi, I just recieved my Nikon D5100 today and it looks as if Lightroom doesn't recognize raw for the camera.  It worked perfectly with my Nikon D5000.  Does anyone know when Lightroom will support D5100 raw and if there's a workaround until it's offic