Automatic creation software metering rules

hi 
I have installed SCCM 2012 r2 with two servers .A site server and a database server .I enabled software metering on client settings and software and hard ware inventory .But I ve got a problem that sccm doesn't create software metering rules automatically
.I had already enabled Automatic create software metering rule on SMW properties . But no luck yet.
when I create a rule manually It works fine but Its not working automatically . 

you have configured 2% of computers must use the disabled programs to activate automatically (Specify
the percentage of computers in the hierarchy that must use a program before a software metering rule is automatically created) .so pls check if any of the computers are using the disabled programs or not.Login to test computer and use the disabled
program and then check the status.
Eswar Koneti | Configmgr blog:
www.eskonr.com | Linkedin: Eswar Koneti
| Twitter: Eskonr
I have more than 500 clients with enabled software metering .Dont you think it is enough to create rules automatically .?

Similar Messages

  • Automatic Creation of Settlement Rule for Maintenance Order

    Hi,
    While doing TECO for Maintenance Order, its asking for Settlement Rule. IF I click settlement rule, message is coming as Maintain Settlement Profile with options like With Default, Without Default & Cancel.
    I have maintained the Cost center in Equipment Master. Also I maintained Cost Center as Default Settlement receiver.
    Also I have gone through setting in Automatic Creation of Settlement Rule under Controlling Category.
    But I couldnt understand that. Can you please tell what are the steps to be done?
    Regards,
    Maheswaran.

    Hi,
    Please check the indicatorsin Actual cost/cost sales  and Valid recevivers in settlement profile.
    If for cost center : 1 settlement optional is maintained in valid recevivers and also for order
    and in actual cost/ cost sales: indicator to be settled in full is selected.
    Also check Allocation structure too if you have assigned the valid allocation structure.
    **check if you have assigned the valid settlement profile to order types.
    *****Most important after doing all these settings you need to create new order. for same order you will not get the automatic settlement rule
    Hope this helps.
    Regards,
    PMAddi

  • CO: IO automatic Creation of settlement rule

    Hello everyone,
    We created a customer field in internal order (ZWBS field).
    Now, I customized all transactions:
    1. By T-code KSR4 I created Strategy 'C25'.
    2. I created Strategy Seq. called 'ZC25' by T-Code 'KSR2_ORC'.
    3. I' have Assigned the strategy Seq. to the order type by T-code 'KSR2_ORC'.
    When I create and internal order and go into Settlement rule I can see the two lines (FUL & PER) exactly like I've customized, but when I'm saving the order, the settlement rules are not save with the order.
    Is anyone met with a problem like that?
    I'll be gratefull for your help.
    Thanks,
    Lior

    Hi Lior,
    Is this the same with CO: Automatic creation of Settlement rule - settlement rule not saved?
    Best Regards,
    Owen

  • CO: Automatic creation of Settlement rule - settlement rule not saved

    Hello,
    First, We have a customer field in our internal order called 'ZWBS'.
    also, I have  customized automatic Creation of settlement rule for internal order by:
    1. T-code KSR4 - I have created Strategy called 'C25'.
    2. I created Strategy Sequences for Automatic Generation of Settlement Rule called 'ZC25'
    with T-code KSR2_ORC.
    3.I Assigned the Strategy Sequence To Order Type ZC25.
    4. I used User Exit COOM0003 in order to create Settlement rule from ZWBS field.
    In KO01, when i go into the settlement rule I can see the 2 lines that the user exit created.
    The problem is that when i'm saving the internal order the settlement rules are not saved.
    My questions are:
    1. Is anyone met this problem?
    2. is the user exit work on T-code KO02 also?
    thanks for your help.
    Best regards,
    Lior

    Hi Lior,
    Hope below information can give you some hints:
    See the detailed description of the error for example for order, in transaction KO02, click button 'Master data', click button 'Settlement Rule', populate column category with 'PSG' and press
    <enter>. On the 'Assignment to a Profitabilty Segment' screen press button 'Derivation' and see the long text of message K/111. In case the generation of settlement rules fails again later use these steps to find out why and check the derivation rule by means of transaction KECM.
    Best Regards,
    Owen

  • SCCM- software metering rules.

    HI All,
    Can some one share the information on how we can create software metering rule for Adobe in SCCM 2007?
    Also, where can we find the correct file name or product name for the software to be metered?
    Rgs,

    Here are the Technet information and a step by step guide about software meetering:
    http://technet.microsoft.com/en-us/library/bb633043.aspx
    http://blogs.msdn.com/b/minfangl/archive/2011/04/29/step-by-step-on-how-to-use-software-metering.aspx

  • Run automatically several software metering

    Hi,
    I have 289 Rules in my software metering.
    I want to run automatically this reports "Computers that have run a specific metered software program" with each of my rules of software metering.
    I'm a dummies in SCCM Repports and SQL, can you help me please ?
    Thank You
    PS : Sorry for my English

    You could also create a custom report that will use a SQL cursor (http://technet.microsoft.com/en-us/library/ms180169.aspx) that enumerates all metering rules first and then runs
    the report you mentioned for each metering rule found.
    Torsten Meringer | http://www.mssccmfaq.de

  • Automatic creation of  settlement rule while creating sales order

    Hi Friends,
    Can any one help me how to create settlement rule automatically while creating sales order i.e saving sales order. Is there any function module or any badi which can be used.. please suggest.
    thanks
    bobby

    Hi,
    Here is the solution , First Create a sustitution by going into OPSN Transaction , only user exit say 'U902'
    and write the form routine in Program named 'ZRGGBS000'
    The code is below ,
    *&      Form  U902
       Automatic Generation of Settlement Rule For WBS and Company 4180
    FORM u902.
    Exit For Automatic Settlement Rule Creation for WBS Billing elements
      IF sy-tcode = 'CJ20N' or sy-tcode = 'CJ01' or sy-tcode = 'CJ02'.
        DATA   lv_proj TYPE ps_pspid.
        lv_proj = proj-pspid.
        EXPORT lv_proj TO MEMORY ID 'PSPID'.
    Calling YGPS_CJB1EXEC Program For Creating Settlement Rule
        SUBMIT ygps_cjb1exec AND RETURN.
      ENDIF.
    ENDFORM.                                                    "u902
    *& Program  YGPS_CJB1EXEC
    PROGRAM  ygps_cjb1exec.
       Automatic Generation of Settlement Rule For WBS and Company 4180
    Called From Exit For Automatic Settlement Rule Creation for WBS Billing elements
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata,
          itab TYPE TABLE OF bdcmsgcoll.
    DATA :lv_currm LIKE bkpf-monat,
          lv_curry LIKE bkpf-gjahr,
          lv_prevm LIKE bkpf-monat,
          lv_prevy LIKE bkpf-gjahr,
          lv_proj TYPE ps_pspid,
          lv_mode TYPE c,
          lv_time TYPE sy-uzeit.
    DATA :g_datfm            LIKE usr01-datfm,
          g_dd(2)            TYPE c,                         " Day
          g_mm(2)            TYPE c,                         " Month
          g_yyyy(4)          TYPE c,                         " Year
          g_sydatum(10)      TYPE c.
    IMPORT lv_proj FROM MEMORY ID 'PSPID'.
    lv_mode = 'N'.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKAZB'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'PRZB-VARIANT'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'PRZB-VARIANT'.
    bdcdata_wa-fval = 'ZGPS0001'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        bukrs = '4180'
      IMPORTING
        currm = lv_currm
        curry = lv_curry
        prevm = lv_prevm
        prevy = lv_prevy.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-FROM'.
    bdcdata_wa-fval = lv_currm.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-GJAHR'.
    bdcdata_wa-fval = lv_curry.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=VARC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'RKPSEL00'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'CN_PROJN-LOW'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_PROJN-LOW'.
    bdcdata_wa-fval = lv_proj.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_PSPNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_NETNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_ACTVT-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_MATNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '/00'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=SAVE'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=VBAC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSPO1'.
    bdcdata_wa-dynpro   = '0100'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=YES'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKAZB'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-BATCH'.
    bdcdata_wa-fval = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-TEST'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=RUN'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKABA'.
    bdcdata_wa-dynpro   = '0210'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-JNAME'.
    bdcdata_wa-fval = 'CJB1_EXEC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_SUBSCR'.
    bdcdata_wa-fval = 'SAPLKABA'.
    APPEND bdcdata_wa TO bdcdata_tab.
    Extract the date format from the user settings
    PERFORM f_get_dateformat CHANGING g_datfm.
    Changing the current date format to User Profile Date Settings
    PERFORM f_format_date USING   g_datfm
                                  sy-datum+4(2)
                                  sy-datum+6(2)
                                  sy-datum+0(4)
                         CHANGING g_sydatum.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-STDAY'.
    bdcdata_wa-fval = g_sydatum.
    APPEND bdcdata_wa TO bdcdata_tab.
    lv_time = sy-uzeit  + 30.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-STTME'.
    bdcdata_wa-fval = lv_time.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-PRIKZ'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=TAKE'.
    APPEND bdcdata_wa TO bdcdata_tab.
    Calling Transaction 'CJB1' for creating settlement rule
    CALL TRANSACTION 'CJB1'  USING bdcdata_tab MODE lv_mode .
    IF sy-subrc = 0.
    ENDIF.
    *&      Form  F_GET_DATEFORMAT
          This subroutine returns the date format in the user setttigs
         <--P_G_DATFM  Date Format
    FORM f_get_dateformat CHANGING p_g_datfm.                   "#EC *
      SELECT SINGLE datfm FROM usr01 INTO p_g_datfm
      WHERE bname = sy-uname.
    ENDFORM.                    " F_GET_DATEFORMAT
    *&      Form  F_FORMAT_DATE
          This subroutine returns the date as per the user settings
         -->P_G_DATFM  Date Format
         -->P_G_MM  Month
         -->P_G_DD  Day
         -->P_G_YYYY  Year
         <--P_G_DATE  Date
    FORM f_format_date USING    p_g_datfm
                                p_g_mm
                                p_g_dd
                                p_g_yyyy
                       CHANGING p_g_date.                       "#EC *
      CONSTANTS: c_dot VALUE '.',
                 c_slash VALUE '/',
                 c_dash VALUE '-',
                 c_1 VALUE '1',
                 c_2 VALUE '2',
                 c_3 VALUE '3',
                 c_4 VALUE '4',
                 c_5 VALUE '5',
                 c_6 VALUE '6'.
      DATA: l_day(2),
            l_month(2).
      l_day = p_g_dd.
      l_month = p_g_mm.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = l_month
        IMPORTING
          output = l_month.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = l_day
        IMPORTING
          output = l_day.
      CASE p_g_datfm.
        WHEN c_1.
          CONCATENATE l_day l_month p_g_yyyy INTO p_g_date
              SEPARATED BY c_dot.
        WHEN c_2.
          CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
           SEPARATED BY c_slash.
        WHEN c_3.
          CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
              SEPARATED BY c_dash.
        WHEN c_4.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_dot.
        WHEN c_5.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_slash.
        WHEN c_6.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_dash.
      ENDCASE.
    ENDFORM.                    " F_FORMAT_DATE
    thanks
    bobby

  • Software Metering Rule not working SCCM 2012

    No usage data found to generate software metering report.
    mean that the
    machines ran meteriing, but there isnt nothing on the machiine that matches the
    meter rule so it says
    No usage data found to generate software metering
    report, int the SWMTRReportGen.log?
    Please help me in this issue.
    Regards,
    Faisal Alvi

    a common mistake is to configure a specific language and/or version that is not present on all machines.
    Kent Agerlund | My blogs: blog.coretech.dk and
    SCUG.DK | Twitter: @Agerlund | Linkedin:
    Kent Agerlund | Author:
    Mastering System Center 2012 R2 The Fundamentals

  • SCCM 2012 report/data for importing software metering rules..

    Hi, 
    I have a customer who would like to start using software metering. The plan is to create the rules manually, since I guess it would be overkill and/or have an huge performance impact to enable it for all...? We might be talking about 100-300 applications.
    To do it manually, a powershell script can be used for creating these based on a txt file containing the following information.
    Productname,  FileName,  OrginalFileName,  FileVersion
    The customer has then asked for a report/csv file showing these information for all .exe files, so they can pick what they want to have metered. The data amount will for sure be huge and unmanageable.
    Anyone has a good approach for this challenge? :-)
    Thanks in advance.
    Best regards
    Thomas

    The approach is to say NO, what they are asking for is huge in the range of 100,000 different exes, there is no way anyone will go the list. Instead, look at the build in report for count of installed software products and sort from largest count
    to smallest. Then create SWM rules for those applications that have a cost and not everyone has. Aka why would you crate a SWM rule for WORD or EXCEL? But it does make sense to create a rule for Visio or AutoCAD.
    Also why create a rule for two different version of Visio? Do you need it, why? Are you sure?
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Automatic Creation of Settlement rule with the settlement type - AUC

    We have a situation where I have created an Internal order for AUC. But unable to create the setlement rule automatically with the settlement type -AUC. Please guide us.

    Hi,
    This is possible through investment management module.
    Define an investment profile using OITA and assign the asset class of AuC in investment profile. Assign investment profile to internal order master data.
    AuC will be created on settlement automatically on settlement of inernal order when processing option "Automatic" is selected in KO88.
    Regards
    Chetan.

  • IO automatic creation of plan settlement rule according to actual settlemen

    Hi guys,
    does anybody know, if it is possible to create mass wise plan settlement rules on internal orders according to actual settlement rule? Sounds like a normal requirement, but I did not find anything.
    Automatic creation of settlement rule seems only to work like (KSR1_ORC in customizing):
    01     No autom. calculation / manual maintenance
    02     Settlement to a profitability segment
    03     Settlement to a requesting cost center
    04     Settlement to a responsible cost center
    05     Settlement to sales order
    06     Settlement to a WBS element
    08     Settlement rule from assigned WBS element
    30     Settlement on Acct Assgnmnt from CRM or Errors
    31     Settlement on Acct Assgnment from CRM or on Event
    35     Settlement on Receiver from Accounting Indicator
    but nothing like "automatic on basis actual settlement rule"....
    Note: we can not use any of the above rules for plan, since also actual has to be entered manually.
    br
    Bjoern

    Hi
    See if you can use exit COOM0003 for auto creation of settlement rules.. Here you can write your own logic
    br, Ajay M

  • Software Metering Security Cannot Create Rule

    I recently created a role in SCCM 2012 using RBAViewer.exe granting yes to all permissions under the Software Metering Rule section. However, when a user with this rule assigned access the console, the ability to create a new rule is grayed out in the
    interface. Is there an additional permission that needs to be granted in order to make this happen?

    Hi,
    The problem should be the security scope. The user can create a new rule when I assign the "Default" security scope to an user or choose "All instances of the objects that are related to the assigned security roles"
    Best Regards,
    Joyce
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • SCCM 2012 Software Metering - Status Message ID

    Hi All,
    I am planning to
    configure “Automatic Software Uninstall”
    based on software metering rules as outlined in the following blogs.
    http://blogs.technet.com/b/neilp/archive/2012/11/27/software-metering-deep-dive-and-automation-part-1-use-it-or-lose-it-the-basics.aspx
    http://blogs.technet.com/b/neilp/archive/2012/11/29/software-metering-deep-dive-and-automation-part-2-use-it-or-lose-it-the-collections.aspx
    However, the account
    is currently installing software based on AD Software install groups.
    If a user does not
    use the software the software metering rule will ensure the machine is
    populated into the application uninstall collection. However, (problem) the
    machine account is still in the Install AD group and therefore, the uninstall
    will not occur, (as install deployment takes precedence over uninstall
    deployment)
    I could configure
    the install collection to exclude the uninstall collection, which would allow
    the software to uninstall. But, then once the machine automatically gets
    removed from the uninstall collection the software will install again as the
    machine is still in the AD group.
    Solution: Remove the machine account from the
    AD install Group.
    Question: What the best automated approach to
    remove the machine from AD install group. I am thinking along the lines of
    using Status Message ID’s based on the metering rule which causes a script to
    fire and remove the machine from the AD group.
    Would I have to
    create a status message Rule for each application? Or is it possible to create
    a generic one that can be leveraged for each application / metering rule
    combination?
    What Status Message ID should I use ?
    I would appreciate
    and comments or suggestions on the matter?
    Thanks
    Paul.

    Hello,
    You referred AD group, did you install this application via group policy?
    I think you can find out these machines via result of software metering. The following article show software metering rule:
    https://technet.microsoft.com/en-us/library/dd334612.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Software Metering Properties greyed out

    Hello,
    I'm trying to configure automatic software metering rule generation, however, the Software Metering Properties button under Software Metering -> Home -> Settings is greyed out.  Software Metering is enabled in the Device Settings that are deployed.
    Please advise.
    Thank you.

    Hi BGeez37,
    Please try the following:
           Log in with the account that installed the primary site server. In the Administration workspace, select Security, Administrative Users and open
    the properties for the ConfigMgr Administrators group.
    Click Add, Security Scope and select "Only the instances of objects that are assigned to the specified security scopes and collections.
    Click OK
    Sratcli

  • Software Metering Report Wildly Inaccurate

    I've recently begun using the Software Metering feature in SCCM 2012, and when I pulled a certain report for my supervisor some of the information was incredibly inaccurate. Specifically, the "Total Usage of all Metered Software" report tells me
    that in the month of September we had 20,000+ users open Internet Explorer. However, if you click the software entry for Internet Explorer it reroutes you to the "Usage Trend Analysis" report that displays a much smaller number for that specific
    month - more like 600 users. Other software items have presumably correct entries that are identical in both the Total Usage and Usage Trend reports, but a handful of programs like IE, Chrome, and some Office products are showing up in the Total Usage with
    tens of thousands of users counted while another much more reasonable number is reported in the Usage Trend data.
    I've checked the Software Metering rules, and they're pretty bare bones - executable file name, neutral language or sometimes just English selected, and an asterisk for version numbers.  Nothing special, as far as I can tell.   Any thoughts
    on how this might be happening?

    Well this is interesting - I think the Total Usage for All Metered Software report must be completely screwed up on our system.  I can't tell what the query is searching for, but none of the data appears to be accurate except Terminal Services use. 
    For any software entry, if I click it and compare the "Users" column data from Total Usage for All Metered Software to Total Usage Trend Analysis, it's always off.  The query looks pretty straightforward, insofar as I understand things:
                declare @TimeKey int
                set @TimeKey=100*@Year+@Month
                select mr.ProductName as C018,
                IsNULL(UC.UCount,0) as C049,
                IsNULL(TSUC.TSUCount,0) as C050,
                IsNULL(UC.UCount,0)+IsNULL(TSUC.TSUCount,0) as C051,
                mr.SecurityKey
                from fn_rbac_MeteredProductRule(@UserSIDs) mr
                left join
                select SecurityKey, count(*) as TSUCount
                from
                (select distinct mf.SecurityKey, mus.ResourceID, mus.MeteredUserID
                from fn_rbac_MonthlyUsageSummary(@UserSIDs) mus
                join fn_rbac_MeteredFiles(@UserSIDs) mf on mus.FileID=mf.MeteredFileID
                where mus.TSUsageCount > 0 and
    mus.TimeKey=@TimeKey) as TSUsers
                group by SecurityKey
                ) as TSUC on mr.SecurityKey=TSUC.SecurityKey
                left join
                --select mf.SecurityKey, count(distinct ResourceID) as UCount
                select mf.SecurityKey, count(*) as UCount
                from fn_rbac_MonthlyUsageSummary(@UserSIDs) mus
                join fn_rbac_MeteredFiles(@UserSIDs) mf on mus.FileID=mf.MeteredFileID
                where
                -- mus.TSUsageCount = 0 and
                mus.UsageCount > 0
          and mus.TimeKey=@TimeKey
        group by mf.SecurityKey
    ) as UC on mr.SecurityKey=UC.SecurityKey
    order by mr.ProductName

Maybe you are looking for