Wanted to know allocated licenses to the existing user

Hi All
I wanted to know that which license type is being allocated to which user(s) say for example i have allocated Limited financial license type to user X,Y,Z and accordingly to the other so how can i get the list of such type so that i can reshuffle the licenses to the users.
Please provide me with the solution in SAP B1 9.0 or if it can be achieved through query then please provide me the same
Regards,
Bhushan

Hi
use this.
if you have different databases use union all
if OBJECT_ID('tempdb..#xmlLicense') is not null
DROP TABLE #xmlLicense
if OBJECT_ID('tempdb..#UserLicenses') is not null
DROP TABLE #UserLicenses
CREATE TABLE #xmlLicense
        Id INT IDENTITY PRIMARY KEY,
        XMLData XML,
        LoadedDateTime DATETIME
CREATE TABLE #UserLicenses
        UserID varchar(50)
        , LicenseType varchar(100)
INSERT INTO #xmlLicense(XMLData, LoadedDateTime)
SELECT CONVERT(XML, BulkColumn) AS BulkColumn, GETDATE()
FROM OPENROWSET(BULK 'C:\Program Files (x86)\SAP\SAP Business One ServerTools\License\B1Upf.xml', SINGLE_BLOB) AS x;
DECLARE @XML AS XML, @hDoc AS INT, @SQL NVARCHAR (MAX)
SELECT @XML = XMLData FROM #xmlLicense
EXEC sp_xml_preparedocument @hDoc OUTPUT, @XML
INSERT INTO #UserLicenses
SELECT  UserID
                , LicenseType
FROM    OPENXML(@hdoc, 'Users/User/Modules/Module')
WITH
UserID [varchar](50) '../../UserName'
, LicenseType [varchar](100) 'KeyDesc'
EXEC sp_xml_removedocument @hDoc
GO
SELECT  T0.UserID, T1.U_NAME, T0.LicenseType
FROM    #UserLicenses T0
LEFT OUTER JOIN OUSR T1 ON T0.UserID COLLATE DATABASE_DEFAULT = T1.USER_CODE

Similar Messages

  • I have three email accounts and want to know how to change the display order.

    I have three email accounts and want to know how to change the display order.

    Install this add on.
    https://addons.mozilla.org/en-US/thunderbird/addon/manually-sort-folders/?src=search

  • I have just purchased a new iphone 5, just wanted to know that what is the best way to insure my iphone

    i have just purchased a new iphone 5, just wanted to know that what is the best way to insure my iphone

    Contact yor carrier. Your carrier may have some Mobile Insurance that you pay a certain amount per month to insure your device. Most carriers require you have the device less than 30 days in order to insure it. If your carrier is AT&T, AT&T has mobile insurance for only $6.99 per month. AT&T has open enrollment for their mobile insurance now. So anyone has an AT&T line can get insurance coverage for their device.

  • I want to know how to clear the text area by the push off my next question button and ask a new ques

    I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
    heres my code so far
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">
        <fx:Script>
            <![CDATA[
                protected function button1_clickHandler(event:MouseEvent):void
                    //convert text area into labelid to be identified by actionscript
                    richTextLabel.text = myArea.text;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <!--container 1-->
        <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
            <!--data Entry control-->
            <s:TextArea id="myArea" width="153" height="68"/>
            <!--end of data entry control-->
            <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        <!--container2-->
        <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
    <!--data entry control-->
            <!--convert tne data entry control into a label id in actionscript-->
            <s:Label id="richTextLabel" width="153" height="68"/>
            <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        </s:Application>

    This is a user to user support forum.  We are all iphone users just like you.
    You are not addressing Apple here at all.
    This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
    "it's too fragile"
    No it is not.  i have never damaged one, nor has anyone I know.
    " U loose data when Ur phone is locked"
    No you don't.  Why do you think this?
    "and there is no customer support!!!  "
    Wrong yet again.  Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
    "but I will go back with Blackberry "
    Please do.
    Good ridance

  • Want to know that wat is the impact of changing a field label in master

    Dear Experts,
    Want to know that what is the impact of changing a field label in masters ?

    hai sap gurus,
                          kindly clear my doubt..
    Swetha

  • I want to know what for is the "Sync" button in Lightning and if there is a way to sync my LOCAL Lightning calendars between two computers. Thanks

    I want to know what for is the "Sync" button in Lightning and if there is a way to sync my LOCAL Lightning calendars between two computers. Thanks

    sync is about synchronizing network calendars. Simply create a network calendar and synchronize it on multiple machines and forget local calendars.

  • Hello,  I want to know how to clear the memory or buffer cash from my mac book?

    Hello,  I want to know how to clear the memory or buffer cash from my mac book? When I look at the series, it puts more and more time to load. Thank you.
    Sorry for my english, i talk french.

    Ok ce n'est pas le problème alors.
    Boot à partir de votre disque d'installation et de lancerl'utilitaire de disque. Le disque de démarrage peut être nécessaire de réparation.
    Using Disk Utility to verify or repair disks
    Ok that's not the problem then.
    Boot from your install disc and run Disk Utility. The startup disk may need repairing.

  • I want to know how to setup the logicaladdress (cluster+HA+oracle)

    I want to know how to setup the logicaladdress (cluster+HA+oracle)

    Please have a look at:
    http://docs.sun.com/app/docs/doc/819-0703/6n343k6g0?q=SUNW.LogicalHostname&a=view
    for how to add a Logical Hostname Resource to a Resource Group (in that case the RG where you configrued ha oracle for).
    There is nothing special for HA oracle on that part.
    If you configure your oracle_listener resource for that specific logical hostname resource, then you should configure a dependecy from the oracle_listener to the LH.
    By default the RG will have property Implicit_network_dependencies set to true, which should be enough.
    If this property is false, I recommend adding the LH resource name to the Resource_dependencies property of the oracle_listener resource.
    For a general overview I recommend reading:
    http://docs.sun.com/app/docs/doc/819-0703/
    Greets
    Thorsten

  • I am new to this program and want to know how to blur the edges of a pic

    i am new to the program and want to know how to blur the edges of a pic?

    Another way...
    Use the Rectangular Marquee tool to draw out the edge to be blurred. Feather the selection. Here I feathered 50 px (note that feathering makes the borders of the selection appear rounded).
    Invert the selection so that the edge is now selected, and apply a Gaussian Blur:
    The reason for feathering is to soften the edge of the blur. The amount of feathering and amount of the Gaussian Blur is simply trial-and-error.

  • I wanted to know how to view the gifts I've sent to people and (if possible) know if they received and downloaded them. Is there any way to do that, other than asking the person?

    I wanted to know how to view the gifts I've sent to people and (if possible) know if they received and downloaded them. Is there any way to do that, other than asking the person? Obviously I want the gift to be a surprise (for my best friend specifically) so asking them if they received it would ruin that.

    Have you tried resetting your iPod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.

  • I ahve a ipod touch of first generation model no.=MC540ll and i want to update my IOS of my ipod to 6.1.5 it requires 2 GB to start i want to know that after instillation the memory will be reduced or not?

    I ahve a ipod touch of first generation model no.=MC540ll and i want to update my IOS of my ipod to 6.1.5 it requires 2 GB to start i want to know that after instillation the memory will be reduced or not?

    A model MC540ll is a 4G iPod and can go to iOS 6.1.5.
    Updating via wifi (settings>General>Software Update requires about 2.4 GB of storage available. After the update all but maybe 50 MB will be returned to for use. iOS 6 takes up only a little more that iOS 5 but the excess storage space is needed to perform the update.
    If you update via iTunes yo do not need exces storage space

  • My mom gave me her computer and i wanted to know how to authorize the iTunes to download my apps/music

    My mom gave me her computer and i wanted to know how to authorize the iTunes to download my apps/music

    http://support.apple.com/kb/ht1420

  • I am new to ios & using 5C. I want to know where is all the media (Images, videos, Audio etc) received through Whatsapp are saved after downloading in Iphone. And also how to access the same.

    I am new to ios & using 5C. I want to know where is all the media (Images, videos, Audio etc) received through Whatsapp are saved after downloading  in Iphone. And also how to access the same.

    These are user to user forums.  You ARE NOT addressing Apple by posting here.
    Also, why are you YELLING at us??  Stop using ALL CAPS.
    What steps have you done to try and fix the problem?

  • I have a project on Imovie with pinned audio to the project. I want to know how to stretch the audio to a specific point of the song?

    I have a project on Imovie with pinned audio to the project. I want to know how to stretch the audio to a specific point of the song?

    See this Tutorial for how audio works in iMovie. In general, you drag the left or right edge of your audio clip.
    You can also use the Clip Trimmer. Click the Gear icon in the music track and select the Clip Trimmer.
    http://www.apple.com/findouthow/movies/imovie08.html#audioclips

  • I want to know at which port the modem comuniacte

    I want to know at which port the modem comuniacte for the first time .
    i want to read the port using socke programming plz help me.
    How to read the port
    Regards,

    The modem itself doesn't communicate via a port in the socket sense. Once it has established a connection (through the serial port), you have a network connection.
    You can then use that network connection to establish sockets.
    Make sense?
    Chris.

Maybe you are looking for

  • How to avoid repeat where clause in oracle sql

    Hi, Please find my query below, I need a help to avoid duplication of **where** clause in my query. In my below query, **JOIN** condition is same for both the queries and **WHERE** condition also same except this clause "and code.code_name="transacti

  • Control recipe destination not available in Process order

    Hi PP-PI Gurus, When i am sending the process maessages to destinations,i am getting the error"No control receipe destination available in process order". When we create master recipe using X-steps, there is no option to enter comtrol recipe destinat

  • Can't Set Item Value After Calling Stored Procedure

    In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate. When I run the form and execute the program unit the stored procedure executes successfu

  • Is there any way to install my paid applications to my brothers ipad or i have to paid again?

    I bought some applications for my ipad2 and i just wonder that can my brother use the same applications or we should pay again ? If we can , please somebody tells me how can i do it?

  • CreateMedia.exe finished with error code 80091007

    Hi, We are having the following error message "CreateMedia.exe finished with error code 80091007" when creating a USB off-line Media to image Windows 7. This only occurs if we include driver packages into the task sequence. We have no issue creating