Report based authorization

I have a 0costarea characteristic. And it has authorisation object. I use this characteristic in two different reports. The question is how can i give a user different restriction for two report? For example in the A report 0costarea=100100,100101,100102 and in the B report 0costarea=100100,100104 so in the B report user mustn't see 100101 and 100102 details also in the A report user mustn't see 100104 details. I have zcostarea authorization in rsecadmin. I couldn't make correct user authorization privileges.

Hello Yunus,
Unfortunately you can not do this . I recommend you to create a copy of that querry and restrict those in query permanently.
Sarhan.

Similar Messages

  • Authorization of alv report based on plants

    I have created a new alv report for sale order statement.The problem is which can be seen in all plants
    irespective of the user.Suppose our company has 5 palnt
    Plant 1100 to 1500
    The problem is suppose a user he has only rights in a prticular plant but he can see all the palnt sale order details
    How can we authorize this particular alv report based on the plants

    Hello,
    My assumption: You have Company Code(T001-BUKRS) in the selection-screen.
    Plz check the code snippet below:
    DATA:
    IT_PLANT TYPE STANDARD TABLE OF WERKS,
    WA_PLANT LIKE LINE OF IT_PLANT.
    DATA:
    IT_R_WERKS TYPE RANGE_T_WERKS_D,
    R_WERKS TYPE RANGE_S_WERKS_D.
    SELECT BWKEY INTO TABLE IT_PLANT
    FROM T001K
    WHERE BUKRS = '1000'. "--> Here you have to use your sel. scr. parameter
    IF SY-SUBRC = 0.
      SORT IT_PLANT BY WERKS.
    ENDIF.
    LOOP AT IT_PLANT INTO WA_PLANT.
    * Check the authority for the plant
      AUTHORITY-CHECK OBJECT 'M_MSEG_WMB'
               ID 'ACTVT' FIELD '03'
               ID 'WERKS' FIELD WA_PLANT-WERKS.
      IF SY-SUBRC = 0.
        R_WERKS-SIGN = 'I'.
        R_WERKS-OPTION = 'EQ'.
        R_WERKS-LOW = WA_PLANT-WERKS.
        APPEND R_WERKS TO IT_R_WERKS.
        CLEAR R_WERKS.
      ENDIF.
    ENDLOOP.
    IF IT_R_WERKS IS NOT INITIAL.
      "Select data using the Plants for which user is authorised
    ELSE.
      "User has no authority to display any Plant data
    ENDIF.
    Hope this is of some help to you.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 18, 2009 10:18 AM

  • Authorization for running report based on Remote Cube

    Hi ,
    I have created a report based on Remote cube in BI 7.0
    I have created a DTP with Direct access to load the Remote cube.
    While running the report based on Remote cube , I am getting error
    'You are not authorized for the DTP '
    The report is running only when I assign the '*' value  to the authorization objects for the role in which the report is stored:
    S_RS_DTP = * (For DTP)
    S_RS_TR = *   (For Transformation)
    S_RS_DS = * (For datasource)
    I want to restrict the values to the objects related to my report only rather than * which means ALL.
    Please help what values to assign for these authorization objects for the Role.
    Thanks.

    Hi,
    You need to make necessary settings in RSECADMIN for the Authorization Objects. The default values will be * . You have to customize them to suit your requirement.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/101fb4f5-eb7c-2c10-5daa-b479c47f0a14
    Regards,
    Suman

  • Authorizations for WEBI report based on BPC data model

    Hi All,
    We are strugelling with setting up authorisations for the reporting on BPC data model.
    We created Bex query on top of Multiprovider that consists of BPC cube. The Bex query is source for WEBI output. The authorisations has been set up on BPC data model (cube) in BPC application but they are not passed nor to Bex query nor to Webi. Example: The query is build on top of OPEX BPC data model, this data model is restricted based on Oranizational Unit. My test user is allowed to see only Org Unit = 'Australia' in the OPEX BPC data model, however when I'm running the report I can see absolutely everything.
    We are not connecting/using any BI cubes itself for this reporting. We are intrested only in the WEBI report based on BPC data models.
    We were trying to use BPC data model (without any extra settings) as the source for BEx report, we were also trying to use virtual BPC data model as the source for Bex transient query - but non of these have helped.
    Can you please advise how the authorisations should be set up for WEBI reporting on BPC data models?
    Kasia

    Anybody can help with this issue please?

  • BO BI 4.0: WebI report based on BEx query (OLE DB enabled)

    Hi Experts
    We are trying to create WEBI reports based on BEx queries, but we are experiencing some issues. We have created two BEx queries og two separate multiproviders and opened them for external use but checking the OLE DB enable checkbox. In WebI we are now only able to use on of the queries as a data source (even though both are OLE DB enabled).
    Are there any limitations to which multiproviders that can be used to create BEx queries for WebI reports?  
    We are using BO BI 4.0 and BW 7.0 SP 5.
    Kind regards
    Erik

    Hi again Henry
    We use BW 7.01 Support package 5 (we know it should have been at least 6), SAP GUI 7.20 patch 9, BEx 7.2 patch 6 and BO 4.0 patch 11.
    The BW user that is synchronized to BO has almost all rights (almost sap_all). When we log on to BEx directly with the same user we use in BO, we are able to run both BEx queries without any problems. When we then log on to BO (with the same user), we are only able to use on of the queries in WebI.
    As you say, we have to following setup:
    -     BO users are synchronized from our BW system and when they log on to BO they use the SAP authentication.
    -     The user that is synchronized from BW has been added to the Administrator group in BO  
    -     The OLAP connection is set to SSO so that the authorization in the BW system is used.
    It is really strange that we are not able to use on of our multi providers in BW in WebI. As you say, we just need to try debugging with changing the authorization concept, changing the OLAP connection setup and so on to see if that helpsu2026
    Kind regards
    Erik

  • How to secure access of Report based on a condition

    Hello Experts,
    My project requirement is to secure BW Reports based on a condition. For e.g a user should be authorized to access the Report if:
    1. He is the WBS Manager of the selected WBS Element
    OR
    2. If he is authorized to access the Profit center Hierarchy Node which is the parent of the selected WBS Element.
    I think this may be achieved by using a Customer exit in the Analysis authorization but i don't know how.
    Do you have any idea, whether it is possible to achieve in BI7 Security Model? Any help will be highly appreciated.
    Thanks
    Rajat

    Hi Tomer,
    There will be a selection variable for WBS in all BW reports. If the user selects a particular WBS Element then he can only see the result of the report if he fulfill EITHER of the following conditions:
    1. If he is the WBS Manager of the selected WBS Element
    OR
    2. If he is authorized to access the Profit center Hierarchy Node which is the parent of the selected WBS Element.
    WBS managers will keep on changing so it is not possible to maintain the users in one role.
    Secondly, according to the second condition, even if the user is not WBS Manager but he is authorized to access Profit center Hierarchy Node, which is the parent of the selected WBS Element, he should view the report.
    Please let me know if don't understand the question.
    Thanks
    Rajat

  • Restrict access in report based on compnay codes and cost centers

    Hi,
    We are using a standard report, which is  assigend to a Z transaction and assigend to the role.
    The report need to be restricted based on the company code and cost center   ?
    but i could not find any AUTHORITY- CHECK statements in the code ( there is only authority check statement for object G_803J_GJB which has authorization groups and aCTVT field.)
    Please let me know what steps need to be followed to restrict the report based on company codes and cost centers.
    Thanks for your help in advance.

    Thanks all for the quick response.
    Steps to be followed:
    1) incorporatomg AUTHORITY-CHECK  statements for K_KOSTL and F_BKPF_BUK objects in the program.
    2) adding the objects as check yes in SU24 for the Z transaction.
    and restricting in the role.
    The program name is "GP3O4ZGOOF3HA68QMGHF8S7I9ER250".
    Please let me know if any more steps need to be followed.
    Based on this i have to send a estimate to my client.
    Thanks,
    Sanketh.

  • To View Report based on Profit Center

    Hi
    I will require Transcation Code to view the report based on Profit center, presently we are using KE5Z T_Code but that report doen't conatin the line items which was derived the data from 1st line item
    For Ex: Expenses Dr
                To, Expenses Payable A/c Cr (Profit center derived from Expenses line)
    these kind of derived line items profit center is not showing in KE5Z, Please let me know where can i get such kind of line items
    Thanks
    Sreenivasulu

    Hi Friends
    The problem has beend solved. It turns out that this is a report writer issue. We raised the issue with SAP and they informed that 'For Report Painter/Writer every item is checked if you have the authori-zation or not. Only the items with authorization fullfilled will be displayed afterwards'.
    Based on SAP answer we created different reports for each profit center/company code.
    I would like to thank you all for your time and inputs.
    Regards,

  • Show / Hide DOWMLOAD link in classical report based on user rights

    Hi,
    using apex 4.1.
    How i can display or hide download link in classical report based on user rights .
    The User who has download rights ,can download the data from classical report Otherwise it should hide.
    I have passed the code in authorization scheme in shared component as named "VIEW"
    DECLARE
    VNAME VARCHAR2(1000);
    BEGIN
    SELECT PAGE_NAME INTO VNAME FROM APEX_APPLICATION_PAGES WHERE PAGE_ID = :APP_PAGE_ID AND APPLICATION_ID = :APP_ID;
    return GET_ADMIN_STATUS_VIEW_NEW(:APP_USER,VNAME);
    END;How i can call "VIEW'' name in download link.

    Right click on the export link, select copy url. Create a button with redirect to URL. Use that URL (or at least everything with and after f?p). Bind rights to the button.
    Or create a second identical report with different rights, give one export enabled and one disabled. The first is better, the second is easier :)
    Edited by: Joni Vandenberghe on 8-feb-2013 5:08

  • Filter standard reports based on user login

    Hi All,
    Is there any way to filter standard form reports (not PLD), based on the user currently logged in. for example, if user 'sales1' has logged in,  he should be able to see the sales report(say sales analysis) for the documents made by him only. there does not seem to have any access on the query being passed to this report. so even customization does not seem to be the solution. kindly help if any one knows a better way or a way at all.
    thnks and regards,
    Binita Joshi

    Hi Petr,
    thanks for replying.
    Before posting, I had already searched in SAP B1 forum and there , for a similar problem, it was advised to use SDK so I posted here.
    I knew, SDK seems to be the way. but, again, As I wrote, I wanted to know, whether there exists a way to filter the standard reports based on the user login. I don't want authorization or setting rights, sort of things.
    but, suppose If user A wants to see the sales documents reports then, he should be able to see the reports of the documents made by him only. so we will have to filter the records based on the Usersign field in marketing documents' tables but, I am clueless on, where should I give this filter.  and I am afraid there is no way to do that. make your own reports and block the access of system reports.Pls right back if U have more to say.
    regards,
    Binita Joshi

  • How to take report for authorization in sap hr

    I am new to this feild . I was inquisitive about taking out reports.Can i take out report based on role.The reports contains which authorization object ,PA/PSA,EG/ESG,which planned version.
    I meant to say every thing which ever appears in the authorization objects..
    Please help

    You can get this info from table AGR_1251
    If you need to report on org levels too then you will need to use agr_1252 as well

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • Generating a report based on two analytics(for ex:PO and PR)

    I have a question regarding generating reports on two analytics.
    In our scenarios,
    We need to generate a report based on Purchase order and Purchase request.Is it possible in OBIA?
    if yes,please provide the solution.
    Thanks in advance

    Hi ,
    Thanks for your valuable time.
    We are in designing phase of the project. we need to know ,Is there any inbuilt dashboards or reports built using both PO and PR repositories?
    I would like to explain with ex:
    Let's say we need a report or dashboard containing few fields from PO and few fields from PR.Let's assume both PO and PR data available at same granularity.
    Do we have any such inbuilt reports or dashboard?
    If not,could we customize the report generation using both PO and PS tables?
    Please provide the solution.
    Thanks in advance.
    Edited by: user3561029 on Aug 31, 2008 9:03 PM

  • R12: How to filter Open Item Revaluation Report based on GL Date

    Hi,
    Anybody know how to filter Open Item Revaluation Report based on GL Date from and GL Date to in R12?
    Since we just upgraded from 11.5.10 to 12.1.3 and found we cannot filter those report for specific date. It shown all data included the old data from 8 years ago also.
    We need to run the report only for specific date only. Please share with me if anyone know about this.
    Thanks.

    Pl do not post duplicates - R12: How to filter Open Item Revaluation Report based on GL Date

  • Sales Analysis Report based on Supplier-wise

    Hi Experts,
    My client requirement is ,We are into trading so , we want a Sales analysis report based on Supplier-wise. like,
    Selection critieria is
    1)Supllier name
    2)From and To date.
    Heading are
    Item name     Sales UoM    Jan(quantity)   Feb(quanitity)   mar(quantity)   April(quanitiy).........
    here, i need only the sum of the quantity for the items for that particular month based on the date giving in selection criteria.
    Regards,
    Dwarak
    Edited by: Dwarak@SMS on Aug 23, 2010 4:29 PM

    Hi experts,
    For my clients requirement,
    I could able to alter my previous query(find below).
    My object is
    1)To get sales report based on Manufacturer.
    2)To get the TOTAL SALES QUANTITY OF THE MONTHS in the report. I go that in the below query, and only thing is that is have to minus the total Credit note for items to get the ACTUAL TOTAL SALES OF THE MONTHS. so , can anyone help me to alter the query to get me the ACTUAL TOTAL SALES OF THE MONTHS.
    the query is
    SELECT T0.ITEMCODE,T0.ItemName,T0.OnHand,
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'JAN ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'FEB ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'MAR ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'APR ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'MAY ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 6 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'JUN ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'JUL ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'AUG ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'SEP ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'OCT ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'NOV ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'DEC '
    FROM dbo.OITM T0
    LEFT JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode WHERE T0.SellItem = 'Y' and T0.[FirmCode] =[%0]
    GROUP BY T0.ItemCode,T0.Itemname,T0.OnHand,YEAR(T1.DOCDATE) HAVING YEAR(T1.DOCDATE) =
    YEAR(GETDATE())-0
    ORDER BY T0. ITEMCODE

Maybe you are looking for

  • Incoming calls are going directly to Voicemail, Iphone 5S

    I switched phones from an Iphone 4 to this Iphone 5S and my incoming calls are going directly to voice-mail and not ringing the phone. The only app I downloaded that is different from my Iphone 4 is the GroupMe app, but I don't know if that is necess

  • "Mail cannot update your mailboxes because your home directory is full"

    I have a 250 GB hard disk, 4.34 GB of which is in my "Home" folder. (Total HD usage is about 27 GB.) This happened suddenly after Mail had been working fine for eons. I deleted a bunch of files (107 MB) in a "Drafts" folder (none show up in the Mail

  • HP Photosmart Premium C309g-m prints wirelessly from Mac & Vaio, but not Dell...

    We bought an HP Photosmart Premium C309g-m about a month ago. It will print from my (old) Mac Book Pro and from hubby's new Sony Vaio, via cable, via bluetooth, and via wireless. We want to add a Dell laptop, and have installed the latest printer sof

  • Save Workbook in a role in SAP BI

    Hi All, I'm facing an issue in SAP BI 7.0 Security . I have created a Workbook role for a user which she is not able to view when she goes to RRMX>Save Workbook>  . The user has all the required authorizations and she can see all the other workbook r

  • Flash Builder 4.5 crashes continuously

    We have a reasonably complex AIR application, but by and large I would not say it is enormous. It compiles down to an AIR file that is around 6MB. It is broken out into about 6 different modules. We have given the java VM the maximum RAM that it will