Query help for sales employee sales

Hi....
How can we have a query for
Name of sales employee
Item group
Item name
Total selling amount
Total sales order
Total delivery
Total AR invoice
Please help
Thanks a lot

Hi,
What Total selling amount do you need? Invoice - Credit Memo?
How about the other Total, total count or total amount?
Thanks,
Gordon

Similar Messages

  • Select query help for Sales order

    Hi Experts,
    I have to write a select query to fetch sales orders which are open along with the quantities which are open ( not delivered). What would the best approach for this?
    Any help is appreciated. Expecting code samples....Thanks
    Thanks
    Ricky

    hi,
    do like this,
    write a select query for vbak and vbuk as follows.
    delivery status field is <b>lfstk</b> from <b>vbuk</b>,
    and relation field is <b>vbeln</b> from the both the tables.
    reward points if useful,
    regards,
    seshu.

  • SQ01 Query Help for (MKPF and MSEG)

    Is their anyway to have the field MSEG-ERFMG show up on the query results as postive or negative color or use a "-" or "+".  Need to try and show whether is was a negative or postive movement.

    F1 help for MSEG-SHKZG
    Debit/credit indicator in revaluation
    This indicator is used for internal program control.
    Please do not change the entry in this field.
    Any changes made could lead to program errors or terminations.
    I guess the "sign" is defined trough this field ("S" - sollen (debit), "H" - haben (credit)). If my assumption is true, you won't be able to see + / - in MSEG-ERFMG simply because this field contains no information on the sign.
    Using ABAP code you can solve it (or in SQ01 you can use calculated field in your query...I'm not sure you can define that calculated field to cover your requirement...).
    Regards,
    Csaba
    Edited by: Csaba Szommer on May 12, 2009 11:20 PM

  • Query Help for reporting on last receipt qty

    SBO Version: 8.82 PL11
    Hello Forum,
    I am looking for some help devising a command behind a crystal report. We are hoping to achieve the last receipt quantity. To arrive at this we would like it to get the last GRPO for an item and total the quantity on that particular GRPO. In addition to this, we want to consider all the lines on the document and SUM them.
    At present, the query I have is as follows:
    Select SUM(c0.Quantity) from PDN1 c0 WHERE c0.ItemCode = T1.ItemCode AND Shipdate = (select Max(ShipDate) from PDN1 C0  INNER JOIN OPDN c1 ON c0.DocEntry = c1.DocEntry where C0.Itemcode =T1.ItemCode AND c1.DocStatus <> 'C'))
    Any assistance would be greatly received.
    Thanks
    Sarah

    Hi Sarah,
    Please repost to the SAP Business One Application  space.
    -Abhilash

  • Query help for archive log generation details

    Hi All,
    Do you have a query to know the archive log generation details for today.
    Best regards,
    Rafi.

    Dear user13311731,
    You may use below query and i hope you will find it helpful;
    SELECT * FROM (
    SELECT * FROM (
    SELECT   TO_CHAR(FIRST_TIME, 'DD/MM') AS "DAY"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '00', 1, 0)), '999') "00:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '01', 1, 0)), '999') "01:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '02', 1, 0)), '999') "02:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '03', 1, 0)), '999') "03:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '04', 1, 0)), '999') "04:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '05', 1, 0)), '999') "05:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '06', 1, 0)), '999') "06:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '07', 1, 0)), '999') "07:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '08', 1, 0)), '999') "08:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '09', 1, 0)), '999') "09:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '10', 1, 0)), '999') "10:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '11', 1, 0)), '999') "11:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '12', 1, 0)), '999') "12:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '13', 1, 0)), '999') "13:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '14', 1, 0)), '999') "14:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '15', 1, 0)), '999') "15:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '16', 1, 0)), '999') "16:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '17', 1, 0)), '999') "17:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '18', 1, 0)), '999') "18:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '19', 1, 0)), '999') "19:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '20', 1, 0)), '999') "20:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '21', 1, 0)), '999') "21:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '22', 1, 0)), '999') "22:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '23', 1, 0)), '999') "23:00"
        FROM V$LOG_HISTORY
        WHERE extract(year FROM FIRST_TIME) = extract(year FROM sysdate)
    GROUP BY TO_CHAR(FIRST_TIME, 'DD/MM')
    ) ORDER BY TO_DATE(extract(year FROM sysdate) || DAY, 'YYYY DD/MM') DESC
    ) WHERE ROWNUM < 8;Hope That Helps.
    Ogan

  • Query help for where condition

    Hi ,
    I have String value in table now I require to check that value is valid or not .
    I have below Query .
    SELECT *
    FROM Table TCI
    WHERE (ISDATE(SUBSTRING(SUBSTRING(Data,82,6),1,4)+'-'+SUBSTRING(SUBSTRING(Data,82,6),5,2)+'-'+'01')<>1 OR LEN(LTRIM(RTRIM(SUBSTRING(Data,82,6)))) < 0 OR SUBSTRING(Data,82,6)='000000')
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,88,6)))) < 0 OR SUBSTRING(Data,88,6)= '000000' OR ISDATE(SUBSTRING(SUBSTRING(Data,88,6),1,4)+'-'+SUBSTRING(SUBSTRING(Data,88,6),5,2)+'-'+'01')<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,173,6)))) < 0 OR ISDATE(SUBSTRING(SUBSTRING(Data,173,6),1,4)+'-'+SUBSTRING(SUBSTRING(Data,173,6),5,2)+'-'+'01')<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,195,6)))) < 0 OR ISDATE(SUBSTRING(SUBSTRING(Data,195,6),1,4)+'-'+SUBSTRING(SUBSTRING(Data,195,6),5,2)+'-'+'01') <>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,217,7))))<0 OR ISNUMERIC(LTRIM(RTRIM(SUBSTRING(Data,217,7)))) <> 1)
    AND ISNUMERIC(REPLACE(SUBSTRING(Data,334,10),'-','0'))<>1
    AND ISNUMERIC(SUBSTRING(Data,345,10))<>1
    AND ISNUMERIC( SUBSTRING(Data,355,10))<>1
    AND ISNUMERIC(SUBSTRING(Data,416,8))<>1
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,104,6))))<0 OR ISNUMERIC(SUBSTRING(Data,104,6))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,145,7))))<0 OR ISNUMERIC(SUBSTRING(Data,145,7))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,152,7))))<0 OR ISNUMERIC(SUBSTRING(Data,152,7))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,159,7))))<0 OR ISNUMERIC(SUBSTRING(Data,159,7))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,166,7))))<0 OR ISNUMERIC(SUBSTRING(Data,166,7))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,179,3))))<0 OR ISNUMERIC(SUBSTRING(Data,179,3))<>1)
    AND (LEN(LTRIM(RTRIM(SUBSTRING(Data,201,3))))<0 OR ISNUMERIC(SUBSTRING(Data,201,3))<>1)
    AND (ISNUMERIC(REPLACE(SUBSTRING(Data,365,10),'-','0'))<>1 OR ISNUMERIC( REPLACE(SUBSTRING(Data,365,10),'-','0'))<>1)
    AND (ISNUMERIC(REPLACE(SUBSTRING(Data,375,10),'-','0'))<>1 OR ISNUMERIC( REPLACE(SUBSTRING(Data,375,10),'-','0'))<>1)
    AND (ISNUMERIC(REPLACE(SUBSTRING(Data,385,10),'-','0'))<>1 OR ISNUMERIC(REPLACE(SUBSTRING(Data,385,10),'-','0'))<>1)
    AND (ISNUMERIC(REPLACE(SUBSTRING(Data,395,10),'-','0'))<>1 OR ISNUMERIC(REPLACE(SUBSTRING(Data,395,10),'-','0'))<>1)
    AND (ISNUMERIC(REPLACE(SUBSTRING(Data,405,10),'-','0'))<>1 OR ISNUMERIC(REPLACE(SUBSTRING(Data,405,10),'-','0'))<>1)
    I need only invalid record set from below Query ;
    like; If it is not isdate and is_numeric type for particular row then it return only that row.
    currently i'm facing issue like whole string is invalid in that case it gives row .
    should I use case statement in where clause ?
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

    I need only invalid record set from below Query ;
    like; If it is not isdate and is_numeric type for particular row then it return only that row.
    currently i'm facing issue like whole string is invalid in that case it gives row .
    should I use case statement in where clause ?
    Hi PrajapatiNeha,
    Your requirement is confusing. Judging from the query, the column data
    seems to be a string which consists of fixed length date or numberic format substrings, so you are verifying each substring is valid and need to select the invalid substrings?
    If that is your requirement, why not just extract the substrings into a derived table and filter based on the derived table?  The substrings in the derived table will give a more directly overview of your long data string.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Query Help for SO Alert

    Dear Experts,
    I have a scenario where our user would like to be reminded of action items pertaining to a specific BP when entering a new SO.
    I have the following query but would like it to alert only once.  What syntax do I need to configure for this query to send an internal alert once within a few minutes of adding?
    SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], 'Reminder: <<Insert Reminder Here>>.' as "Important Message"
    FROM ORDR T0
    WHERE T0.[CardCode] IN ('ABC01')
    Thanks,
    Richard

    Hi
    You may create an alert by:
    SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName, 'Reminder: <<Insert Reminder Here>>.' as "Important Message"
    FROM ORDR T0
    WHERE T0.CardCode IN ('ABC01') AND DateDiff(D,T0.DocDate,GetDate())=0
    However, there is no switch to turn it off.
    Thanks,
    Gordon

  • Query Help (For Election Purpose)

    Hello,
    Oracle Version: 10G
    OS: Windows XP SP-3
    create table election (areacode number(2),boothno number(3),Smith number(4),John number(4),tot number(5));
    insert into election values (1,1, 5,2,7);
    insert into election values (1,2,10,0,10);
    insert into election values (2,9,1,2,3);
    insert into election values (2,6,8,1,9);
    required output:
    Candidate   Area1      Area2     Tot
    Smith        15          9        24  << 15=5+10 i.e. Sum of Smith for areacode=1, 9=1+8 i.e. Sum of Smith for areacode=2
    John          2          3         5  << 2=2+0 i.e. Sum of John for areacode=1, 3=2+1 i.e. Sum of John for areacode=2
    Total        17         12        29Thanks & Regards
    Girish Sharma

    Salim,
    First off, i wish to thanks for your working query. Now if i wish to get following output then ?
    Candidate  Area1     Tot
    Smith        15       15  << 15 Sum of Smith for areacode=1
    John          9        9  << 2=2+0 i.e. Sum of John for areacode=1
    Total        24       24
    Candidate  Area1     Tot
    Smith        15       15  << 15 Sum of Smith for areacode=1
    John          9        9  << 9 Sum of John for areacode=1
    Candidate  Area1
    Smith        15
    John          9
    Candidate  Area1     Tot
    John          9        9  << 9 Sum of John for areacode=1
    Total         9        9
    Candidate  Area1     Tot
    John          9        9  << 2=2+0 i.e. Sum of John for areacode=1means, if there are difference in rows and columns by above query please; means there may be more candidates in an area and/or more/less number of areas in comparision of number of candidates.
    Once again thanks for giving learning and working query....!!!
    Thanks & Regards
    Girish Sharma
    Edited by: Girish Sharma on May 17, 2009 11:25 PM
    Rechecked the output

  • Query Help for Running Count

    hi i have table with data like below
    CREATE TABLE Table1
    ID int
    ,GroupID int
    insert into Table1 values(1,1)
    insert into Table1 values(2,2)
    insert into Table1 values(3,2)
    insert into Table1 values(4,1)
    insert into Table1 values(5,1)
    insert into Table1 values(6,3)
    insert into Table1 values(7,3)
    insert into Table1 values(7,3)
    insert into Table1 values(8,2)
    insert into Table1 values(9,4)
    insert into Table1 values(10,5)
    Here i need the out put with GroupID and the count. The expected output like below
    GroupID
    Count
    1
    1
    2
    2
    1
    1
    3
    3
    2
    1
    4
    1
                 5              1  
    I think you got my scenario. For each groupID i need to put the count but with adjusents same GroupID

    Hi Akhil,
    It looks like your expected is wrong, Try the below:
    CREATE TABLE Table1
    ID int
    ,GroupID int
    insert into Table1 values(1,1)
    insert into Table1 values(2,2)
    insert into Table1 values(3,2)
    insert into Table1 values(4,1)
    insert into Table1 values(5,1)
    insert into Table1 values(6,3)
    insert into Table1 values(7,3)
    insert into Table1 values(7,3)
    insert into Table1 values(8,2)
    insert into Table1 values(9,4)
    insert into Table1 values(10,5)
    ;WITH FirstCte AS (
    SELECT GroupID,id,
    ROW_NUMBER() OVER(ORDER BY id) AS rnComplete,
    ROW_NUMBER() OVER(PARTITION BY GroupID ORDER BY id) AS rnGroupID
    FROM Table1)
    , SecondCte AS (
    SELECT id,GroupID, count(GroupID) Over(partition by GroupID, rnComplete - rnGroupID) as GroupCnt
    FROM FirstCte )
    SELECT m.GroupID, GroupCnt
    FROM SecondCte AS m
    GROUP BY m.GroupID, GroupCnt
    Order by MAX(m.ID)
    Drop table Table1
    GroupID
    Count
    1
    1
    2
    2
    1
    2
    3
    3
    2
    1
    4
    1
                 5              1 

  • Query help for count

    Hi Experts,
    I have a table like:
    Id item1 item2
    1 a b
    2 x b
    3 b a
    4 x a
    i need take count exact item1,item2 combination should be (a,b) or (b,a).
    Is there any way to get the combinations counts.
    Regs,
    H

    with xx as
    (select 1 id,'a' item1,'b' item2 from dual union all
    select 2 id,'x' item1,'b' item2 from dual union all
    select 3 id,'b' item1,'a' item2 from dual union all
    select 4 id,'x' item1,'a' item2 from dual union all
    select 5 id,'x' item1,'b' item2 from dual union all
    select 6 id,'a' item1,'b' item2 from dual union all
    select 7 id,'b' item1,'a' item2 from dual
    select count(*)  from xx
    where (item1 = 'a' and item2 ='b') OR (item1 = 'b' and item2 ='a');

  • Query To Return Sale Amount For Specified Employee

    Below is my DDL - How can (in one query) I input an employee name and from the given employee name display all stores that were worked at and Total sale amounts per store for the specified employee?  Sample output would be
    Store Name   Employee Name  Sale Amt
    Two     afaslkfasd
    100
    Five      aslkjfla          300
    Create Table StoreInfo
    storeid int IDENTITY(1,1) PRIMARY KEY,
    storename varchar(100),
    employeeid int,
    employee varchar(100)
    Create Table SaleInfo
    saleid int IDENTITY(1,1) PRIMARY KEY,
    storeid int,
    employeeid int not null,
    saleamount int,
    dateofsale SMALLDATETIME null
    INSERT INTO StoreInfo VALUES
    ('One', 1, 'Mike Jones'),
    ('Two', 2, 'Lee Jones'),
    ('Three', 3, 'Fred Marx'),
    ('Four', 4, 'Lillard Halfling'),
    ('Five', 5, 'Joey Fratada'),
    ('Six', 6, 'Lethan James'),
    ('Seven', 7, 'Four-Finger Charlie'),
    ('Eight', 8, 'Twice Sold'),
    ('Nine', 9, 'Richard Jackson'),
    ('Ten', 10, 'Fred Mitch')
    INSERT INTO SaleInfo VALUES
    (1,1,452, '12-21-14'),
    (1,1,452, '9-7-14' ),
    (1,2,500, '12-7-14' ),
    (1,3,100, '3-12-14' ),
    (1,6,275, '12-2-14' ),
    (1,7,800, '1-12-14' ),
    (2,4,200, '2-16-14' ),
    (2,5,110, '12-7-14' ),
    (2,1,120, '8-12-14' ),
    (2,3,320, '2-22-14' ),
    (3,3,50, '3-12-14' ),
    (3,1,75, '8-2-14' ),
    (3,8,20, '7-12-14' ),
    (3,9,42, '12-8-14' ),
    (4,10,52, '12-16-14' ),
    (4,1,152, '12-4-14'),
    (4,8,452, '5-1-14'),
    (4,7,752, '2-28-13' ),
    (4,6,52, '1-22-14' ),
    (4,2,42, '12-28-13' )

    Thank you for trying to post the DDL we need to answer this. But you do not know RDBMS, or industry and ANSI/ISO standards in your data. You should learn ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal
    data. Your choice of proprietary date format is literally the worst way to do it! Why do you think that IDENTITY has any place in RDBMS? Where were you when they discussed keys? You also have no idea what a normalized table is. An employee has a relationship
    with a store; he is not an attribute of one! When you fire an employee, you destroy a store in your schema. 
    Do people in your world have hundred letter names? The Post office uses 35 for an address line. If you invite garbage data, it will come. 
    Why do you think that “_info” is a valid table name? Why are prices expressed in integers and not decimals? What currency on Earth is not decimal?
    You need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    Below is my DDL - How can (in one query) I input an employee name and from the given employee name display all stores that were worked at and Total sale amounts per store for the specified employee? 
    Why don't you use DRI? That is what RDBMS is all about. 
    CREATE TABLE Stores
    (store_nbr CHAR(3) NOT NULL PRIMARY KEY
     CHECK (store_nbr LIKE '[0-9][0-9][0-9]'), 
     store_name VARCHAR(35) NOT NULL);
    CREATE TABLE Personnel
    (employee_id CHAR(10) NOT NULL PRIMARY KEY, 
     employee_name VARCHAR(35)NOT NULL);
    Since we have no business rules, I will assume each employee is at one and one store, but a store can have many employees. 
    CREATE TABLE Job_Assignments
    (store_nbr CHAR(3) NOT NULL 
     REFERENCES Stores(store_nbr)
     employee_id CHAR(10) NOT NULL PRIMARY KEY
     REFERENCES Personnel (employee_id));
    The sales tickets can be a CREATE SEQUENCE but let's skip that for now. I swill not re-copy your data into this valid schema, but you might want to do it to learn how. 
    CREATE TABLE Sales
    (sale_ticket INTEGER NOT NULL PRIMARY KEY,
     store_nbr CHAR(3) NOT NULL 
       REFERENCES Stores(store_nbr)
     employee_id CHAR(10) NOT NULL
       REFERENCES Personnel (employee_id), 
     sale_amount DECIMAL(12,2) NOT NULL, 
     sale_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL);
    >> How can (in one query) I input an employee name and from the given employee name display all stores that were worked at and Total sale amounts per store for the specified employee?  <<
    SELECT employee_name, store_name,
           SUM(T.sale_amount) AS sales_amt_tot
      FROM Sales AS T, Personnel AS P, Stores AS S
     WHERE P.employee_name = @in_employee_name
       AND T.employee_id = S.Employee_id 
       AND T.store_id = S.store_id 
     GROUP BY employee_name, store_name;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Query for Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
    where U_Total_GP is a UDF for storing the GP of each order.
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
    Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
    Thank you
    Regards
    Elton

    Hi Elton,
    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    ORDER BY T0.[DocNum]
    Thanks,
    Gordon

  • FI-SD data-BEx Query Logic for Amount received for the Lasts F.Year Sales

    Hi Friends,
    Need your assistance in designing one BEx Query,
    We have Two cubes...one is sales ZSALES01 and Account Receivables ZFIAR01. On top of these cubes e built Multiprovider.
    In the sales cube (ZSALES01)., we have calender day, Financial year , Fiscal period characteristics as time characteristics and Net Values as key figures. And Same way in the Account recievable cube (ZFIAR01) we have calender day( Which is mapped with Posting date), Financial year , Fiscal period characteristics as time characteristics and Credit/Debit amount as key figure.
    My requiremnt is that i have to show in BEx with below scenarios.......
    1.Amount received for the sales occured till Last Financial year
    2. Amount Received for the sales occured in this current financial year
    We have two show these values for company code wise , we have company code in both cubes nad we  have financial year...and some other common fields there in both cubes.
    Can you please guide me how to design the same in BE query.
    Thanks & Regards,
    Anand

    are you saying that in your query you need to have 4 columns;
    - Sales Last Year
    - Sales Current Year
    - AR for Sales (LY+CY)
    - AR for Sales Current Year
    If yes, getting Sales Information is easy. You need to use customer exit variable to get the current year (calendar or fiscal)
    - for Sales Last Year, use customer exit variable for current year with a offset of -1
    - for Saels Current Year, use customer exit variable for current year
    For AR columns, as I said in my earlier post - use a lookup while loading data in AR cube. Use the Sales Doc Number and get the year information (calendar, financial or fiscal - whatever you want to use depending on your requirement) from Sales flow. This way you can tell if a particular FI doucment is for this year's sales or last year's sales.
    Now, you can use another customer exit variable for AR column depending on the "Sales Year" infoboject. Customer exit variable shold be populated with the current Sales Year.
    - for AR for Sales CY, use this customer exit variable
    - for AR for Sales LY, use this customer exit variable with offset of -1
    - AR for Saels (LY+CY), add both the columns above
    Another way of achieving AR for Sales (LY+CY) is to restrict the RKF or value range using customer exit variable for Sales year with BETWEEN operator (From var1 to (var1-1)).
    You can also use the option of replacment path variable as Durgesh mentioned. but in that case you will have to create two addition queries based on sales data which will return:
    - sales documents for last year
    - sales documents for current year
    then you need to create two replacement path variables for AR columns which will get values from these two queries.
    I hope it helps.
    Regards,
    Gaurav

  • Sales Commission Report for All Employees

    I'm trying to make a couple smartforms that will do the following tasks (each task is a separate smartform):
    1. Display the total sales amount for ALL employees over one month in a table format
    2. Display the total sales amount and commission for ONE employee over one month
    From my understanding, the way this can be achieved is through the ICM module?  I don't believe there are any default smartforms or sapscripts that are available for this functionality.  Can you please post information or links on how I would do this.
    I am also wondering if I will have to create a function module to create this form, or if I can use a print preview after setting the output type for this type of application?

    Try transaction VA05. In that choose "Open Orders" along with other selection criteria.
    If you want the Open sales order qty in output and its not displayed, do the following.
    Sales -> System modification -> create new fields ( without condition technique) -> New fields for lists.
    You can change V05TZZMO and structure VBMTVZ from there or use SE38 / SE11.
    For both you'll need an object registration in OSS.
    Hope this helps.
    Thanks,
    Balaji

  • Automatic determination for Sales personnel / Employee responsible in sales

    Hi Gurus,
    Help me out in automatic determination for Sales personnel / Employee responsible in sales order. I have tried in Partner determination, it is not working.
    Regards,
    sushil

    There can be few options:
    Option 1: In the customer master partner determination, add the Sales Person and Employee responsible partner functions and mark them as mandatory. In the Sales Order Header Partner Determination, add the same and mark them Mandatory. Then during order processing, the relevant Sales Person and Employee responsible will flow in the order header partners
    Option 2: Mainatin a Z table based on Sales Area / any other specific parameter / Sales Person & employee responsible. You can improvise the table parameters as per your business needs and requirements.Then in the order user exit MV45AFZB in form_userexit_move_field_to_VBAK you can read this z table and get the sales person and employee responsible. May be you can add these two fields in Order Header- Additioanl Data B tab and populate them thru this program.
    Hope this helps
    Regards
    Sai

Maybe you are looking for