Creating Sales Employee Report in Business One 8.82

Hi,
Can someone provide me the query to create a Sales Report sorted by Sales Employee and Business Partner. The report contains the following columns:
Sales Employee, Business Partner Name and Acct Number, Sale for Current Month (or month provide in the report parameter), Sales for same month last year, YTD-this year, YTD-last year.
Thanks

Hi Sam,
As per your requirement here i provide you the sql query for SALES Report.
DECLARE
@StartDate DATETIME,
@EndDate DATETIME,
@Dummy INTEGER
SELECT TOP 1 @Dummy = DocNum
FROM  OINV T0
WHERE T0.DocDate >= [%1]
AND T0.DocDate <= [%2]
SELECT
@StartDate= '[%1]',
@EndDate = '[%2]'
SELECT DISTINCT
T0.Docentry,
T0.DocNum as 'Bill No.',
CONVERT(VARCHAR(10), T0.DocDate, 3) AS 'Bill date',
T0.CardName AS 'Customer Name' ,
T1.Dscription AS 'Item Description',
T1.Quantity,
T1.Price AS 'Price',
T1.TaxCode,
T1.LineTotal AS 'Basic Line Total' ,
(SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
FROM INV4
WHERE INV4.StaType = -90
AND INV4.DocEntry = T0.DocEntry
AND INV4.LineNum = T1.LineNum) AS 'BED',
(SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
FROM INV4
WHERE INV4.StaType = -60
AND INV4.DocEntry = T0.DocEntry
AND INV4.LineNum = T1.LineNum) AS 'Cess',
(SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
FROM INV4
WHERE INV4.StaType = 9
AND INV4.DocEntry = T0.DocEntry
AND INV4.LineNum = T1.LineNum) AS 'HeCess',
(SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
FROM INV4
WHERE INV4.StaType = 1
AND INV4.DocEntry = T0.DocEntry
AND INV4.LineNum = T1.LineNum) AS 'VAT',
(SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
FROM INV4
WHERE INV4.StaType = 8
AND INV4.DocEntry = T0.DocEntry
AND INV4.LineNum = T1.LineNum) AS 'CST',
T0.Comments
FROM OINV T0
INNER JOIN INV1 T1
ON T0.DocEntry = T1.DocEntry
WHERE T0.DocDate >= @StartDate
AND T0.DocDate <= @EndDate
AND T1.TargetType < > 14
Thanks,
Nishit Makadia

Similar Messages

  • I need help on Complete Sales Order Cycle using Business One

    Hai,
       Actually I am crating an external application using Business one DI API, Now I need a Complete Cycle of Sales Order Cycle from Sales Order Creation to Goods issues, goods receipt ,invoice generation , pick and pack etc
       Anybody Please help me out on generating a Complete Sales Order Cycle using Business One GUI or theory by using Business One
      Please help me out in this regard
      with regards
    Somaraju

    Somaraju,
    You may want to look at the Sample Code example that is part of the 2005A Business One SDK that shows and external Business One interface written in VB.Net that shows how to create a Sales Order/Invoice in SAP Business One.  This example can be found at: Start > Programs > SAP Business One > SDK > Samples > COM DI > 05. OrderAndInvoice.  For complete training on the processes you are asking about from within the SAP Business One product, you can reveiw the SAP Business One eLearning product training if you are and SAP Business One partner in the areas that you have outlined at service.sap.com/smb.
    Hope that helps,
    Eddy

  • Crystal Reports and Business One Problems

    Hello all
    Some questions about Crystal Reports and Business One, I try run some Crystal reports developed in special but for some reason when I ussing Terminal Services this unplug, so, more strange its when the user are not administrators because when are adminstrators this problem is not present.
    Some tip its welcome.
    Thanks a lot

    Hi Ricardo,
    I checked the privileges point to point, even as he opened like to administration, but no response as to assign regular users, that is strange.
    >I didn't  undertstand these statement .What do you mean  by point to point .There is only one place you have to specify was user has access to the group you have defined .As described , it is done in number 4 .(Please refer to that )
    When we are talking about user -there is two user --One is superuser and regular user
    If you are super user , you have to give permission to other users to only crystal report and regular user  doesn't need access to Administration module <referring he opened like to administration> .
    BTW , Are you familiar with crystal report administration in SAP b1 ? You can find several thread poiting towards training material in the forum
    Hope this helps
    Bishal
    Edited by: Bishal Adhikari on Mar 2, 2009 2:43 PM

  • How to Develop the ABAP Reports in Business One

    HI all;
    am New to SAP Business One,
    How to Develop the Z Reports in Business One ? like Normal ALV Reports and other??
    Can we have the ABAP Editor and Other Transaction in Business One.
    -Ravi

    Hi Sharma,
    Thanks for Your Replay,
    This is what my requirement !.
    Hi Experts,
    Here we are integrating SAP Business One with 3rd Party tool. !!
    We need to Develop Customize Report in Business one and These Reports Out Put Will Convert into XML Files (Third Party System Can Understand Only XML files) and stored in Application Server/ Presentation Server.
    How to Develop the u2018Z/Yu2019 Reports in Business one ? Can we use SE38 (R/3 ABAP Editor and other T-codes) in Business One.? Or  is there any tools to develop the Business One Reports ?  How to Convert the Report out put into XML File?
    Thanks,
    Upender.

  • To create a new company in business one

    How would I create a new company in business one that exisited on another system?

    Hi Jonathan,
    You can take back of Existing Database from that Server Server 1.
    Then in other Server Server 2 in SQL, Create one database in SQL and then Restore Back up of Database which you have taken from another Server i.e. Server 1.
    After Restore of Database in Sever 2 in SQL, you can Login in Restored Database which you have done just now.
    In Addition, Please check below link.
    Back Up and Restore of SQL Server Databases
    How to restore SAP Business One Backup?
    Hope this help
    Regards::::
    Atul Chakraborty

  • How to create Sales Employee Without HR?

    Dear all,
    I checked the function of creating sales employee without HR but it only generate the two request only, but i cannot create the sales employee.
    Can any plz send me the details for the same.
    Thx & Regards,
    PM

    hello, friend.
    try t-code VPE1 or PAL1.  even without HR, you may have to define certain HR organizational units in Enterprise Structure (e.g. personnel areas and sub-areas).
    regards.

  • Fail to create sales employee without HR

    Hi experts,
    When creating sales employee, the error message below pops up. Actually, employee group Z & employee subgroup Z1 have been defined. Z1 has been assigned to Z.
    Plz help solve. Many thanks.
    "No entry in table T503 for    Z Z1
    Message no. PG301
    Diagnosis
    The input values must be stored in table T503. The value or values "   Z Z1" are not in the table.
    Procedure
    Check that the entry is correct.
    If necessary, notify systems administration so that the entry can be included in the table."
    Edited by: Cathy on Jun 28, 2010 4:01 AM

    Hope it is a HR config related error. Kindly check following links of understanding:
    No entry in table T503
    Re: No entry in table T503 for "D"
    [facing T503 problem|http://www.sap-basis-abap.com/hr/sap-hr-questions.htm]
    Links for Sales employee without HR:
    Re: sales employee
    How to get data from 3 ODS into 1 ODS?
    Sales employee without HR
    Thanks & Regards
    JP

  • SAP Standard "Sales Employee" Report

    Dear Gurus,
    All my standard reports are ok, but when I am running the sales employee report, it maintain in the order and the invoice. System cant show the result against specific sales employee.
    Although if I run the same report with out assign the sale employee on the selection screen it through the data, and still in the drill down cant shows the sales employee wise breakup. MC-Q is the tcode.
    Looking forward for the gurus response.
    Regards,

    Hi,
    If you want to view sales employe analysis then first you check how values should updated in LIS for sales employee.
    Go to OMO1 double click on info-structure S006 - Sales employee
    Then click on day and synchronous updating-1 so values will update daily and you can able to view it immediately
    OR
    Alternatively you can view report on basis of sales employee through some around the work
    VA05for sales order and VF05 for Invoice where under partner function maintain your Sales employe partn. function and execute.
    Where as in VA05N enter Partner Functions Responsible and Personnel Number Responsible and execute report.
    kapil

  • Creating Sales Analysis Report in B1

    Can someone please help me with writing a query to pull Sales Analysis Report sorted and grouped by Sales Employee and Business Partner.
    The report contains the following columns:
    Sales Employee Name and Number, Business Partner Name & Number, Current Month Sales (or the month specified in the report parameter), Same Month's sale last year, YTD-Current Year, YTD-Previous Year
    Also, if you are interested in working on small Business One projects, please contact me with your resume, rate and location. You can work remotely.
    Thanks

    Hi Sam,
    Please check below links and modify according to your requirement.
    Sales Analysis query
    Re:Query for Statewise Sales Analysis Report involving two years..!!
    by below link you can take reference of Queries.
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Crystal report in business one

    Hello experts.
    Does anyone know how I would go about writing a formula or single prompts to accomplish the following?
    I would also need it to work from SAP. So far, when I create a parameter and preview in business one, business one crashes and shuts down.
    -selection criteria
    a)Print the entire report for all packages and pickers
    b)Print for a selected package regardless of picker
    c)Print for a selected Picker
    d)Print for a selected picker group

    Hi Stephanie,
    You can easily achieve this in the CR Designer by:
    1) Creating two 'Optional Prompts' - one for Package and one for Pickers
    2) Adding a record selection formula. E.g:
    (Not(HasValue({?Package})) OR {?Package} = {Database_field})
    AND
    (Not(HasValue({?Picker})) OR  {?Picker} = {Database_field})
    3) If this doesn't work from SAP B1, you'll need to ask for help in the B1 space.
    -Abhilash

  • Reuse Sales Quotation in SAP Business One Addon

    I m designing an addon for SAP Business One using  VB .net 2005.
    I have created a menu for that Addon.
    Now i want to open the existing SALES QUOTATION from a sub menu of my new ADDON Menu.
    Please tell me if it is possible or not ?
    If it is possible then please tell me the whole procedure how can we do that ??
    Please reply as soon as possible

    Hello itsatish,
    open a quotation with the method:
    ActivateMenuItem("2049");
    Then automatic fill the documentNumber and create a click-event on the searchbutton
    HTH Regards Teun

  • The Sales Process in SAP Business One

    Dear All,
    In Sap Business One the normal Sales Process is Sales Quatation > Sales Order > Delivery > AR Invoice.
    Now Business One allows to do Delivery without the 2 sales process of Quotation or Sales Order. It allows to make direct delivery or AR Invoice but I need a system by which I can define that a specific user cannot make a delivery or AR invoice without Sales Order or the user cannot make sales order without Sales Quotation or AR invoice cannot be made without Sales Quotation > Sales Order > Delivery.
    How can the above possibilities be posible in SAP Business One 2005B.
    Thanks and Regards,
    Kawish

    Hi Satish & Suda
    Thanks for the required information. But I am getting error message when I am using in SQL and executing.
    Please note that I have pasted your code as under :
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(25),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    declare @usersign int -- to get usersign of current document
    declare @usercode varchar (30) -- to get usercode for the usersign
    select @error = 0
    select @error_message = N'Ok'
    IF delivery is created without having a sales order as base document then do not allow the delivery
    Object_type 15 is "Delivery Note"
    IF @transaction_type = 'A' AND @object_type = '15'
    BEGIN
    -- get the current user sign and corresponding user code
    set @usersign = (SELECT (ISNULL(T0.UserSign,-1)) FROM ODLN T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del)
    set @usercode = (select user_code from ousr where userid=@usersign)
    -- validate basedocument exists or not
    IF EXISTS (SELECT T0.ItemCode FROM dbo.DLN1 T0 WHERE T0.BaseType = -1 AND T0.DocEntry = @list_of_cols_val_tab_del)
    BEGIN
    -- validate the user (if user is manager then do not restrict)
    IF @usercode 'manager'
    BEGIN
    set @error = 1998
    set @error_message = N'Delivery Document cannot be created without Sales Order. Copy from Sales Order.'
    END
    END
    END
    -- Select the return values
    select @error, @error_message
    end
    But I am getting the following error message while executing :
    Msg 102, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 26
    Incorrect syntax near 'created'.
    Msg 102, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 39
    Incorrect syntax near 'manager'.
    Please note that in SAP Business One I have made user name test1 who is not a superuser and I want this user test1 to get blocked delivery note if it is not made from sales order.
    Thanks and Regards,
    Kawish

  • Set up a template for sales quotes in SAP Business One.

    I would like a sales quotation template to contain the same 10 items so that I do not have to enter the items each time. What is the best way to do this? Is there any sales quotation template in SAP for this?
    I am using SAP Business One 2007A SP0 PL49 and B1UP.

    You may use Draft function to make your own template for Sales Quotes.
    Thanks,
    Gordon

  • PL/SQL API for Creating Sales Order in E Business Suite from BPEL

    Hi,
    I am new to Oracle SOA 11g.
    I have done the Deleting Sales Order using PL/SQL API ( Oracle Apps Adapter ) [ API Name: OE_ORDER_PUB.DELETE_ORDER ]. While executing the BPEL, it is correctly deleting Sales Order in E Business Suite which is created EBS User Interface. I don't face any problem while deleting the sales order.
    Now, in same way, I have to create a new Sales Order using PL/SQL API. I don't find any API's related to creating Sales Order in Order Management Suite (OM_PF) -->Order Management (ONT) --> Sales Order (ONT_SALES_ORDER) --> PL/SQL --> Process Order API (OE_ORDER_PUB) in Module Browser.
    Please tell me which PL/SQL API to use to create new Sales Order in BPEL.
    Thanks,
    -- Gowtham

    You may be on a different patch level. Can you ensure that you have applied all latest patches for your version?
    See sample code at http://jyotioraapps.blogspot.com/2009/08/use-of-oeorderpubprocessorder-to-create.html
    Hope this helps,
    Sandeep Gandhi

  • Unable to create new connection using SAP Business One

    Hi all,
    I am unable to make a connection using the new SAP Business One connetion provided with the 8.8 release of SAP Business One Crystal Report Integration Package.
    There are no Companies available to select from.  When I try to manually type in the company name, the logon fails.  If I then press "Cancel", I get a message that Crystal reports encountered a problem and needs to close.  The details of the error refers to the following DLL: crdb_b1.dll.
    The connection is successful from another PC that only has the Client installed (and uses the License server on our server, which also contains the databases.)
    I have a local installation with my own license server.  I am not even able to connect to the database on my local PC.
    Please can anyone explain why this isn't working?
    Regards,
    Rikard

    Hi Rikard,
    You may get better help if you post your question to the Business One forum. I can' t move your post.
    Thank you
    Don

Maybe you are looking for

  • ALE third party: User name in change log of PO item is updated inconsistently

    Hello, We're running third party process, where changes in SO item are auto updated into PO item via workflow. Normally, user who changed SO item is updated in change log of PO item. However, there are several cases where workflow user is updated in

  • URGENT advice needed on labels/textfields please!!

    I have been trying for days to add labels and textFields to my applet and can only manage to display one. My assignment instructions suggest I use makeTextField method and call the setEditable method from the makeTextField method to avoid repetition

  • How to call Web Service using http?

    Hello everyone, I have created a web service in weblogic 8.1sp4. The web service is deployed and in the test page in the administration console I see that the wsdl is sth like http://localhost:6101/SomeWebService/SomeWebService/SomeWebService?WSDL Ho

  • How do you change the background in an editable region?

    I have created a template with an editable region in it.  I then created a web page based on the template and have added text to the editable region.  I would like to change the background color of just the editable region and just for this web page.

  • Installing a newer version of OSX?

    Hi i recently bough an ibook with osx 10.39 and i would like to upgrade to 10.4 is this possible? I have osx 10.4 from my g5 but apparently i can't install. please help Thanks.